[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[eclipselink-users] How to force using proxyed Login in selects outside Transaction
|
Hello,
We are using Eclipselink (1.0.1) bundled with Glassfish V3 prelude with JTA pooled connection on Glassfish connecting on a Oracle 10.2 Database.
Some of the Applicationusers are having a OracleUser and so I want to connect as these. I managed that by adding proxy-properties to the Entitymanager in a centralized Datamanager:
private EntityManager getPersonalEntityManager(String username) {
Map emProperties = new HashMap();
emProperties.put("eclipselink.oracle.proxy-type", oracle.jdbc.OracleConnection.PROXYTYPE_USER_NAME);
emProperties.put(oracle.jdbc.OracleConnection.PROXY_USER_NAME, username);
EntityManager em = getEntityManagerFactory().createEntityManager(emProperties);
return em;
}
When I do a Select, the connection is not proxied. I read in the ELUG that only selects and updates in a Transaction are proxied. How can I force proxying the connection even on simple selects? Transactions are managed from Glassfish..
Best regards Berner Martin