org.openejb.core.stateful
Class SimplePassivater
java.lang.Object
org.openejb.core.stateful.SimplePassivater
- All Implemented Interfaces:
- PassivationStrategy
public class SimplePassivater
- extends java.lang.Object
- implements PassivationStrategy
- Version:
- $Revision: 2487 $ $Date: 2006-02-22 14:05:03 -0800 (Wed, 22 Feb 2006) $
- Author:
- Richard Monson-Haefel, David Blevins
Field Summary |
protected static org.apache.log4j.Category |
logger
|
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 hash)
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). |
void |
passivate(java.lang.Object primaryKey,
java.lang.Object state)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected static final org.apache.log4j.Category logger
SimplePassivater
public SimplePassivater()
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.lang.Object primaryKey,
java.lang.Object state)
throws SystemException
- Throws:
SystemException
passivate
public void passivate(java.util.Hashtable hash)
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
- Parameters:
primaryKey
-
- Returns:
- object
- Throws:
SystemException
- If there is an problem retrieving the instance from the .ser file.
Copyright © 1999-2011 OpenEJB. All Rights Reserved.