org.openejb.core.stateful
Class RAFPassivater

java.lang.Object
  extended by org.openejb.core.stateful.RAFPassivater
All Implemented Interfaces:
PassivationStrategy

public class RAFPassivater
extends java.lang.Object
implements PassivationStrategy


Constructor Summary
RAFPassivater()
           
 
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).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RAFPassivater

public RAFPassivater()
Method Detail

init

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

passivate

public void passivate(java.util.Hashtable stateTable)
               throws SystemException
Description copied from interface: PassivationStrategy
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).

Specified by:
passivate in interface PassivationStrategy
Throws:
SystemException

activate

public java.lang.Object activate(java.lang.Object primaryKey)
                          throws SystemException
Description copied from interface: PassivationStrategy
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.

Specified by:
activate in interface PassivationStrategy
Throws:
SystemException


Copyright © 1999-2011 OpenEJB. All Rights Reserved.