org.openejb.core.stateful
Interface PassivationStrategy

All Known Implementing Classes:
RAFPassivater, SimplePassivater

public interface PassivationStrategy

This interface is implemented to provide a passivation strategy for stateful session beans.


Method Summary
 java.lang.Object activate(java.lang.Object primaryKey)
          The implementation must NOT use a separate thread to deserialize or otherwise retrieve the instance when this method is called.
 void init(java.util.Properties props)
           
 void passivate(java.util.Hashtable stateTable)
          If the PassivationStrategy operates is own thread for serializing beans to disk, then it must use the IntraVmCopyMonitor.prePassivationOperation() and IntraVmCopyMonitor.postPassivationOperation() methods to demarcate the start and end of serialization of bean instance(s).
 

Method Detail

init

void init(java.util.Properties props)
          throws SystemException
Throws:
SystemException - if an argument is invalid, e.g. a non-existing directory for passivation

passivate

void passivate(java.util.Hashtable stateTable)
               throws SystemException
If the PassivationStrategy operates is own thread for serializing beans to disk, then it must use the IntraVmCopyMonitor.prePassivationOperation() and IntraVmCopyMonitor.postPassivationOperation() methods to demarcate the start and end of serialization of bean instance(s).

Throws:
SystemException

activate

java.lang.Object activate(java.lang.Object primaryKey)
                          throws SystemException
The implementation must NOT use a separate thread to deserialize or otherwise retrieve the instance when this method is called. It must use the current thread, OR associate the calling thread's ThreadContext with the new thread that is deserializing the instance. The reason for this is that IvmContext are replaced with JndiEncArtivacts when serialized. These artifacts depend on the correct DeploymentInfo object being in the thread when its deserialized so that the artifact can replace itself with the correct IvmContext. Preserving the JNDI ENC context is required by the EJB 1.1 specification section 6.4.1.

Throws:
SystemException


Copyright © 1999-2011 OpenEJB. All Rights Reserved.