Oracle Fusion Middleware Java API Reference for Oracle TopLink
11g Release 1 (11.1.1)

B32476-03

oracle.toplink.remote
Class DistributedSession

java.lang.Object
  extended by oracle.toplink.internal.sessions.AbstractSession
      extended by oracle.toplink.remote.DistributedSession
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, CommandProcessor, Session
Direct Known Subclasses:
RemoteSession

public abstract class DistributedSession
extends oracle.toplink.internal.sessions.AbstractSession

Purpose: Super class to all remote client session's.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface oracle.toplink.remotecommand.CommandProcessor
LOG_DEBUG, LOG_ERROR, LOG_INFO, LOG_WARNING
 
Constructor Summary
DistributedSession(oracle.toplink.internal.remote.RemoteConnection remoteConnection)
          Creates a DistributedSession.
 
Method Summary
abstract  oracle.toplink.internal.sessions.UnitOfWorkImpl acquireUnitOfWork()
          Return a unit of work for this session.
 void beginTransaction()
          Start a transaction on the server.
 void commitTransaction()
          Commit a transaction on the server.
abstract  java.lang.Object executeQuery(DatabaseQuery query)
          Execute the database query.
 java.lang.Object executeQuery(java.lang.String queryName)
          Execute the pre-defined query by name and return the result.
 java.lang.Object executeQuery(java.lang.String queryName, java.lang.Class domainClass)
          Execute the pre-defined query by name and return the result.
 java.lang.Object executeQuery(java.lang.String queryName, java.lang.Class domainClass, java.util.Vector argumentValues)
          Execute the pre-defined query by name and return the result.
 java.lang.Object executeQuery(java.lang.String queryName, java.util.Vector argumentValues)
          Execute the pre-defined query by name and return the result.
 boolean isConnected()
          Return if this session is connected to the server.
 void release()
          Logout the session, close the remote connection and release the hold resources
 void rollbackTransaction()
          Rollback a transaction on the server.
 java.lang.String toString()
          Avoid printing the accessor and platform.
 
Methods inherited from class oracle.toplink.internal.sessions.AbstractSession
addAlias, addQuery, clearIntegrityChecker, clearProfile, compareObjectsDontMatch, config, containsObjectInIdentityMap, containsObjectInIdentityMap, containsQuery, copyObject, copyObject, deleteAllObjects, deleteAllObjects, deleteObject, doesObjectExist, dontLogMessages, executeNonSelectingCall, executeNonSelectingSQL, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeSelectingCall, executeSQL, fine, finer, finest, getActiveSession, getActiveUnitOfWork, getAllFromIdentityMap, getAllFromIdentityMap, getAllFromIdentityMap, getAllQueries, getAsOfClause, getCacheSynchronizationManager, getClassDescriptor, getClassDescriptor, getClassDescriptorForAlias, getCommandManager, getDatasourceLogin, getDescriptor, getDescriptorForAlias, getDescriptors, getEjbqlPlaceHolderQueries, getEventManager, getExceptionHandler, getExternalTransactionController, getFromIdentityMap, getFromIdentityMap, getFromIdentityMap, getFromIdentityMap, getFromIdentityMap, getIdentityMapAccessor, getIntegrityChecker, getLog, getLogin, getLogLevel, getLogLevel, getName, getNextSequenceNumberValue, getProfiler, getProject, getProperties, getProperty, getQueries, getQuery, getQuery, getSessionLog, getWriteLockValue, getWriteLockValue, handleException, handleSevere, hasCacheSynchronizationManager, hasDescriptor, hasExceptionHandler, hasExternalTransactionController, info, initializeAllIdentityMaps, initializeIdentityMap, initializeIdentityMaps, insertObject, isClassReadOnly, isClientSession, isDatabaseSession, isFinalizersEnabled, isInProfile, isInTransaction, isRemoteUnitOfWork, isServerSession, isSessionBroker, isUnitOfWork, keyFromObject, keyFromObject, log, log, log, log, log, log, log, log, log, log, log, logDebug, logDebug, logException, logMessage, logMessage, logMessages, logThrowable, printIdentityMap, printIdentityMaps, putInIdentityMap, putInIdentityMap, putInIdentityMap, putInIdentityMap, readAllObjects, readAllObjects, readAllObjects, readAllObjects, readObject, readObject, readObject, readObject, readObject, refreshAndLockObject, refreshAndLockObject, refreshObject, removeFromIdentityMap, removeFromIdentityMap, removeProperty, removeQuery, removeQuery, setCacheSynchronizationManager, setCommandManager, setDatasourceLogin, setExceptionHandler, setExternalTransactionController, setIntegrityChecker, setIsFinalizersEnabled, setIsInProfile, setLog, setLogin, setLogin, setLogLevel, setName, setProfiler, setProperty, setSessionLog, setSessionLog, setShouldLogMessages, setShouldPropagateChanges, setUseOldCommit, severe, shouldLog, shouldLogMessages, shouldPropagateChanges, updateObject, updateWriteLockValue, updateWriteLockValue, usesExternalTransactionController, usesOldCommit, validateCache, verifyDelete, warning, writeObject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DistributedSession

