if(_logger.isLoggable(Level.FINEST)) {
_logger.log(Level.FINEST,"EntityContainer.passivateEJB(): context = (" +
ctx + ")");
}
EntityBean ejb = (EntityBean)context.getEJB();
EjbInvocation inv = super.createEjbInvocation(ejb, context);
inv.method = ejbPassivateMethod;
Object pkey = context.getPrimaryKey();
boolean wasPassivated = false;
// check state after locking ctx
if ( !context.isInState(BeanState.READY) )
return false;
try {
invocationManager.preInvoke(inv);
// remove EJB from readyStore
removeContextFromReadyStore(pkey, context);
// no Tx needed for ejbPassivate
ejb.ejbPassivate();
wasPassivated = true;
} catch ( Exception ex ) {
_logger.log(Level.FINE, "Exception in passivateEJB()", ex);
// Error during ejbStore/Passivate, discard bean: EJB2.0 18.3.3