0 Replies Latest reply on Nov 6, 2002 7:36 AM by Robert Stewart

    BMP EJB removed during passivation

    Robert Stewart Newbie

      I have an SFSB which reference a BMP entity bean. I find that for the entity EJB, unsetEntityContext is called immediately after ejbPassivate. See below:

      [11:18:45,398,LRUEnterpriseContextCachePolicy] Scheduling for passivation overaged bean StudentEJB with id = 0006875 - Cache size = 1
      [11:18:45,399,Default] StudentBean: ejbPassivate: called
      [11:18:45,400,Default] StudentBean: unsetEntityContext: called

      After both EJBs are passivated, the SFSB cannot reference the entity EJB and I recieve the exception below. How can I prevent the entity being removed during passivation?

      19cc84
      [11:43:39,267,StudentManagerEJB] TRANSACTION ROLLBACK EXCEPTION:
      javax.transaction.TransactionRolledbackException: Could not activate; nested exception is:
      java.rmi.ServerException: Could not get EJBObject; nested exception is:
      java.lang.NoSuchMethodException; nested exception is:
      java.rmi.NoSuchObjectException: Could not activate; nested exception is:
      java.rmi.ServerException: Could not get EJBObject; nested exception is:
      java.lang.NoSuchMethodException
      java.rmi.NoSuchObjectException: Could not activate; nested exception is:
      java.rmi.ServerException: Could not get EJBObject; nested exception is:
      java.lang.NoSuchMethodException
      at org.jboss.ejb.plugins.AbstractInstanceCache.get(AbstractInstanceCache.java:233)
      at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:193)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:138)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:347)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:100)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:170)
      at org.jboss.ejb.StatefulSessionContainer.invoke(StatefulSessionContainer.java:339)
      at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:410)
      at java.lang.reflect.Method.invoke(Native Method)
      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241)
      at sun.rmi.transport.Transport$1.run(Transport.java:152)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Transport.java:148)
      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:465)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:706)
      at java.lang.Thread.run(Thread.java:484)