In EntitySynchronizationInterceptor, in the inner class
InstanceSynchronization in afterCompletion in case
of commit option C the following code will not release the context:
case ConfigurationMetaData.C_COMMIT_OPTION:
   try
   {
      // Do not call release if getId() is null.  This means that
      // the entity has been removed from cache.
      // release will schedule a passivation and this removed ctx
      // could be put back into the cache!
      if (ctx.getId() != null)
      {
         container.getInstanceCache().release(ctx);
      }
   }
   catch (Exception e)
   {
      if( log.isDebugEnabled() )
      log.debug("Exception releasing context", e);
   }
   break;

The lock for the context is acquired in InstanceSynchronization
constructor and released in afterCompletion in the finally block, i.e.
after commit options are handled.

So, in the constructor of InstanceSynchronization we lock first
time (reference count is 1). InstanceCache.release() ->
AbstractInstanceCache.tryToPassivate() will lock again (reference
count is 2).
Finally, BeanLockManager.canPassivate(Object id) agrees to passivate
if lock.getRefs() <= 1.

Any ideas how to fix this?

Thanks,

alex



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to