Bugs item #551456, was opened at 2002-05-02 15:24 Message generated for change (Settings changed) made by ejort You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=551456&group_id=22866
Category: JBossServer Group: v3.0 Rabbit Hole >Status: Closed >Resolution: Wont Fix Priority: 5 Submitted By: Achim Demelt (ademelt) Assigned to: Adrian Brock (ejort) Summary: ejbLoad not called with commit option C Initial Comment: ejbLoad() is not always called when invoking a method on an entity bean with commit option C (doesn't matter if BMP or CMP). See discussion at http://jboss.org/forums/thread.jsp? forum=46&thread=7066 and example code in the attachment. The problem only occurs when invoking methods *outside* a transaction. The EntitySynchronizationInterceptor then cannot invalidate or remove the bean from the cache in afterCompletion(). When running the demo from the attachment, be sure to set commit option to C for Standard BMP Entity Bean in standardjboss.xml. I've verified this behavior with JBoss 2.4.0 and 3.0.0 with JDK 1.3.1 under Windows 2000. ---------------------------------------------------------------------- >Comment By: Adrian Brock (ejort) Date: 2003-10-05 21:28 Message: Logged In: YES user_id=9459 I have fixed commit C inside a transaction so it can now return beans to the pool in 3.2 Fixing outside a transaction is not possible in general. There is no transactional lock or demarcation when we know for definite the context is not being used. The reason it does not work even with one thread, is because the EntityLockInterceptor holds a reference to the lock as well as the cache. The cache will only passivate a bean when it is has the sole reference on the bean. You can use "instance-per-transaction" to get the behaviour you are looking for. Each invocation uses its own copy of the bean. Regards, Adrian ---------------------------------------------------------------------- Comment By: Adrian Brock (ejort) Date: 2003-04-22 00:46 Message: Logged In: YES user_id=9459 I have fixed the option B version of this problem. This does not work correctly for option C. Under 3.0 the return to pool could fail since it is done in a background thread. It depends on the timing, sometimes it just goes back in the cache. Under 3.2 the bean is never returned to the pool because the context is always locked when it is attempted. The bean is discarded so at least ejbLoad is invoked. see org.jboss.test.entity.test.EJBLoadUnitTestCase Regards, Adrian ---------------------------------------------------------------------- Comment By: Dain Sundstrom (dsundstrom) Date: 2002-08-24 00:36 Message: Logged In: YES user_id=251431 Bill did you already fix this? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=551456&group_id=22866 ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development