[
http://jira.jboss.com/jira/browse/JBSEAM-636?page=comments#action_12349599 ]
Daniel Young commented on JBSEAM-636:
-------------------------------------
Component.callDestroyMethod(instance) gets passed the instance of the object that was
unwrapped rather than the managing SFSB instance.
Perhaps it needs logic to say that if the component has an unwrap method, we need to use
not the "instance" that gets passed in, but to somehow navigate back to the
component instance that did the unwrapping in the first place.
Session-scoped SFSB that uses @Unwrap does not get destroyed
correctly on session timeout
-----------------------------------------------------------------------------------------
Key: JBSEAM-636
URL:
http://jira.jboss.com/jira/browse/JBSEAM-636
Project: JBoss Seam
Issue Type: Bug
Components: Core
Affects Versions: 1.1.0.GA
Reporter: Daniel Young
Attachments: UserManagerBean.java
If a SFSB Seam component in the session scope uses @Unwrap to expose a non-Seam
component, then an error occurs on session timeout:
java.lang.IllegalArgumentException: method not found: destroy for component: user (check
that it is
declared on the session bean business interface)
at org.jboss.seam.Component.callComponentMethod(Component.java:1809)
at org.jboss.seam.Component.callDestroyMethod(Component.java:1747)
at org.jboss.seam.contexts.Contexts.destroy(Contexts.java:189)
at org.jboss.seam.contexts.Lifecycle.endSession(Lifecycle.java:230)
at org.jboss.seam.servlet.SeamListener.sessionDestroyed(SeamListener.java:45)
at org.apache.catalina.session.StandardSession.expire(StandardSession.java:687)
at org.apache.catalina.session.StandardSession.isValid(StandardSession.java:579)
at org.apache.catalina.session.ManagerBase.processExpires(ManagerBase.java:678)
at org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:663)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1284)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBas
e.java:1569)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBas
e.java:1578)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBas
e.java:1578)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1558)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.NoSuchMethodException: entity.User.destroy()
at java.lang.Class.getMethod(Class.java:1581)
at org.jboss.seam.Component.callComponentMethod(Component.java:1788)
... 14 more
Seam is looking for a destroy() method on the object that is unwrapped, NOT on the
managing SFSB.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira