1 Reply Latest reply on Sep 5, 2005 2:52 AM by momo0

    Cyclic SessionBean creation : JBOSS 4.0.2

    Chetan Aggarwal Newbie

      Hi ,

      I have two stateless session beans whose code is :

      public class A extends mySessionBase{

      public setSessionContext(SessionContext c){

      //Look Stateless Session Bean B home here.

      RemoteB r = homeB.create();
      }
      }

      public class B extends mySessionBase{

      public setSessionContext(SessionContext c){

      //Look Stateless Session Bean A home here.

      RemoteA r = homeA.create();
      }
      }


      Means i am creating instance of Session bean A in B'setSessionContext and instance of Session bean B in A'setSessionContext.

      This is working fine in JBOSS 4.0.1

      But in JBOSS 4.0.2 , Its giving following error:

      javax.ejb.TransactionRolledbackLocalException: Could not instantiate bean; CausedByException is:
      Could not instantiate bean
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:232)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:146)
      at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:116)
      at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:121)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93)
      at org.jboss.ejb.SessionContainer.internalInvokeHome(SessionContainer.java:613)
      at org.jboss.ejb.Container.invoke(Container.java:894)
      at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:342)
      at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:118)
      at $Proxy186.create(Unknown Source)
      at com.adp.ebs.flt.ejb.session.UserManagerBean.setSessionContext(UserManagerBean.java:1975)
      at org.jboss.ejb.StatelessSessionEnterpriseContext.(StatelessSessionEnterpriseContext.java:52)
      at org.jboss.ejb.plugins.StatelessSessionInstancePool.create(StatelessSessionInstancePool.java:35)
      at org.jboss.ejb.plugins.AbstractInstancePool.get(AbstractInstancePool.java:161)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invokeHome(StatelessSessionInstanceInterceptor.java:78)
      at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:90)
      at org.jboss.ejb.plugins.CallValidationInterceptor.invokeHome(CallValidationInterceptor.java:41)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:109)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:146)
      at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:116)
      at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:121)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93)
      at org.jboss.ejb.SessionContainer.internalInvokeHome(SessionContainer.java:613)
      at org.jboss.ejb.Container.invoke(Container.java:894)
      at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:342)
      at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:118)
      at $Proxy173.create(Unknown Source)
      at com.adp.ebs.flt.ejb.session.ClientManagerBean.setSessionContext(ClientManagerBean.java:5398)


      Please suggest something.
      Thanks
      Chetan