Bugs item #857053, was opened at 2003-12-09 18:22
Message generated for change (Settings changed) made by ejort
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=857053&group_id=22866

Category: JBossTX
Group: v3.0 Rabbit Hole
>Status: Closed
>Resolution: Out of Date
Priority: 5
Submitted By: Michael Becker (ms_becker)
Assigned to: Nobody/Anonymous (nobody)
Summary: TransactionTimeout not notifying the client object

Initial Comment:
On a call to a Stateful session bean in 3.0.7, my code 
was exceeding the TransactionTimeout configured in 
jboss-service.xml.  However, when it exceeded the 
timeout, the EJB finished it's processing and returned to 
the calling object without any error or notification that 
the transaction was rolled back.  The next call to the 
EJB (which actually pulled from a different connection 
pool), received the following error: 

org.jboss.util.NestedSQLException: Interrupted while 
requesting permit!; - nested throwable: 
(javax.resource.ResourceException: Interrupted while 
requesting permit!)
at 
org.jboss.resource.adapter.jdbc.WrapperDataSource.getC
onnection(WrapperDataSource.java:106)
at 
com.bts.j2ee.ejb.buscontrol.BusinessController.getPooled
Connection(BusinessController.java:122)
at 
com.bts.financing.ejb.buscontrol.MaintainFinancingControl
lerBean.loadSection
(MaintainFinancingControllerBean.java:1251)
at sun.reflect.GeneratedMethodAccessor963.invoke
(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at 
org.jboss.ejb.StatefulSessionContainer$ContainerIntercep
tor.invoke(StatefulSessionContainer.java:824)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke
(SecurityInterceptor.java:130)
at 
org.jboss.resource.connectionmanager.CachedConnection
Interceptor.invoke
(CachedConnectionInterceptor.java:186)
at 
org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.i
nvoke(StatefulSessionInstanceInterceptor.java:268)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext
(AbstractTxInterceptor.java:107)
at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransacti
ons(TxInterceptorCMT.java:237)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke
(TxInterceptorCMT.java:98)
at org.jboss.ejb.plugins.LogInterceptor.invoke
(LogInterceptor.java:208)
at org.jboss.ejb.StatefulSessionContainer.invoke
(StatefulSessionContainer.java:380)
at org.jboss.ejb.Container.invoke(Container.java:738)
at org.jboss.mx.server.MBeanServerImpl.invoke
(MBeanServerImpl.java:517)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke
(JRMPInvoker.java:383)
at sun.reflect.GeneratedMethodAccessor40.invoke
(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at sun.rmi.server.UnicastServerRef.dispatch
(UnicastServerRef.java:261)
at sun.rmi.transport.Transport$1.run(Transport.java:148)
at java.security.AccessController.doPrivileged(Native 
Method)
at sun.rmi.transport.Transport.serviceCall
(Transport.java:144)
at sun.rmi.transport.tcp.TCPTransport.handleMessages
(TCPTransport.java:460)
at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.ru
n(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:536)
Caused by: javax.resource.ResourceException: 
Interrupted while requesting permit!
at 
org.jboss.resource.connectionmanager.InternalManagedC
onnectionPool.getConnection
(InternalManagedConnectionPool.java:187)
at 
org.jboss.resource.connectionmanager.JBossManagedCon
nectionPool$BasePool.getConnection
(JBossManagedConnectionPool.java:335)
at 
org.jboss.resource.connectionmanager.BaseConnectionMa
nager2.getManagedConnection
(BaseConnectionManager2.java:467)
at 
org.jboss.resource.connectionmanager.LocalTxConnection
Manager.getManagedConnection
(LocalTxConnectionManager.java:221)
at 
org.jboss.resource.connectionmanager.BaseConnectionMa
nager2.allocateConnection
(BaseConnectionManager2.java:532)
at 
org.jboss.resource.connectionmanager.BaseConnectionMa
nager2$ConnectionManagerProxy.allocateConnection
(BaseConnectionManager2.java:828)
at 
org.jboss.resource.adapter.jdbc.WrapperDataSource.getC
onnection(WrapperDataSource.java:102)
... 27 more

Here's a list of the steps that I was able to do to 
reproduce the error:
1. EJB Starts long transaction from connection pool 1.
2. After 5 minutes, the TransactionManager times it out 
(2003-12-09 09:23:22,616 WARN 
[org.jboss.tm.TxCapsule] Transaction XidImpl 
[FormatId=257, GlobalId=Beckerlaptop//9, BranchQual=] 
timed out. status=STATUS_ACTIVE)
3. The method continues and returns successfully to the 
calling client, rolling back the data, without notification.
4. The next call into the EJB attempts to pull from 
connection pool 2 and gets the below error. 

Configuration: 
JBoss 3.0.7
OS: Windows XP/ Windows 2000
Java VM: Sun 1.4.1_05, Server VM


----------------------------------------------------------------------

Comment By: Bill Burke (patriot1burke)
Date: 2003-12-09 20:45

Message:
Logged In: YES 
user_id=176497

The problem is that when a timeout happens the TM interrupts
the Thread.  That particular thread needs to call
Thread.interrupted to clear the interrupt state.

This bug has been fixed in 3.2.2

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=857053&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

Reply via email to