3 Replies Latest reply on Mar 4, 2004 7:01 AM by micke

    Concurrent calls on stateful session bean

    chetana_vir Newbie


      I have written two beans and deployed them succefully in a single jar file. Using a simple client program i called the first bean method where i am lookingup the second bean and passing the EJBObject (retrieved from the sessioncontext), as a parameter to the method in the second bean. Using this ejbobject from the second bean i am calling another method in the first bean. Calling beans in such a way i am getting the following exception. I could understand that since client and second bean at a time calling the first bean the exception is coming. If i am correct then how to make a bean to be called concurrently by two different clients at a time.

      Here is the exception i am getting in the jboss console i am using jboss-3.0.8 server.

      javax.ejb.EJBException: Application Error: no concurrent calls on stateful beans
      at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceIn
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:237)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:98)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:208)
      at org.jboss.ejb.StatefulSessionContainer.invoke(StatefulSessionContainer.java:380)
      at org.jboss.ejb.Container.invoke(Container.java:738)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:99)
      at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:102)
      at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:77)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:80)
      at org.jboss.proxy.ejb.StatefulSessionInterceptor.invoke(StatefulSessionInterceptor.java:117