Concurrent Access to Stateful Session Bean
sohaib Apr 9, 2003 7:22 AMArchiteure of my application is, my JSP pages call Stateful session bean which communicates with all the entity beans. While stress testing of my application on JBoss i have the following exception:
17:07:46,117 ERROR [LogInterceptor] EJBException:
javax.ejb.EJBException: Application Error: tried to enter Stateful bean with different transaction c
ontext, contextTx: TransactionImpl:XidImpl [FormatId=257, GlobalId=sultan//2717, BranchQual=], metho
dTx: TransactionImpl:XidImpl [FormatId=257, GlobalId=sultan//2718, BranchQual=]
at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceIn
terceptor.java:228)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:228)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:92)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:204)
at org.jboss.ejb.StatefulSessionContainer.invoke(StatefulSessionContainer.java:380)
at org.jboss.ejb.Container.invoke(Container.java:712)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:98)
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
)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
at $Proxy252.getBracket(Unknown Source)
at org.apache.jsp.BracketManagement$jsp._jspService(BracketManagement$jsp.java:347)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360)
at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:280)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:553)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1717)
at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:549)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1667)
at org.mortbay.http.HttpServer.service(HttpServer.java:862)
at org.jboss.jetty.Jetty.service(Jetty.java:497)
at org.mortbay.http.HttpConnection.service(HttpConnection.java:759)
at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:923)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:776)
at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:202)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455)
I have tested my application on WebLogic Platform and its working fine while stress testing. I have put vendor specific tag <Allow-concurrent-calls> in session bean descriptor to avoid such exceptions.
I want to ask that is there any tag for JBoss or what should i do to avoid the exception i have mentioned above.
Thanks.