title: Startup POJO On A Weld/Seam3 Application
body: <p>I'm trying to get a POJO starting on startup within my Weld/Seam3 application but not having much luck.  I've tried the following but none of them have worked:</p>
  
  <pre><code>@Singleton
  public class StartupJobs {
      @Inject
      private Logger log;
  
      public void onStartup(@Observes @Initialized ServletContextEvent event) {
          log.info("Starting startup jobs");
      }
  
      public void onStartupTwo(@Observes @Initialized WebApplication webApplication) {
          log.info("Starting startup jobs");
      }
  }
  </code></pre>
  
  <p>-</p>
  
  <pre><code>// Guessing this way is no good as I can't use the javax.ejb.Startup annotation here
  @ApplicationScoped
  public class StartupJobs {
      @Inject
      private Logger log;
  
      @PostConstruct
      public void onStartup() {
          log.info("Starting startup jobs");
      }
  }
  </code></pre>
  
  <p>But neither of those ways worked.  My log message was never raised.  As this application is run on Tomcat6 and I've had to add the "org.jboss.weld.environment.servlet.Listener" listener to my web.xml, I'm wondering if there's something that class raises that I could observe.  I didn't notice anything in particular though.</p>
  
  <p>Any clue what else I could try?</p>