In EntityInstanceCache.canPassivate(EnterpriseContext ctx)
there is the following statement:
else if
(m_container.getLockManager().canPassivate(((EntityEnterpriseContext)ctx).getCacheKey()))
{
return false;
}
The corresponding BeanLockManager.canPassivate(Object) code is:
public synchronized boolean canPassivate(Object id)
{
if (id == null)
throw new IllegalArgumentException("Attempt to passivate with a null object");
BeanLock lock = (BeanLock)map.get(id);
if (lock == null)
throw new IllegalStateException("Attempt to passivate without a lock");
return (lock.getRefs() > 1);
}
This seems like a strange reversal of the 'can passisvate x' assertion. I would expect
that this is true if there are no lock references. The usage from the
EntityInstanceCache.canPassivate
seems consistent with this reversed semantic but it is confusing. If the
BeanLockManager.canPassivate
call is true then EntityInstanceCache.canPassivate is false and visa-versa. Please
clarify this
so myself and others don't get a headache looking at this code.
xxxxxxxxxxxxxxxxxxxxxxxx
Scott Stark
Chief Technology Officer
JBoss Group, LLC
xxxxxxxxxxxxxxxxxxxxxxxx
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger
for complex code. Debugging C/C++ programs can leave you feeling lost and
disoriented. TotalView can help you find your way. Available on major UNIX
and Linux platforms. Try it free. www.etnus.com
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development