public DistributedSession(oracle.toplink.internal.remote.RemoteConnection remoteConnection)
Creates a DistributedSession.

Parameters:
remoteConnection - remote session requires a remote connection. This must be accessed remotely from the client through RMI or CORBA.
Method Detail

acquireUnitOfWork

public abstract oracle.toplink.internal.sessions.UnitOfWorkImpl acquireUnitOfWork()
Return a unit of work for this session. The unit of work is an object level transaction that allows a group of changes to be applied as a unit.

Specified by:
acquireUnitOfWork in interface Session
Overrides:
acquireUnitOfWork in class oracle.toplink.internal.sessions.AbstractSession
See Also:
UnitOfWorkImpl

beginTransaction

public void beginTransaction()
Start a transaction on the server. A unit of work should normally be used instead of transactions for the remote session.

Overrides:
beginTransaction in class oracle.toplink.internal.sessions.AbstractSession
See Also:
AbstractSession.isInTransaction()

commitTransaction

public void commitTransaction()
Commit a transaction on the server. A unit of work should normally be used instead of transactions for the remote session.

Overrides:
commitTransaction in class oracle.toplink.internal.sessions.AbstractSession

executeQuery

public java.lang.Object executeQuery(java.lang.String queryName)
                              throws DatabaseException
Execute the pre-defined query by name and return the result. Queries can be pre-defined and named to allow for their reuse. The named query can be defined on the remote session or the server-side session.

Specified by:
executeQuery in interface Session
Overrides:
executeQuery in class oracle.toplink.internal.sessions.AbstractSession
Throws:
DatabaseException
See Also:
AbstractSession.addQuery(String, DatabaseQuery)

executeQuery

public java.lang.Object executeQuery(java.lang.String queryName,
                                     java.lang.Class domainClass)
                              throws DatabaseException
Execute the pre-defined query by name and return the result. Queries can be pre-defined and named to allow for their reuse. The class is the descriptor in which the query was pre-defined. The query is executed on the server-side session.

Specified by:
executeQuery in interface Session
Overrides:
executeQuery in class oracle.toplink.internal.sessions.AbstractSession
Throws:
DatabaseException
See Also:
DescriptorQueryManager.addQuery(String, DatabaseQuery)

executeQuery

public java.lang.Object executeQuery(java.lang.String queryName,
                                     java.lang.Class domainClass,
                                     java.util.Vector argumentValues)
                              throws DatabaseException
Execute the pre-defined query by name and return the result. Queries can be pre-defined and named to allow for their reuse. The class is the descriptor in which the query was pre-defined.

Specified by:
executeQuery in interface Session
Overrides:
executeQuery in class oracle.toplink.internal.sessions.AbstractSession
Throws:
DatabaseException
See Also:
DescriptorQueryManager.addQuery(String, DatabaseQuery)

executeQuery

public java.lang.Object executeQuery(java.lang.String queryName,
                                     java.util.Vector argumentValues)
                              throws DatabaseException
Execute the pre-defined query by name and return the result. Queries can be pre-defined and named to allow for their reuse.

Specified by:
executeQuery in interface Session
Overrides:
executeQuery in class oracle.toplink.internal.sessions.AbstractSession
Throws:
DatabaseException
See Also:
AbstractSession.addQuery(String, DatabaseQuery)

executeQuery

public abstract java.lang.Object executeQuery(DatabaseQuery query)
Execute the database query.

Specified by:
executeQuery in interface Session
Overrides:
executeQuery in class oracle.toplink.internal.sessions.AbstractSession
See Also:
DatabaseQuery

isConnected

public boolean isConnected()
Return if this session is connected to the server.

Specified by:
isConnected in interface Session
Overrides:
isConnected in class oracle.toplink.internal.sessions.AbstractSession

rollbackTransaction

public void rollbackTransaction()
Rollback a transaction on the server. A unit of work should normally be used instead of transactions for the remote session.

Overrides:
rollbackTransaction in class oracle.toplink.internal.sessions.AbstractSession

toString

public java.lang.String toString()
Avoid printing the accessor and platform.

Overrides:
toString in class oracle.toplink.internal.sessions.AbstractSession

release

public void release()
Logout the session, close the remote connection and release the hold resources

Specified by:
release in interface Session
Overrides:
release in class oracle.toplink.internal.sessions.AbstractSession

Copyright © 1998, 2010, Oracle. All Rights Reserved.