Hello, I have a SSB (statefull session bean) with BMT (bean managed transaction) whith the following transaction handling: - one business method starts the transaction (calls UserTransaction.begin()) - another business method calls commit() or rollback() on the transaction.
When the client does the whole transaction cycle everything is fine, the transaction is commited/rolled back (whatever the client calls), the connection is returned to the pool and finally the bean is passivated. When the client dies (or exits) after starting the transaction then I get a kind of zombie bean. Here is what happens: Client: - the client looks up a bean and calls a business method that starts the transaction - the client dies Server: - the fist business method starts the transaction - now the client dies, the server does not recognize this (!?) - transaction timeout if fired (was set before begin). The transaction is marked for rollback (org.jboss.tm.TxCapsule) - idletimeout from the JDBC configuration fires and frees the connection (not really, see below) - The zombie bean is still there and cannot be passivated. From log: [10:31:30,227,LRUEnterpriseContextCachePolicy] Scheduling for passivation overaged bean DatabaseSession with id = 1017995022034 - Cache size = 1 [10:31:30,227,LRUEnterpriseContextCachePolicy] Aging out from cache bean DatabaseSession with id = 1017995022034; cache size = 1 [10:31:30,237,StatefulSessionInstanceCache] Scheduled passivation of bean DatabaseSession with id = 1017995022034 [10:31:30,237,StatefulSessionInstanceCache] Postponed passivation of bean DatabaseSession with id = 1017995022034 According to the EJB Spec this seems to be OK (says that a SSB that has a transaction cannot be passivated) but this does not really help me :-( The passivation is postponed since the bean is still asociated with a transaction (that has been marked for rollback). And this happens again and again ... And despite the log entry that the JDBC Connection has been returned into the pool it is still asociated with the session (and the transaction). Even worse, the connection cannot be used any more (one gets an XAException when the connection is requested again with getConnection). When using the oracle JDBC driver (classes12.zip) also the following happens: When I shutdown JBoss the sql statement gets commited to the database (was not visible before)!? This is an Oracle bug, the driver commits every open statement when the connection is closed (autoCommit is false) !? How can I solve this? Is there any setting I did not found (yet)? Can I detect that the client is gone and cleanup the session? Can I set some other timeout to passivate the bean even when there is a transaction? I tested on JBoss 2.4.4 (release and CVS version) and on 3.0beta on Win NT, Win 2K and Sun OS with Oracle 8.0.5 (classes12.zip and the I-net driver). I configured the datasource with the XADataSourceLoader MBean. There was always the same result (except the special oracle jdbc close bug). Can anyone help me? Thanks. Erwin Guib Dipl.-Inf. (FH) Software Development / Technical Information Consultant CEYONIQ Healthcare GmbH & Co. KG Postfach 31 02 15 86063 Augsburg Germany Fon: +49 (0)821 44490-0 Fax: +49 (0)821 44490-60 <mailto:[EMAIL PROTECTED]> <http://www.ceyoniq.com/healthcare> _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user