com.arsdigita.persistence
Class SessionManager
java.lang.Object
com.arsdigita.persistence.SessionManager
- public class SessionManager
- extends Object
The SessionManager is a purely static class that allows users to
retrieve the current Session. It is in charge of initializing the
Session with the appropriate connection information. It currently
does not support initializing Sessions with more than one schema.
It also holds a reference to the global MetadataRoot. It is the
responsibility of the initialization to provide the JDBC
information and the MetadataRoot to the SessionManager.
- Version:
- $Revision: #17 $ $Date: 2004/04/07 $
- Author:
- Archit Shah
- See Also:
Initializer
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
versionId
public static final String versionId
- See Also:
- Constant Field Values
SessionManager
public SessionManager()
configure
public static void configure(String name,
MetadataRoot root,
ConnectionSource source)
open
public static Session open(String name,
MetadataRoot root,
ConnectionSource source)
getSession
public static Session getSession()
- Returns:
- the session named "default"
getSession
public static Session getSession(String name)
- Returns:
- The Session object for the current thread.
hasSession
public static boolean hasSession(String name)
- Returns:
- true if a session with the given name has been opened.
addBeforeFlushProcManager
public static void addBeforeFlushProcManager(EventProcessorManager manager)
- This method provides an indirect way for applications to
register
event
processors
with the session
object.
This works like so
addAfterFlushProcManager
public static void addAfterFlushProcManager(EventProcessorManager manager)
- See Also:
addBeforeFlushProcManager(EventProcessorManager)
getMetadataRoot
public static MetadataRoot getMetadataRoot()
- This returns the metadata root
- Returns:
- The global MetadataRoot.
Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:2337 UTC