[jboss-user] [JBoss Seam] - Problem when destroying conversational SB
codest
do-not-reply at jboss.com
Thu Jun 7 11:01:36 EDT 2007
Hi all,
with a certain component I always get the following exception, even though I followed all the guidance in http://wiki.jboss.org/wiki/Wiki.jsp?page=JbossTimeoutSettingForSeam.
| Could not destroy component: interview
| javax.ejb.EJBNoSuchObjectException: Could not find Stateful bean: 3j001-6m3jlm-f2n4k957-1-f2nc99l9-2c
| at org.jboss.ejb3.cache.simple.SimpleStatefulCache.get(SimpleStatefulCache.java:268)
| at org.jboss.ejb3.stateful.StatefulRemoveInterceptor.removeSession(StatefulRemoveInterceptor.java:127)
| at org.jboss.ejb3.stateful.StatefulRemoveInterceptor.invoke(StatefulRemoveInterceptor.java:87)
| 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:102)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
| 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:203)
| at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
| at $Proxy1051.destroy(Unknown Source)
|
|
A strange thing I noticed is, that also there exists only one interview component in conversation scope (checked via debug page), every log message appears two times:
| 16:38:46,827 INFO [InterviewAction] Creating class de.codest.easyCV.logic.InterviewAction - hashCode: 23232015
| 16:38:46,827 INFO [InterviewAction] Creating class de.codest.easyCV.logic.InterviewAction - hashCode: 23232015
| ...
| 16:38:47,620 INFO [InterviewAction] Started interview.
| 16:38:47,620 INFO [InterviewAction] Started interview.
| ...
| 16:44:47,780 INFO [InterviewAction] Destroying class de.codest.easyCV.logic.InterviewAction - 6459176
| 16:44:47,780 INFO [InterviewAction] Destroying class de.codest.easyCV.logic.InterviewAction - 6459176
| 16:44:47,781 INFO [InterviewAction] EMERGENY SENDING profile to mail at somewhere.com
| 16:44:47,781 INFO [InterviewAction] EMERGENY SENDING profile to mail at somewhere.com
| 16:44:47,795 WARN [Contexts] Could not destroy component: interview
| javax.ejb.EJBNoSuchObjectException: Could not find Stateful bean: 3j001-6m3jlm-f2n4k957-1-f2nc99l9-2c
| at org.jboss.ejb3.cache.simple.SimpleStatefulCache.get(SimpleStatefulCache.java:268)
| ...
|
But the exception shows only once.
This is the bean code (excerpt):
| @Stateful
| @Name("interview")
| @Scope(ScopeType.CONVERSATION)
| @Conversational(ifNotBegunOutcome="home")
| @CacheConfig(idleTimeoutSeconds=1800)
|
| public class InterviewAction implements Interview {
|
| ProfileInterface profile;
|
| @Create
| public void init() {
| log.info("Creating "+this.getClass()+" - "+this.hashCode());
| }
|
|
| @Begin(ifOutcome="startInterview")
| public String startInterview() {
| ....
|
| log.info("Started interview.");
| state = Status.Interviewing;
| return "startInterview";
| }
|
| @Remove @Destroy
| /** This method is used to send the input data (= profile) by mail to
| the user if the session should expire unexpectedly **/
| public void destroy() {
| log.info("Destroying "+this.getClass()+" - "+this.hashCode());
| // emergency sending of profile when destroyed from interview
| state
| if (isInterviewing()) {
| log.info("EMERGENY SENDING profile to "+getEmail());
| // forced interrupt
| profile.interrupt();
| sendProfileToUser();
| }
| }
|
So there should be sent a mail, when the bean is destroyed from the "interviewing" state, but this doesn't happen (though it did already work sometimes).
If you need further information I'll be glad to give it to you. Thanks in advance for any comments and help.
Regards,
Jörg
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4052190#4052190
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4052190
More information about the jboss-user
mailing list