org.openejb.core.stateful
Class RAFPassivater
java.lang.Object
org.openejb.core.stateful.RAFPassivater
- All Implemented Interfaces:
- PassivationStrategy
public class RAFPassivater
- extends Object
- implements PassivationStrategy
Method Summary |
Object |
activate(Object primaryKey)
The implementation must NOT use a separate thread to deserialize or otherwise
retrieve the instance when this method is called. |
void |
init(Properties props)
|
void |
passivate(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 |
RAFPassivater
public RAFPassivater()
init
public void init(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(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 Object activate(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-2012 OpenEJB. All Rights Reserved.