2 Replies Latest reply on Nov 13, 2007 3:58 PM by jacob.orshalick

    SFSB and performance question

    asookazian

      According to the EJB3 in Action book, passivation/activation (which involves serialization/deserialization) requires a lot of memory and CPU cycles.

      “when you store large objects in your instance variables, the server spends a lot of CPU cycles and memory in the serialization and deserialization process"
      from pg. 487

      seeing that Seam makes extensive use of SFSB's in the solutions for many conversationally scoped use cases, what is the recommendation for using "transient" keyword for instance variables to improve performance?

      There is not one reference to the keyword "transient" in the Seam 2.0.0.GA reference pdf...

      Haven't checked the distro example code.

        • 1. Re: SFSB and performance question

          From my understanding (and maybe a Seam team member can confirm this) all bijected attributes are disinjected (set to null) after method invocation. So any bijected attributes will not be included in the passivation of the session bean.

          For any non-bijected attributes, you could either use transient or set them to null using @PrePassivate. The @PostActivate annotation can be used to retrieve them on activation. Hope that helps.

          • 2. Re: SFSB and performance question

            Should have specified previously, but for clarity the disinjection only applies to @In attributes.