2 Replies Latest reply on Mar 18, 2010 5:25 PM by purecharger

    Component annotated with @Startup is instantiated twice

    purecharger

      Any component I mark with the @Startup annotation is instantiated twice when Seam is initialized. Here is the most simple case:




      @Startup
      @Scope(APPLICATION)
      @Name("startupTest")
      public class SeamComponentStartupTest {
          
          @Logger
          private static Log logger;
      
          private static AtomicInteger counter = new AtomicInteger(1);
          
          public SeamComponentStartupTest() {
              logger.debug("number of times instantiated: {0}", counter.getAndIncrement());
          }
      }
      



      produces:


      2010-03-17 10:57:24,210 DEBUG [SeamComponentStartupTest] (HDScanner) number of times instantiated: 1
      2010-03-17 10:57:24,211 DEBUG [SeamComponentStartupTest] (HDScanner) number of times instantiated: 2
      



      No EL expressions or bijection into another component is referencing this component.


      Known bug? A search a JIRA produces nothing.