Error in activate method with ejb session stateful - Websphere

This is a discussion on Error in activate method with ejb session stateful - Websphere ; Hi We are migrating a application from jboss to was 5.1. We have problems with activate/passivate. When the applications goto reactivate any object can't de-serealized. We are trying but need set the stateful timeout at lower value (wait 10 minuts ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Error in activate method with ejb session stateful

  1. Error in activate method with ejb session stateful

    Hi

    We are migrating a application from jboss to was 5.1. We have problems with activate/passivate. When the applications goto reactivate any object can't de-serealized. We are trying but need set the stateful timeout at lower value (wait 10 minuts is so bored).

    How to can we set the timeout for passivate to 1 o 2 minuts???

    Thanks!



  2. Re: Error in activate method with ejb session stateful

    A bean timing out does not cause it to passivate. It merely gets reaped the next time the stale bean reaper comes around.

    If you want to force a passivation in order to figure out where the passivation trouble lies, the most straightforward way is to set the bean cache options for that bean to "activate at: transaction" and invoke a method on this bean that has its transaction attribute set to Requires_New. (The default for stateful beans is "activate at: once", which means the bean is never passivated until the number of active beans exceeds the cache size, which defaults to 2053.) Setting the activate at to transaction will cause the container to passivate the bean at the end of the transaction started by the method you invoke.

    WAS just uses normal Java serialization to passivate SFSBs. It writes each SFSB to a uniquely-named file in the TEMP directory. Obviously the state variables in your SFSB must be serializable, as required by the EJB spec. Not sure why it would have worked on JBoss but not in WAS, since passivation of SFSBs is supposed to be done with normal Java serialization.

    Hope this helps.

    gbas13@gmail.com wrote:
    > Hi
    >
    > We are migrating a application from jboss to was 5.1. We have problems with activate/passivate. When the applications goto reactivate any object can't de-serealized. We are trying but need set the stateful timeout at lower value (wait 10 minuts is so bored).
    >
    > How to can we set the timeout for passivate to 1 o 2 minuts???
    >
    > Thanks!
    >
    >


+ Reply to Thread