----- Original Message -----
Sent: Wednesday, December 09, 2009 7:37
PM
Subject: [eclipselink-users] Create
Oracle Authentication Proxy forEclipseLink JPA application
Hi,
I am trying to create an Oracle authentication proxy
for an EclipseLink JPA application to access Oracle Label Security database
(VPD).
In this example, the normal application user is pu_user_1, the
big application user is pu_pool_user. pu_pool_user is allowed to proxy
for pu_user_1.
In my persistence.xml, I have the following
properties set:
<properties>
<property
name="eclipselink.jdbc.driver" value="oracle.jdbc.OracleDriver"
/>
<property name="eclipselink.jdbc.url"
value="jdbc:oracle:thin:@localhost:1521:oracle" />
<property name="eclipselink.jdbc.user" value="pu_pool_user"
/>
<property name="eclipselink.jdbc.password"
value="pu_pool_user" />
</properties>
In my codes, I
have:
Map properties = new
HashMap();
properties.put("eclipselink.jdbc.exclusive-connection.mode",
"Isolated");
properties.put("eclipselink.cache.shared.Location",
"false");
this.entityManagerFactory=Persistence.createEntityManagerFactory("test",
properties);
Map emProperties = new
HashMap();
emProperties.put("eclipselink.oracle.proxy-type",
oracle.jdbc.OracleConnection.PROXY_USER_NAME);
emProperties.put(oracle.jdbc.OracleConnection.PROXY_USER_NAME,
"pu_user_1");
this.entityManager=entityManagerFactory.createEntityManager(emProperties);
this.entityManager.getTransaction().begin();
this.entityManager.persist(location);
commitTransaction();
When
I ran the program, it doesn't seem
like pu_user_1 is writing to the database, that pu_pool_user is just acting as
a proxy. It seems like pu_pool_user is writing to the database.
Are there anything that I am missing? What changes do I
need to make to make sure that pu_pool_user is just acting as a proxy?
When writing to the database, the security level of the inserted data is
set to the security level of pu_user_1?
thanks
_______________________________________________
eclipselink-users
mailing
list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users