2 Replies Latest reply on Oct 16, 2007 1:51 AM by Mohammad Norouzi

    SLSB in session scope?

    Mohammad Norouzi Novice

      Hi everybody,

      I am using JBoss Seam and I'm bot sure whether this is an issue of the Seam or EJB

      my question is What an Stateless session bean in a Session scope means?
      in other words, since a SLSB will loose its state after a client request has been done if that bean defined in a session scope what this means?

      thanks

        • 1. Re: SLSB in session scope?
          Andrew Rubinger Master

          I'm not sure what you're getting at; in what context did you read "Stateless session bean in a Session scope"?

          "mnrz" wrote:
          in other words, since a SLSB will loose its state after a client request has been done if that bean defined in a session scope what this means?


          To clarify, a SLSB will not lose its state upon completion of an invocation. Developers should be coding SLSBs to *not* have state, because they're returned to the pool to be shared with other clients. SFSBs, by comparision, may have state because its guaranteed that subsequent calls to the proxy object obtained from JNDI will result in an invocation to the same object in the server.

          S,
          ALR



          • 2. Re: SLSB in session scope?
            Mohammad Norouzi Novice

             

            in what context did you read "Stateless session bean in a Session scope"?


            thanks for your reply,

            as my previous post, I am using JBoss Seam, we can define an Stateless session bean with scope Session. I think (I'm not sure) this will result in setting that bean as an attribute in the session.
            anyway, by your comment that SLSB won't lose their states after completion a request, now the vague problem in my mind has been removed

            I think however in Seam we can define a SL bean with Session scope but because of the nature of the SLSBs it has no meaning, in other words, nothing will change whether you set the scope to session or any other scope.

            any way, thank you very much indeed