0 Replies Latest reply on Jul 17, 2011 6:48 AM by Ro Chap

    SessionScoped producer method inside RequestScoped object

    Ro Chap Newbie

      Hi,


      I was wondering if the following code snippet is valid:


      @RequestScoped
      public class Foo implements Serializable {
      
       @Produces
       @Preferred
       @SessionScoped
       public Bar getBar() {
        //...
       }
      
      }




      If so, does CDI promote the scope of the Foo component to SessionScoped?


      Thanks in advance.