Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » JPA/JTA eclipselink oracle proxy authentication problem(JPA/JTA eclipselink oracle proxy authentication not working)
JPA/JTA eclipselink oracle proxy authentication problem [message #520044] Wed, 10 March 2010 22:44 Go to next message
Karl is currently offline Karl
Messages: 4
Registered: March 2010
Junior Member
Couldn't find the answer to this in the forum so thought I'd just ask.

My problem is with proxy authentication to an oracle database using eclipselink JTA with an injected Persistence Context / Entity Manager.

Proxy authentication doesn't work when I try to run a JPQL query. The problem appears to be that the entity manager is injected and does not allow for the setting of properties. The JPQL query just runs as the default user.

I guess my question is, does eclipselink support Proxy Authentication to an oracle database using JTA and an injected persistence context?

I don't have immediate access to the exact error at the minute but I think this initial question is to determine if it's an avenue worth continuing with.


The code I'm using to try and authenticate is:

Map emProperties = new HashMap();
emProperties.put("eclipselink.oracle.proxy-type", oracle.jdbc.OracleConnection.PROXYTYPE_USER_NAME);
emProperties.put(oracle.jdbc.OracleConnection.PROXY_USER_NAM E, username);
((org.eclipse.persistence.internal.jpa.EntityManagerImpl)em. getDelegate()).setProperties(emProperties);
//JPQL Query

Re: JPA/JTA eclipselink oracle proxy authentication problem [message #520201 is a reply to message #520044] Thu, 11 March 2010 14:47 Go to previous messageGo to next message
James Sutherland is currently offline James Sutherland
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

I believe this should work, provided you are setting the properties after starting the JTA transaction. What version of EclipseLink are you using?


James : Wiki : Book : Blog : Twitter
Re: JPA/JTA eclipselink oracle proxy authentication problem [message #520398 is a reply to message #520044] Fri, 12 March 2010 09:11 Go to previous messageGo to next message
Karl is currently offline Karl
Messages: 4
Registered: March 2010
Junior Member
It is after the JTA transaction has started but it doesn't work.

I'm using eclipselink 1.1 and JTA 1.0
Re: JPA/JTA eclipselink oracle proxy authentication problem [message #522418 is a reply to message #520044] Mon, 22 March 2010 15:23 Go to previous messageGo to next message
James Sutherland is currently offline James Sutherland
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

Try the latest 2.0 release, if it still does not work, log a bug with a trace on finest of what occurs.


James : Wiki : Book : Blog : Twitter
Re: JPA/JTA eclipselink oracle proxy authentication problem [message #530499 is a reply to message #522418] Thu, 29 April 2010 20:14 Go to previous message
Thiago Melo is currently offline Thiago Melo
Messages: 2
Registered: April 2010
Junior Member
Hi karl,
i have the same issue in my project.
Do you solve this issue in your project? can you help me?


Thanks.
Previous Topic:NoClassDefFoundError: javax/transaction/Synchronization on Glassfish v2.1.1
Next Topic:left outer join with JPQL
Goto Forum:
  


Current Time: Mon Sep 22 14:25:12 GMT 2014

Powered by FUDForum. Page generated in 0.01742 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software