Bugs item #620262, was opened at 2002-10-08 16:44
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=620262&group_id=22866
Category: JBossCX
Group: v3.0 Rabbit Hole
Status: Open
Resolution: None
Priority: 5
Submitted By: Marko Strukelj (mstruk)
Assigned to: Nobody/Anonymous (nobody)
Summary: Trying to change Tx in enlist exception
Initial Comment:
When doing very intensive remote calls via statefull
session, using the database with user managed
transactions I often get this error:
2002-10-03 15:51:16,000 WARN
[org.jboss.resource.connectionmanager.LocalTxConnecti
onManager$LocalConnectionEventListener] in Enlisting
tx, trying to change tx. illegal state: old:
TransactionImpl:XidImpl [FormatId=257,
GlobalId=brutus//233, BranchQual=], new:
TransactionImpl:XidImpl [FormatId=257,
GlobalId=brutus//234, BranchQual=], cel:
org.jboss.resource.connectionmanager.LocalTxConnecti
onManager$LocalConnectionEventListener@1f8d0a4
2002-10-03 15:51:16,000 ERROR [STDERR]
java.lang.IllegalStateException: Trying to change Tx in
enlist!
2002-10-03 15:51:16,000 ERROR [STDERR] at
org.jboss.resource.connectionmanager.LocalTxConnecti
onManager$LocalConnectionEventListener.enlist
(LocalTxConnectionManager.java:309)
2002-10-03 15:51:16,000 ERROR [STDERR] at
org.jboss.resource.connectionmanager.LocalTxConnecti
onManager.managedConnectionReconnected
(LocalTxConnectionManager.java:255)
2002-10-03 15:51:16,000 ERROR [STDERR] at
org.jboss.resource.connectionmanager.BaseConnection
Manager2.allocateConnection
(BaseConnectionManager2.java:534)
2002-10-03 15:51:16,000 ERROR [STDERR] at
org.jboss.resource.connectionmanager.BaseConnection
Manager2$ConnectionManagerProxy.allocateConnection
(BaseConnectionManager2.java:812)
2002-10-03 15:51:16,000 ERROR [STDERR] at
org.jboss.resource.adapter.jdbc.local.LocalDataSource.g
etConnection(LocalDataSource.java:102)
It only happens when there is severe concurent use of
the database. But it does happen a lot.
What seems to happen is this:
Thread 1:
userTransaction.begin();
Connection c=ds.getConnection(); // lets
call this Connection1
// ... use connection
c.close(); // close connection
// now don't commit transaction yet
Thread 2:
userTransaction.begin();
Connection c=ds.getConnection(); //
KABOOOM! Exception happens here.
Exception happened because Connection1 was trying to
be returned - the same connection that was used by
another thread.
In the time between returning a connection to the pool
and calling commit on UserTransaction the same
connection is checked out to another thread.
I am trying to make an example to reproduce the bug.
So far the only way I can reproduce it is on my
production system with full application deployed.
----------------------------------------------------------------------
>Comment By: Marko Strukelj (mstruk)
Date: 2002-10-11 16:08
Message:
Logged In: YES
user_id=625403
Looks like my initial diagnosis was slightly incorrect.
What I see happening when I put logging at strategic places
is that two threads try to get the same connection out at the
same time. One succeeds the other one gets exception.
It must therefore be a synchronization problem.
I'll try to do some more debugging and to find the offending
spot.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=620262&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