I'm using JBoss 2.4.1 with Tomcat 3.2.3. I've a simple StatefullSession bean that, in some places acts as stateless (offering to my pages some services).
 
I'm using only a method - List getCustomersByName( String name ) - that returns an ArrayList of javabens containing some data from my customers. The sequence is Search Page -> submit -> getCustomersByName -> Results Page. If I go back to Search Page and repeat process 20 or more times, JBoss giveme following error:
 
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: 
	javax.transaction.TransactionRolledbackException: Application Error: tried to enter Stateful bean with different transaction context; nested exception is: 
	java.rmi.RemoteException: Application Error: tried to enter Stateful bean with different transaction context
javax.transaction.TransactionRolledbackException: Application Error: tried to enter Stateful bean with different transaction context; nested exception is: 
	java.rmi.RemoteException: Application Error: tried to enter Stateful bean with different transaction context
java.rmi.RemoteException: Application Error: tried to enter Stateful bean with different transaction context
	at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:245)
	at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)
	at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
	at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker_Stub.invoke(Unknown Source)
	at org.jboss.ejb.plugins.jrmp.interfaces.GenericProxy.invokeContainer(GenericProxy.java:357)
	at org.jboss.ejb.plugins.jrmp.interfaces.StatefulSessionProxy.invoke(StatefulSessionProxy.java:136)
	at $Proxy3.getPacientesByCodigo(Unknown Source)
	at cadastroPaciente._0002fcadastroPaciente_0002fLocalizarPaciente_0005f_00030_00032_0002ejspLocalizarPaciente_0005f02_jsp_8._jspService(_0002fcadastroPaciente_0002fLocalizarPaciente_0005f_00030_00032_0002ejspLocalizarPaciente_0005f02_jsp_8.java:153)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.java:130)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:282)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
	at org.apache.tomcat.core.Handler.service(Handler.java:287)
	at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
	at org.apache.tomcat.facade.RequestDispatcherImpl.doForward(RequestDispatcherImpl.java:222)
	at org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:162)
	at br.com.econet.ms.portalHIV.cadastroPaciente.controller.LocalizarPaciente_01WebController.action(LocalizarPaciente_01WebController.java:56)
	at br.com.econet.common.controller.WebController.service(WebController.java:80)
	at cadastroPaciente._0002fcadastroPaciente_0002fLocalizarPaciente_0005f_00030_00031_0002ejspLocalizarPaciente_0005f01_jsp_7._jspService(_0002fcadastroPaciente_0002fLocalizarPaciente_0005f_00030_00031_0002ejspLocalizarPaciente_0005f01_jsp_7.java:160)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.java:130)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:282)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
	at org.apache.tomcat.core.Handler.service(Handler.java:287)
	at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
	at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812)
	at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
	at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
	at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
	at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
	at java.lang.Thread.run(Thread.java:484)
Thanks!
 

Reply via email to