-
1. Re: [AbstractInstanceCache] Unable to passivate due to ctx l
adrian.brock Apr 22, 2003 4:12 PM (in response to sysuser1)It means there was an attempt to return a bean
to the pool, but it was locked by an invocation.
The bean was not returned to the pool.
Regards,
Adrian -
2. Re: [AbstractInstanceCache] Unable to passivate due to ctx l
sysuser1 Apr 22, 2003 6:19 PM (in response to sysuser1)Adrian,
Thanks for answering all my questions .. I'm still a newbie struggling with JBoss.
Why will the bean be locked by an invocation ? Is this caused by having too small entity cache size or pool size? I'm using the defaults for for cache and pooling configuration ... which looking from the standardjboss.xml is set to a minumum of 50 for the cache. My test is just a simple 1 user invocation, so I'm not sure if this is the problem.
Thanks again,
Trev -
3. Re: [AbstractInstanceCache] Unable to passivate due to ctx l
adrian.brock Apr 22, 2003 9:26 PM (in response to sysuser1)Try turning on TRACE of org.jboss.ejb.plugins
This should why it is trying to passivate/return
to the pool.
Which commit option are you using?
Regards,
Adrian -
4. Re: [AbstractInstanceCache] Unable to passivate due to ctx l
mboulatian Apr 29, 2003 2:17 PM (in response to sysuser1)Since we started using jboss 3.2 we also started getting
'WARN [org.jboss.ejb.plugins.AbstractInstanceCache] Unable to passivate due to ctx lock' warnings. We did not see this with jboss 3.04. We get this for the beans configured in jboss.xml with commit option C. I would like to find out if there is something we are doing wrong which contradicts with jboss 3.2 or it is just a configuration error. I am including my standardjboss.xml and jboss.xml files.
Thanks
Misak -
5. Re: [AbstractInstanceCache] Unable to passivate due to ctx l
pavlogonchar May 9, 2003 11:52 AM (in response to sysuser1)We have the same problem with storing a newly created entity EJB instance. Here is a snipped from the server.log file:
2003-05-09 01:03:04,504 ERROR
[org.jboss.ejb.StatefulSessionEnterpriseContext] l
ocked < 0
java.lang.Throwable
at
org.jboss.ejb.EnterpriseContext.unlock(EnterpriseContext.java:191)
at
org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor$InstanceSync
hronization.afterCompletion(StatefulSessionInstanceInterceptor.java:447)
at
org.jboss.tm.TransactionImpl.doAfterCompletion(TransactionImpl.java:1
331)
at
org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:395)
at
org.jboss.ejb.plugins.TxInterceptorCMT.endTransaction(TxInterceptorCM
T.java:369)
at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxIntercep
torCMT.java:253)
at
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:1
04)
-----------------------------------------------------------------
So JBoss could not store the entity because it could not unlock a bean instance because it's not locked.(locked < 0 ). As far as I understood this is checked by instance of EnterpriseContext class :
public void unlock() {
// release a lock
locked --;
if (locked <0) {
log.error("locked < 0", new Throwable());
}
}
But after a while, when JBoss needs to passivate the bean instance it gives us the same warning, that instance could not be passivate because of ctx lock.
I didn't understand that because it seems like my instance is not locked.....
We use session facade that controls entities. And we noticed that the entity cannot be stored because
StatefulSessionEnterpriseContext cannot unlock the instance.
Does anybody has any idea why this happens?
Thanks,
Pavlo