"sannegrinovero" wrote : Our application has some Stateful Beans with 1 single 
@Destroy and multiple @Remove; toying since some days JBoss Tools i get this 
error:
  | Duplicate @Remove method "methodname".

So, this is probably a bug with JBoss Tools.

anonymous wrote : The warning from the tool makes sense as "This method will be 
called when Seam destroys the session context".. How could Seam know which 
method to call?

Seam doesn't call the @Remove, the EJB container does - Seam asks for the 
Session to be destroyed, and the EJB container can act on it.


I'm quite confused by what you are saying, but what *happens* is this:

You call a method annotated @Remove, after the completion of the this method, 
the container destroys the SFSB, executing any callbacks (@Destroy methods are 
all registered as callbacks) before it does so.

anonymous wrote : EJB3 uses the single @Destroy as a callback to cleanup, and 
is triggered by one of the @Remove;I think Seam is abusing this to call a 
@Remove (expecting it to be single) to trigger the EJB destroy.. is that right?

No, Seam doesn't call methods @Remove, you do

anonymous wrote :  couldn't seam directly ask EJB to trigger destruction?

When?

anonymous wrote :  or have another annotation, an extension to @Remove, single 
on a bean, so to know which one to call?

Why?

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118258
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to