[jboss-user] [JBoss Seam] - Re: Basic Seam questions

ccanning do-not-reply at jboss.com
Fri Dec 15 14:49:05 EST 2006


@Destroy - Designates a destroy method that is called when a context ends and the component is being disposed. (Seam annotation)

@Remove - Applied to a business method of a stateful session bean class. Indicates that the stateful session bean is to be removed by the container after completion of the method. (EJB annotation)

If your SFSB lives beyond the seam context and you require cleanup, then this may be different from the EJB remove method which after a successful call indicates to the container that the bean can effectively be removed from the system. It is also recommended that resource cleanup, be done in the @PreDestroy method which is called before the @Remove method is called.

Hope this provides a little more clarity.

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

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



More information about the jboss-user mailing list