|
Oracle Fusion Middleware Java API Reference for Oracle TopLink 11g Release 1 (11.1.1) B32476-02 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
oracle.toplink.internal.sessions.AbstractSession
oracle.toplink.internal.sessions.DatabaseSessionImpl
oracle.toplink.sessionbroker.SessionBroker
public class SessionBroker
Purpose: Provide a single view to a TopLink session that transparently accesses multple databases.
Responsibilities:
| Field Summary |
|---|
| Fields inherited from interface oracle.toplink.remotecommand.CommandProcessor |
|---|
LOG_DEBUG, LOG_ERROR, LOG_INFO, LOG_WARNING |
| Constructor Summary | |
|---|---|
SessionBroker()Create and return a session broker. |
|
| Method Summary | |
|---|---|
SessionBroker |
acquireClientSessionBroker()Return a session broker that behaves as a client session broker. |
oracle.toplink.internal.sessions.UnitOfWorkImpl |
acquireUnitOfWork()Return a unit of work for this session broker. |
void |
addDescriptor(ClassDescriptor descriptor)You cannot add a descriptor to a session broker, you must add it to its session. |
void |
addDescriptors(Project project)You cannot add a project to a session broker, you must add it to its session. |
void |
addDescriptors(java.util.Vector descriptors)You cannot add descriptors to a session broker, you must add them to its session. |
boolean |
containsQuery(java.lang.String queryName)Return true if the pre-defined query is defined on the session. |
AsOfClause |
getAsOfClause()ADVANCED: Answers the past time this session is as of. |
DatabaseQuery |
getQuery(java.lang.String name)Return the query from the session pre-defined queries with the given name. |
DatabaseQuery |
getQuery(java.lang.String name, java.util.Vector arguments)Return the query from the session pre-defined queries with the given name and argument types. |
oracle.toplink.internal.sequencing.Sequencing |
getSequencing()Return the Sequencing object used by the session. |
void |
initializeSequencing()ADVANCED: Creates sequencing object for the session broker. |
boolean |
isClientSessionBroker()Return if this session is a client session broker. |
boolean |
isConnected()Return if all sessions are still connected to the database. |
boolean |
isServerSessionBroker()Return if this session is a server session broker. |
void |
login()Connect to the database using the predefined login. |
void |
login(java.lang.String userName, java.lang.String password)Connect to the database using the predefined login. |
void |
logout()Disconnect from all databases. |
void |
registerSession(java.lang.String name, oracle.toplink.internal.sessions.AbstractSession session)Register the session under its name. |
void |
registerSession(java.lang.String name, Session session)Register the session under its name. |
void |
release()Release the session. |
void |
releaseClientSessionBroker()Deprecated. Since OracleAS TopLink 10g (10.0.3). Use release(). |
void |
setIntegrityChecker(IntegrityChecker integrityChecker)set the integrityChecker. |
void |
setLog(java.io.Writer log)Set the message log. |
void |
setProfiler(SessionProfiler profiler)Set the profiler for the session. |
void |
setSessionLog(SessionLog log)Set the session log. |
void |
setShouldLogMessages(boolean shouldLog)Deprecated. |
| Methods inherited from class oracle.toplink.internal.sessions.DatabaseSessionImpl |
|---|
getConnectedTime, getSequencingControl, getServerPlatform, initializeConnectedTime, login, loginAndDetectDatasource, setServerPlatform, writeAllObjects, writeAllObjects |
| Methods inherited from class oracle.toplink.internal.sessions.AbstractSession |
|---|
addAlias, addQuery, beginTransaction, clearIntegrityChecker, clearProfile, commitTransaction, compareObjectsDontMatch, config, containsObjectInIdentityMap, containsObjectInIdentityMap, copyObject, copyObject, deleteAllObjects, deleteAllObjects, deleteObject, doesObjectExist, dontLogMessages, executeNonSelectingCall, executeNonSelectingSQL, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeSelectingCall, executeSQL, fine, finer, finest, getActiveSession, getActiveUnitOfWork, getAllFromIdentityMap, getAllFromIdentityMap, getAllFromIdentityMap, getAllQueries, getCacheSynchronizationManager, getClassDescriptor, getClassDescriptor, getClassDescriptorForAlias, getCommandManager, getDatasourceLogin, getDescriptor, getDescriptor, getDescriptorForAlias, getEjbqlPlaceHolderQueries, getEventManager, getExceptionHandler, getExternalTransactionController, getFromIdentityMap, getFromIdentityMap, getFromIdentityMap, getFromIdentityMap, getFromIdentityMap, getIdentityMapAccessor, getIntegrityChecker, getLog, getLogin, getLogLevel, getLogLevel, getName, getNextSequenceNumberValue, getProfiler, getProject, getProperties, getProperty, getQueries, getSessionLog, getWriteLockValue, getWriteLockValue, handleException, handleSevere, hasCacheSynchronizationManager, hasDescriptor, hasExceptionHandler, hasExternalTransactionController, info, initializeAllIdentityMaps, initializeIdentityMap, initializeIdentityMaps, insertObject, isClassReadOnly, isClientSession, isDistributedSession, isFinalizersEnabled, isInProfile, isInTransaction, isRemoteSession, isRemoteUnitOfWork, isServerSession, 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, rollbackTransaction, setCacheSynchronizationManager, setCommandManager, setDatasourceLogin, setExceptionHandler, setExternalTransactionController, setIsFinalizersEnabled, setIsInProfile, setLogin, setLogin, setLogLevel, setName, setProperty, setSessionLog, setShouldPropagateChanges, setUseOldCommit, severe, shouldLog, shouldLogMessages, shouldPropagateChanges, toString, updateObject, updateWriteLockValue, updateWriteLockValue, usesExternalTransactionController, usesOldCommit, validateCache, verifyDelete, warning, writeObject |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface oracle.toplink.sessions.DatabaseSession |
|---|
beginTransaction, commitTransaction, deleteAllObjects, deleteAllObjects, deleteObject, getCommandManager, insertObject, isInTransaction, refreshAndLockObject, refreshAndLockObject, rollbackTransaction, setCommandManager, setDatasourceLogin, setExternalTransactionController, setLogin, setShouldPropagateChanges, shouldPropagateChanges, updateObject, writeObject |
| Constructor Detail |
|---|
public SessionBroker()
| Method Detail |
|---|
public SessionBroker acquireClientSessionBroker()
public oracle.toplink.internal.sessions.UnitOfWorkImpl acquireUnitOfWork()
acquireUnitOfWork in interface SessionacquireUnitOfWork in class oracle.toplink.internal.sessions.AbstractSessionUnitOfWorkImplpublic void addDescriptor(ClassDescriptor descriptor)
addDescriptor in interface DatabaseSessionaddDescriptor in class oracle.toplink.internal.sessions.DatabaseSessionImplDatabaseSessionImpl.addDescriptors(Vector), DatabaseSessionImpl.addDescriptors(oracle.toplink.sessions.Project)
public void addDescriptors(java.util.Vector descriptors)
throws ValidationException
addDescriptors in interface DatabaseSessionaddDescriptors in class oracle.toplink.internal.sessions.DatabaseSessionImplValidationException
public void addDescriptors(Project project)
throws ValidationException
addDescriptors in interface DatabaseSessionaddDescriptors in class oracle.toplink.internal.sessions.DatabaseSessionImplValidationExceptionpublic boolean containsQuery(java.lang.String queryName)
containsQuery in interface SessioncontainsQuery in class oracle.toplink.internal.sessions.AbstractSessionpublic AsOfClause getAsOfClause()
getAsOfClause in interface SessiongetAsOfClause in class oracle.toplink.internal.sessions.AbstractSessionnull if no clause set, or this a regular session.oracle.toplink.expressions.AsOfClause, #acquireSessionAsOf(java.lang.Number), #acquireSessionAsOf(java.util.Date), #hasAsOfClausepublic DatabaseQuery getQuery(java.lang.String name)
getQuery in interface SessiongetQuery in class oracle.toplink.internal.sessions.AbstractSession
public DatabaseQuery getQuery(java.lang.String name,
java.util.Vector arguments)
getQuery in interface SessiongetQuery in class oracle.toplink.internal.sessions.AbstractSessionAbstractSession.getQuery(String)public boolean isClientSessionBroker()
public boolean isConnected()
isConnected in interface SessionisConnected in class oracle.toplink.internal.sessions.AbstractSessionpublic boolean isServerSessionBroker()
public void login()
throws DatabaseException
login in interface DatabaseSessionlogin in class oracle.toplink.internal.sessions.DatabaseSessionImplDatabaseExceptionDatabaseSessionImpl.login(Login)
public void login(java.lang.String userName,
java.lang.String password)
throws DatabaseException
login in interface DatabaseSessionlogin in class oracle.toplink.internal.sessions.DatabaseSessionImplDatabaseException
public void logout()
throws DatabaseException
logout in interface DatabaseSessionlogout in class oracle.toplink.internal.sessions.DatabaseSessionImplTopLinkException - if a transaction is active, you must rollback any active transaction before logout.DatabaseException - the database will also raise an error if their is an active transaction, or a general error occurs.
public void registerSession(java.lang.String name,
oracle.toplink.internal.sessions.AbstractSession session)
public void registerSession(java.lang.String name,
Session session)
public void release()
release in interface Sessionrelease in class oracle.toplink.internal.sessions.AbstractSessionpublic void releaseClientSessionBroker()
public void setIntegrityChecker(IntegrityChecker integrityChecker)
setIntegrityChecker in interface SessionsetIntegrityChecker in class oracle.toplink.internal.sessions.AbstractSessionpublic void setSessionLog(SessionLog log)
setSessionLog in interface SessionsetSessionLog in class oracle.toplink.internal.sessions.AbstractSessionAbstractSession.logMessages()public void setLog(java.io.Writer log)
setLog in interface SessionsetLog in class oracle.toplink.internal.sessions.AbstractSessionAbstractSession.logMessages()public void setProfiler(SessionProfiler profiler)
setProfiler in interface SessionsetProfiler in class oracle.toplink.internal.sessions.AbstractSessionpublic void setShouldLogMessages(boolean shouldLog)
setShouldLogMessages in interface SessionsetShouldLogMessages in class oracle.toplink.internal.sessions.AbstractSession#setLogLevel(int level, String category)public void initializeSequencing()
initializeSequencing in class oracle.toplink.internal.sessions.DatabaseSessionImplpublic oracle.toplink.internal.sequencing.Sequencing getSequencing()
getSequencing in class oracle.toplink.internal.sessions.DatabaseSessionImpl
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||