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

    SessionScoped producer method inside RequestScoped object

    roflchap

      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.