[jboss-user] [EJB 3.0] - Stateful EJB injection in Servlet

jamesscott456 do-not-reply at jboss.com
Fri Jun 29 02:35:06 EDT 2007


Hi,

I?m using Jboss 5 Beta 2 and I?m injecting a SFSB into a Servlet. I?m using @Remove on last method to destroy the bean in the container. How do I inform the Servlet that the bean has been destroyed and it needs to create a new instance? When it tries to access the bean again I get the below.


javax.ejb.NoSuchEJBException: Could not find stateful bean: 4sg2sl-tgfdsv-f3i3qga5-1-f3iad4d1-4s
	at org.jboss.ejb3.cache.simple.SimpleStatefulCache.get(SimpleStatefulCache.java:382)
	at org.jboss.ejb3.cache.simple.SimpleStatefulCache.get(SimpleStatefulCache.java:367)
	at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:61)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
	at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:105)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:204)
	at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:100)
	at $Proxy89.addAssetWithMeta(Unknown Source)
	at au.com.bizresolve.test.TestAsset.processRequest(TestAsset.java:64)
	at au.com.bizresolve.test.TestAsset.doGet(TestAsset.java:117)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:174)
	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:86)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:238)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:624)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
	at java.lang.Thread.run(Unknown Source)

Thanks


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4059016#4059016

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4059016



More information about the jboss-user mailing list