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.0 Rabbit Hole
Status: Open
>Resolution: Later
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: 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:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to