title: Running a very simple Weld SE project in Eclipse
body: <p>I've been using Seam 2 (also started looking into Java EE 6) in my web apps and a couple of days ago I found out that Seam's CDI can be leveraged in an SE application with Weld. According to Weld's Documentation page for <a href="http://docs.jboss.org/weld/reference/latest/en-US/html/environments.html#weld-se" rel="nofollow noreferrer">Weld SE</a> the setup is trivial. So I tried to setup an Eclipse project with a single class HelloWeld, weld-se.jar and the log4j jars.</p>
  
  <pre><code>@Singleton
  public class HelloWeld
  {
      public void printHello(@Observes ContainerInitialized event, @Parameters List&lt;String&gt; parameters)
      {
          System.out.println("Hello Weld!");
      }
  }
  </code></pre>
  
  <p>I created a new Java Application Run Configuration and indicated <code>org.jboss.weld.environment.se.StartMain</code> as the main class. When I ran the project I found out, without any surprise what-so-ever, that HelloWeld was never called. All I got was a few log entries as an indication that Weld booted correctly:</p>
  
  <pre><code>11:54:39,397 INFO  [weld.Version] WELD-000900 1.0.1 (Final)
  11:54:39,428 INFO  [weld.Bootstrap] WELD-000101 Transactional services not available. Injection of @Inject UserTransaction not available. Transactional observers will be invoked synchronously.
  11:54:39,944 WARN  [model.InterceptionTypeRegistry] Class 'javax.ejb.PostActivate' not found, interception based on it is not enabled
  11:54:39,944 WARN  [model.InterceptionTypeRegistry] Class 'javax.ejb.PrePassivate' not found, interception based on it is not enabled
  </code></pre>
  
  <p>So what am I missing?</p>