SessionSynchronisation.beforeCompletion deferred/missing with BMT
-----------------------------------------------------------------

         Key: JBAS-1524
         URL: http://jira.jboss.com/jira/browse/JBAS-1524
     Project: JBoss Application Server
        Type: Bug
    Versions:  JBossAS-4.0.1 SP1, JBossAS-4.0.1 Final,  JBossAS-3.2.7 Final, 
JBossAS-3.2.6 Final    
 Environment: Windows 2000 SP 4
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04)

    Reporter: C. Berger
    Priority: Minor


We have a stateful SessionBean implementing the 
SessionSynchronisation-Interface. The transaction is managed by the client (or 
alternatively another SessionBean) using the UserTransaction.

The call to beforeCompletion() does not come when expected, after the 
UserTransaction has been rolled back (and before afterCompletion()), but when 
the bean is removed. As a side effect our cleanup code in beforeCompletion is 
not called properly, so we get a warning about an unclosed connection as you 
can see in the log snippet:

14:16:52,710 lookup user transaction... (Client)
14:16:52,801 open transaction... (Client)
14:16:52,871 call openConnection()... (Client)
14:16:52,881 INFO  [STDOUT] afterBegin
14:16:52,881 INFO  [STDOUT] openConnection: open connection...

14:16:53,882 rollback transaction... (Client)
<--- beforeCompletion() expected!
14:16:53,882 INFO  [STDOUT] afterCompletion
14:16:53,882 INFO  [CachedConnectionManager] Closing a connection for you.  
Please close them yourself: [EMAIL PROTECTED]

14:16:54,894 remove bean... (Client)
14:16:54,894 INFO  [STDOUT] afterBegin
14:16:54,894 INFO  [STDOUT] ejbRemove: connection is open!
14:16:54,894 INFO  [STDOUT] beforeCompletion
14:16:54,894 INFO  [STDOUT] beforeCompletion: closing connection...
14:16:54,894 INFO  [STDOUT] afterCompletion

A small, reproducible test case is available if needed.

  Best Regards
  C. Berger

-- 
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

Reply via email to