0 Replies Latest reply on May 1, 2006 8:12 PM by kenrod

    Newbie: Best practices for using @Remove

      Dear All,

      I have a newbie question regarding the @Remove annotation.

      EJB3, being all lightweight and POJO, doesn't mandate a @Remove method on a SFSB or a SLSB. This makes it confusing when I need to declare it and when my clients need to call it. Specifically:

      1. Do I need it if my client uses the @EJB injection annotation to manage my SB?
      2. Do I need it if my client uses InitialContext.lookup to get my SLSB?
      3. Do I need it if my client uses InitialContext.lookup to get my SFSB?
      4. If my client never calls @Remove, will my SFSB just get passivated forever after my client dies, or will it eventually get garbage collected?
      5. Is there a 'best practice?'

      Regards,

      Richard.