13 Replies Latest reply on May 10, 2007 6:52 PM by Tony Mai

    Requirements for using @Startup annotation?

    Tony Mai Apprentice

      Hello,

      I have an application facade with an application scope that I'd like to be instantiated when Seam context begins. It seems to fit the criteria for using the @Startup annotation. Yet, Seam complained "The annotation @Startup is disallowed for this location".

      Here is my code:

      @Stateless
      @Scope(ScopeType.APPLICATION)
      public class TradeDeskManagerBean implements TradeDeskManager {
       @Startup
       public void init() throws ServiceLocatorException, AuthenticationException, JMSException {
      ...


      What is the requirements for using this @Startup annotation. The manual has only one paragraph referring this annotation.

      One a different note, do I even need to declare this facade as SLSB? This bean contains a context into another EJB container. How would Seam's concurrent model provide safe access into this "Singleton"?

      Thanks for your help.
      -tony