|
Oracle Application Server TopLink API Reference 10g (9.0.4.3) B10491-02 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
oracle.toplink.publicinterface.Session
oracle.toplink.threetier.ClientSession
Purpose: Acts as a client to the server session.
Description: This session is brokered by the server session for use in three-tiered applications. It is used to store the context of the connection, i.e. the login to be used for this cleint. This allows each client connected to the server to contain its own user login.
Responsibilities:
This class is an implementation of Session. Please refer to that class for a full API. The public interface should be used.
Server, UnitOfWork, Serialized Form| Field Summary |
| Fields inherited from class oracle.toplink.publicinterface.Session |
isInBroker, Logging, usesOldCommit |
| Fields inherited from interface oracle.toplink.remotecommand.CommandProcessor |
LOG_DEBUG, LOG_ERROR, LOG_INFO, LOG_WARNING |
| Constructor Summary | |
ClientSession(oracle.toplink.threetier.ServerSession parent, ConnectionPolicy connectionPolicy)INTERNAL: Create and return a new client session. | |
| Method Summary | |
void |
afterTransaction(boolean committed, boolean isExternalTransaction)INTERNAL: Called after transaction is completed (committed or rolled back) |
void |
basicBeginTransaction()INTERNAL: This is internal to the unit of work and should never be called otherwise. |
void |
basicCommitTransaction()INTERNAL: This is internal to the unit of work and should not be called otherwise. |
void |
basicRollbackTransaction()INTERNAL: This is internal to the unit of work and should not be called otherwise. |
void |
connect()INTERNAL: Connect the session only (this must be the write connection as the read is shared). |
boolean |
containsQuery(java.lang.String queryName)INTERNAL: Was PUBLIC: customer will be redirected to Session. |
void |
disconnect()INTERNAL: Disconnect the accessor only (this must be the write connection as the read is shared). |
oracle.toplink.internal.databaseaccess.Accessor |
getAccessor()INTERNAL: Return the read or write connection depending on the transaction state. |
CacheSynchronizationManager |
getCacheSynchronizationManager()INTERNAL: Was PUBLIC: customer will be redirected to Session. |
CommandManager |
getCommandManager()INTERNAL: Return the manager that allows this processor to receive or propagate commands from/to TopLink cluster |
ConnectionPolicy |
getConnectionPolicy()INTERNAL: Return the connection policy. |
java.util.Hashtable |
getDescriptors()INTERNAL: Was PUBLIC: customer will be redirected to Session. |
oracle.toplink.internal.identitymaps.IdentityMapManager |
getIdentityMapManager()INTERNAL: required public for testing access. |
oracle.toplink.threetier.ServerSession |
getParent()INTERNAL: Return the parent. |
DatabaseQuery |
getQuery(java.lang.String name)INTERNAL: Was PUBLIC: customer will be redirected to Session. |
DatabaseQuery |
getQuery(java.lang.String name, java.util.Vector args)INTERNAL: |
oracle.toplink.internal.sequencing.Sequencing |
getSequencing()INTERNAL: Return the Sequencing object used by the session. |
oracle.toplink.internal.databaseaccess.Accessor |
getWriteConnection()INTERNAL: Return the connection to be used for database modification. |
boolean |
hasCacheSynchronizationManager()INTERNAL: Was PUBLIC: customer will be redirected to Session. |
void |
initializeAllIdentityMaps()INTERNAL: Was PUBLIC: customer will be redirected to Session. |
void |
initializeIdentityMap(java.lang.Class theClass)INTERNAL: Was PUBLIC: customer will be redirected to Session. |
void |
initializeIdentityMaps()INTERNAL: Was PUBLIC: customer will be redirected to Session. |
void |
initializeSequencing()INTERNAL: was ADVANCED: Creates sequencing object for the session. |
java.lang.Object |
internalExecuteQuery(DatabaseQuery query, DatabaseRow databaseRow)INTERNAL: Return the results from exeucting the database query. |
boolean |
isActive()INTERNAL: Was PUBLIC: customer will be redirected to Session. |
boolean |
isClientSession()INTERNAL: Return if this session is a client session. |
boolean |
isConnected()INTERNAL: Was PUBLIC: customer will be redirected to Session. |
void |
release()INTERNAL: Was PUBLIC: customer will be redirected to Session. |
void |
setWriteConnection(oracle.toplink.internal.databaseaccess.Accessor writeConnection)INTERNAL: Set the connection to be used for database modification. |
boolean |
shouldPropagateChanges()INTERNAL: Return whether changes should be propagated to TopLink cluster. |
java.lang.String |
toString()INTERNAL: Print the connection status with the session. |
| Methods inherited from class oracle.toplink.publicinterface.Session |
acquireIdentityMapDeferredLock, acquireIdentityMapLock, acquireNonSynchronizedUnitOfWork, acquireUnitOfWork, addAlias, addAliasesFromProject, addQuery, beginTransaction, clearIntegrityChecker, clearLastDescriptorAccessed, clearProfile, clone, commitTransaction, compareObjects, compareObjectsDontMatch, containsObjectInIdentityMap, containsObjectInIdentityMap, copyObject, copyObject, copyReadOnlyClasses, decrementMergesPending, deleteAllObjects, deleteAllObjects, deleteObject, doesObjectExist, dontLogMessages, dontLogSQL, endOperationProfile, executeCall, executeNonSelectingCall, executeNonSelectingSQL, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeSelectingCall, executeSQL, getAccessor, getAccessor, getActiveSession, getActiveUnitOfWork, getAliasDescriptors, getAllFromIdentityMap, getAllFromIdentityMap, getAllQueries, getBroker, getCommitManager, getDefaultReadOnlyClasses, getDescriptor, getDescriptor, getDescriptorForAlias, getEventManager, getExceptionHandler, getExceptionHandlerClass, getExternalTransactionController, getExternalTransactionControllerClass, getFromIdentityMap, getFromIdentityMap, getFromIdentityMap, getFromIdentityMap, getFromIdentityMapWithDeferredLock, getIntegrityChecker, getLog, getLoggingStream, getLogin, getName, getNextQueryId, getNextSequenceNumberValue, getNumberOfActiveUnitsOfWork, getPlatform, getPlatform, getProfiler, getProject, getProperties, getProperty, getQueries, getSessionForClass, getSessionLog, getTransactionMutex, getWrapper, getWriteLockValue, getWriteLockValue, handleException, hasBroker, hasDescriptor, hasExceptionHandler, hasExternalTransactionController, incrementMergesPending, insertObject, isBroker, isClassReadOnly, isDatabaseSession, isDistributedSession, isInBroker, isInProfile, isInTransaction, isProxySession, isRemoteSession, isRemoteUnitOfWork, isServerSession, isSessionBroker, isUnitOfWork, keyFromObject, log, logDebug, logDebug, logDebug, logDebug, logException, logMessage, logMessage, logMessage, logMessage, logMessage, logMessages, logSQL, mergesPending, printIdentityMap, printIdentityMaps, processCommand, putInIdentityMap, putInIdentityMap, putInIdentityMap, readAllObjects, readAllObjects, readAllObjects, readAllObjects, readObject, readObject, readObject, readObject, readObject, refreshAndLockObject, refreshAndLockObject, refreshObject, releaseUnitOfWork, removeFromIdentityMap, removeFromIdentityMap, removeProperty, removeQuery, removeQuery, rollbackTransaction, setAccessor, setAliasDescriptors, setBroker, setCacheSynchronizationManager, setCommandManager, setCommitManager, setEventManager, setExceptionHandler, setExceptionHandlerClass, setExternalTransactionController, setExternalTransactionControllerClass, setIntegrityChecker, setLog, setLoggingStream, setLogin, setName, setProfiler, setProject, setProperties, setProperty, setSessionLog, setShouldLogMessages, setShouldLogSQL, setShouldPropagateChanges, setUseOldCommit, setWasJTSTransactionInternallyStarted, setWrapper, shouldLogMessages, shouldLogMessages, shouldLogSQL, startOperationProfile, unwrapObject, updatedCacheKeyInIdentityMap, updateObject, updateWriteLockValue, updateWriteLockValue, usesExternalTransactionController, usesOldCommit, validateCache, verifyDelete, wasJTSTransactionInternallyStarted, wrapObject, writeObject |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public ClientSession(oracle.toplink.threetier.ServerSession parent, ConnectionPolicy connectionPolicy)
| Method Detail |
public void afterTransaction(boolean committed,
boolean isExternalTransaction)
afterTransaction in class oracle.toplink.publicinterface.Sessionpublic void basicBeginTransaction()
public void basicCommitTransaction()
public void basicRollbackTransaction()
public void connect()
throws DatabaseException
DatabaseExceptionpublic boolean containsQuery(java.lang.String queryName)
Session. Return true if the pre-defined query is defined on the session.containsQuery in interface SessioncontainsQuery in class oracle.toplink.publicinterface.Session
public void disconnect()
throws DatabaseException
DatabaseExceptionpublic oracle.toplink.internal.databaseaccess.Accessor getAccessor()
getAccessor in class oracle.toplink.publicinterface.Sessionpublic CacheSynchronizationManager getCacheSynchronizationManager()
Session. Returns the Synchronization Policy for this session.getCacheSynchronizationManager in interface SessiongetCacheSynchronizationManager in class oracle.toplink.publicinterface.Sessionpublic ConnectionPolicy getConnectionPolicy()
public java.util.Hashtable getDescriptors()
Session. Return all registered descriptors. The clients session inherits its parent's descriptors.getDescriptors in interface SessiongetDescriptors in class oracle.toplink.publicinterface.Sessionpublic oracle.toplink.internal.identitymaps.IdentityMapManager getIdentityMapManager()
getIdentityMapManager in class oracle.toplink.publicinterface.Sessionpublic oracle.toplink.threetier.ServerSession getParent()
public DatabaseQuery getQuery(java.lang.String name)
Session. Return the query from the session pre-defined queries with the given name. This allows for common queries to be pre-defined, reused and executed by name.getQuery in interface SessiongetQuery in class oracle.toplink.publicinterface.Session
public DatabaseQuery getQuery(java.lang.String name,
java.util.Vector args)
getQuery in class oracle.toplink.publicinterface.SessionSession.getQuery(String)public void initializeSequencing()
public oracle.toplink.internal.sequencing.Sequencing getSequencing()
getSequencing in class oracle.toplink.publicinterface.Sessionpublic oracle.toplink.internal.databaseaccess.Accessor getWriteConnection()
public boolean hasCacheSynchronizationManager()
Session. Return true if a cache synchronisation manager exists.hasCacheSynchronizationManager in interface SessionhasCacheSynchronizationManager in class oracle.toplink.publicinterface.Sessionpublic void initializeAllIdentityMaps()
Session. Reset the entire object cache. This method blows away both this session's and its parents caches, including the server cache or any other cache. This throws away any objects that have been read in. Extream caution should be used before doing this because object identity will no longer be maintained for any objects currently read in. This should only be called if the application knows that it no longer has references to object held in the cache.initializeAllIdentityMaps in interface SessioninitializeAllIdentityMaps in class oracle.toplink.publicinterface.Sessionpublic void initializeIdentityMap(java.lang.Class theClass)
Session. The client session does not have a local indentity map, so this has no effect and should not be used.initializeIdentityMap in interface SessioninitializeIdentityMap in class oracle.toplink.publicinterface.Sessionpublic void initializeIdentityMaps()
Session. The client session does not have a local indentity map, so this has no effect and should not be used.initializeIdentityMaps in interface SessioninitializeIdentityMaps in class oracle.toplink.publicinterface.Session
public java.lang.Object internalExecuteQuery(DatabaseQuery query,
DatabaseRow databaseRow)
throws DatabaseException
internalExecuteQuery in class oracle.toplink.publicinterface.SessionDatabaseExceptionpublic boolean isActive()
Session. Return if the client session is actvie (has not been released).public boolean isClientSession()
isClientSession in interface SessionisClientSession in class oracle.toplink.publicinterface.Sessionpublic boolean isConnected()
Session. Return if this session has been connected to the database.isConnected in interface SessionisConnected in class oracle.toplink.publicinterface.Session
public void release()
throws DatabaseException
Session. Release the client session. This releases the client session back to it server. Normally this will logout of the client session's connection, and allow the client session to garbage collect.release in interface Sessionrelease in class oracle.toplink.publicinterface.SessionDatabaseExceptionpublic void setWriteConnection(oracle.toplink.internal.databaseaccess.Accessor writeConnection)
public java.lang.String toString()
toString in class oracle.toplink.publicinterface.Sessionpublic CommandManager getCommandManager()
getCommandManager in interface SessiongetCommandManager in class oracle.toplink.publicinterface.Session#CommandManagerpublic boolean shouldPropagateChanges()
shouldPropagateChanges in class oracle.toplink.publicinterface.SessionSession.setCommandManager(CommandManager)
|
| |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||