Bugs item #648442, was opened at 2002-12-04 15:34
Message generated for change (Comment added) made by ejort
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=648442&group_id=22866
Category: JBossCX
>Group: v3.2
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Christian Mouttet (cmouttet)
Assigned to: Adrian Brock (ejort)
Summary: EJB can't connect to DB user specific
Initial Comment:
If I want to connect twice with different users the first connect works
correctly but the second one throws an ResourceException
("Wrong credentials passed to getConnection!").
Criteria
attribute of mbean JBossManagedConnectionPool is
configured as
ByApplication.
Win2000
JDK1.4.1_01
jboss-
3.0.4_tomcat-4.1.12
oracle database
Pseudo code
snippet:
...
Datasource
lookup
Datasource.getConnection(user,
password)
Datasource.getConnection(user2,
password2)
=> ResourceException ("Wrong
credentials passed to
getConnection!")
http://www.jboss.org/forums/thread.jsp?forum=136&thread=25672
----------------------------------------------------------------------
>Comment By: Adrian Brock (ejort)
Date: 2004-03-06 12:50
Message:
Logged In: YES
user_id=9459
This has been fixed for 3.2.4RC1
Regards,
Adrian
----------------------------------------------------------------------
Comment By: Adrian Brock (ejort)
Date: 2003-09-15 12:23
Message:
Logged In: YES
user_id=9459
This problem is caused by the track connection by
transaction processing.
This overrides other pooling considerations.
The second getConnection tries to use the same underlying
connection
as the first one. This fails because because the credentials
are different.
For a local driver you don't want to do this anyway. There is no
two phase commit.
This processing is used for Oracle's XA driver because it does
not handle mutiple non-concurrent uncommitted
XAResources on the same managed connecton.
ByApplication does work in the same transaction for XA drivers
that don't need track-connection-by-tx.
A simple workaround would be deploy two pools, of course
you'll have the two phase commit problem for local and you
could get deadlocks anyway if it is locking the same data.
A potential fix would be ask the pool if the new request will
use the same sub-pool as the connection already in the
transaction.
This obviously introduces extra overhead so it would need
to parameterized possibly by allowing something like:
<track-connection-by-tx overrides-pooling-criteria="false"/>
Regards,
Adrian
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=648442&group_id=22866
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development