Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: cdi
    • Labels:
      None
    • Environment:

      Mac OS X via NetBeans 7.0 Beta

      Description

      In a standard JSF 2.0 application, managed beans annotated with CDI annotations are never instantiated. The following bean provides an example. The println statement in the constructor is never called, and a reference to #

      {cDIBean.helloWorld}

      in a facelet page yields a null. If you change the annotations to @javax.faces.ManagedBean then it works.

      import java.io.Serializable;
      import javax.enterprise.context.SessionScoped;
      import javax.enterprise.inject.Model;

      @Model
      @SessionScoped
      public class CDIBean implements Serializable {

      public CDIBean()

      { System.out.println("CDEBean(): " + this); }

      public String getHelloWorld()

      { return "Hello World!"; }

      }

      The attached file is a tgz of the whole project, which is in Maven webapp format. It was created with the NetBeans template for Maven web applications, although all the files in the WEB-INF directory had to be added manually.

        Issue Links

          Activity

          Hide
          alan94539 added a comment -

          Update: I upgraded my GF installation to b30 and the problem persists.

          Show
          alan94539 added a comment - Update: I upgraded my GF installation to b30 and the problem persists.
          Hide
          kumara added a comment -

          -> CDI to start with

          Show
          kumara added a comment - -> CDI to start with
          Hide
          Sivakumar Thyagarajan added a comment -

          Duplicate of 14842

          Show
          Sivakumar Thyagarajan added a comment - Duplicate of 14842
          Hide
          Sivakumar Thyagarajan added a comment -

          Duplicate of 14842.

          Show
          Sivakumar Thyagarajan added a comment - Duplicate of 14842.

            People

            • Assignee:
              Sivakumar Thyagarajan
              Reporter:
              alan94539
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: