[ http://jira.jboss.com/jira/browse/JBAS-1234?page=history ]
Adrian Brock closed JBAS-1234:
------------------------------
Resolution: Done
Fix Version: JBossAS-4.0.2RC1
At transaction thread association the thread's interrupted status
is cleared.
This avoids any interruption to the transaction's work that
may have been caused by a previous (suspended) transaction on the
same thread.
Of course, if it is the transaction that has timed out that gets associated
with the thread, the connection enlistment will fail because the transaction
is at the wrong status for that operation.
> "Interrupted while requesting permit" isn't accurate
> ----------------------------------------------------
>
> Key: JBAS-1234
> URL: http://jira.jboss.com/jira/browse/JBAS-1234
> Project: JBoss Application Server
> Type: Bug
> Components: JTA service
> Versions: JBossAS-3.2.6 Final
> Reporter: SourceForge User
> Assignee: Adrian Brock
> Fix For: JBossAS-4.0.2RC1
>
>
> SourceForge Submitter: javajedi .
> JBoss 3.2.5, JDK 1.4.2, Fedora Core 2.
> I have a situation where my current transaction gets
> interrupted, I start a new, nested transaction
> (suspend(), begin()), and when I go to get a JDBC
> connection from within this new transaction, I get the
> following exception:
> org.jboss.util.NestedSQLException: Interrupted while
> requesting permit! Waited 0 ms, invocation time:
> 1101597295362; - nested throwable:
> (javax.resource.ResourceException: Interrupted while
> requesting permit! Waited 0 ms, invocation time:
> 1101597295362)
> at
> org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:106)
> at
> net.sf.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:59)
> at
> net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:286)
> ... 24 more
> Caused by: javax.resource.ResourceException:
> Interrupted while requesting permit! Waited 0 ms,
> invocation time: 1101597295362
> at
> org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:261)
> at
> org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:541)
> at
> org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:444)
> at
> org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:312)
> at
> org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496)
> at
> org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:887)
> at
> org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102)
> ... 26 more
> There are a couple problems here. The first is that
> the code is checking the interrupt status of the
> current thread, and making the (incorrect in this case)
> assumption that if it is set, this is an indicator that
> the current transaction is invalid. A more appropriate
> check would seem to be to test the actual transaction
> status by using the TransactionManager. The second
> problem is that the error message is just wrong. The
> thread was not interrupted while requesting a permit.
> It was interrupted long before.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-Development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-development