1 Reply Latest reply on Dec 12, 2011 2:37 AM by Assen Todorov

    in one bean: @Stateful and @Model?

    Paul Schultz Newbie

      From the seam-examples: class Registrar has @Stateful and @Model (@RequestScoped) annotations.

      Does it make sense to have both annotations? Is this a stateful ejb bean and stateless because of @RequestScoped?

      Thanks in advance,

        • 1. Re: in one bean: @Stateful and @Model?
          Assen Todorov Newbie

          Hi Sascha,

          If this combination of annotations makes sense depends on your needs.
          It just means that on each request new fresh instance of the stateful bean Registrar is created and at the end of the request droped (i.e. freed for garbage collection).
          It also means that Registrar is accessible in EL by the name registrar.

          And no, it does not mean, that this bean is stateful and stateless at the same time ;-)