4 Replies Latest reply on Dec 23, 2006 10:08 PM by norman.richards

    Question on SLSB w/Seam

    mdarr


      I have what may be a small question on the use of SLSB.

      I noticed in the examples you were injecting Session objects into the SLSBs.

      I thought with SLSB you could only guarantee you had that object for the time of the method request?

      So is it because these are session objects that this works or does Seam make it so that yu have a hold longer, or am i just totally wrong.

        • 1. Re: Question on SLSB w/Seam

          Seam injection isn't the simplistic creation-time configuration like other IOC frameworks. Seam injection happens at invocation time. Instead of thinking of injection, it might be easier to think of it as a link to contextual to state the Seam keeps current.

          • 2. Re: Question on SLSB w/Seam
            mdarr


            ahh cool.

            So then my objects that are at the class level are safe then??

            Is it the same for outjection as well?

            • 3. Re: Question on SLSB w/Seam

              Injection and outjection occur at every invocation. If you change an outjected value during an invocation, the change will be outjected to the appropriate context after the invocation.

              • 4. Re: Question on SLSB w/Seam

                So... Yes, injected objects are "safe" in a SLSB because they are injected at the beginning of each invocation. (and they are actually disinjected after the request, so there is no leakage)