|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager
public class StatefulSessionFilePersistenceManager
A file-based stateful session bean persistence manager.
Reads and writes session bean objects to files by using the standard Java serialization mechanism. Passivated state files are stored under: jboss-server-data-dir/storeDirectoryName/ejb-name-unique-id. Since ejb-name is not unique across deployments we generate a unique-id to make sure that beans with the same EJB name do not collide.
Field Summary |
---|
Fields inherited from interface org.jboss.ejb3.cache.simple.StatefulSessionPersistenceManager |
---|
DEFAULT_STORE_DIRECTORY_NAME, log |
Constructor Summary | |
---|---|
StatefulSessionFilePersistenceManager()
|
Method Summary | |
---|---|
StatefulBeanContext |
activateSession(Object id)
Restores session state from the serialized file & invokes SessionBean.ejbActivate() on the target bean. |
void |
destroy()
Purge any data in the store, and then the store directory too. |
List<StatefulBeanContext> |
getPassivatedBeans()
|
boolean |
getPurgeEnabled()
Get the stale session state purge enabled flag. |
File |
getStoreDirectory()
Returns the directory used to store session passivation state files. |
String |
getStoreDirectoryName()
Get the sub-directory name under the server data directory where session data is stored. |
void |
initialize(Container con)
Setup the session data storage directory. |
void |
passivateSession(StatefulBeanContext ctx)
Invokes SessionBean.ejbPassivate() on the target bean and saves the
state of the session to a file. |
void |
purgeAllSessionData()
Removes any state files left in the storgage directory. |
void |
removePassivated(Object id)
Removes the saved state file (if any) for the given session id. |
void |
setContainer(Container con)
|
void |
setPurgeEnabled(boolean flag)
Set the stale session state purge enabled flag. |
void |
setStoreDirectoryName(String dirName)
Set the sub-directory name under the server data directory where session data will be stored. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StatefulSessionFilePersistenceManager()
Method Detail |
---|
public void setStoreDirectoryName(String dirName)
dirName
- A sub-directory name.public String getStoreDirectoryName()
setStoreDirectoryName(java.lang.String)
public void setPurgeEnabled(boolean flag)
flag
- The toggle flag to enable or disable purging.public boolean getPurgeEnabled()
public File getStoreDirectory()
public void setContainer(Container con)
public void initialize(Container con) throws Exception
Purges any existing session data found.
initialize
in interface StatefulSessionPersistenceManager
Exception
public void purgeAllSessionData()
public void destroy() throws Exception
destroy
in interface StatefulSessionPersistenceManager
Exception
public StatefulBeanContext activateSession(Object id)
SessionBean.ejbActivate()
on the target bean.
activateSession
in interface StatefulSessionPersistenceManager
public List<StatefulBeanContext> getPassivatedBeans()
getPassivatedBeans
in interface StatefulSessionPersistenceManager
public void passivateSession(StatefulBeanContext ctx)
SessionBean.ejbPassivate()
on the target bean and saves the
state of the session to a file.
passivateSession
in interface StatefulSessionPersistenceManager
public void removePassivated(Object id)
removePassivated
in interface StatefulSessionPersistenceManager
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |