Hi Bryan,

> In the "Never" session bean methods, when exactly are my entity bean's 
> transactions ENDED (committed)?

As of the EJB spec 1.1 section 11.6.2 they are ended on return
from the Entities method set to Requires. I crosschecked the code
in org.jboss.ejb.plugins.TxInterceptorCMT and it behaves as specified.

session1    session2    entityA     entityB
--------    --------    -------     -------
    |          I TX.begin  |           |
    |          I---------->I           |
    |          I TX.commit |           |
    I          I           | TX.begin  |
    I--------------------------------->I
    I          I           | TX.commit |
    I          I           |           |
    I          I           | TX.begin  |
    I          I---------------------->I
    I          I           | TX.commit |
    I          I TX.begin  |           |
    I--------------------->I           |
    I          I TX.commit |           |

Thus you should see no deadlock caused.

regards
Georg
 ___   ___
| + | |__    Georg Rehfeld      Woltmanstr. 12     20097 Hamburg
|_|_\ |___   [EMAIL PROTECTED]           +49 (40) 23 53 27 10


----- Original Message ----- 
From: "Bryan Field-Elliot" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 11, 2001 11:06 PM
Subject: [JBoss-user] When do entity beans commit?


> I am using jBoss 2.2.2.
> 
> My clients access a stateful session bean, and my session bean's methods 
> in turn access CMP entity beans.
> 
> All my entity beans are marked as "Requires" transactions; in my session 
> bean, some methods are marked as "Never", while others are marked as 
> "Requires".
> 
> In the "Never" session bean methods, when exactly are my entity bean's 
> transactions ENDED (committed)? These are essentially read-only methods 
> in my session bean. They use entity beans to gather data, but they 
> aren't making any changes. Nonetheless, they are causing me some 
> deadlock problems. Will these entity beans not be released until after 
> my session bean method returns, even though my session bean method is 
> not transactional?
> 
> Help would be appreciated.
> 
> Regards,
> 
> Bryan
> 
> 
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
> 


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to