public abstract class DistributedSession
extends org.eclipse.persistence.internal.sessions.DatabaseSessionImpl
Modifier and Type | Field and Description |
---|---|
protected boolean |
hasDefaultReadOnlyClasses
Cache if default classes have been read from server.
|
protected boolean |
isMetadataRemote
Define if meta-data is initialized locally, or serialized from the server.
|
protected org.eclipse.persistence.internal.sessions.remote.RemoteConnection |
remoteConnection
Connection to remote persistence service.
|
connectedTime, databaseEventListener, isLoggedIn, sequencingHome, serverPlatform, tuner
accessors, activeCommandThreads, attributeGroups, broker, commandManager, commitManager, defaultReferenceMode, deferredEvents, descriptors, entityListenerInjectionManager, eventManager, exceptionHandler, externalTransactionController, identityMapAccessor, integrityChecker, isConcurrent, isExecutingEvents, isFinalizersEnabled, isInBroker, isInProfile, isLoggingOff, isSynchronized, jpaQueriesProcessed, lastDescriptorAccessed, logSessionString, metadatalistener, multitenantContextProperties, name, numberOfActiveUnitsOfWork, objectsLockedForClone, partitioningPolicy, pessimisticLockTimeoutDefault, platform, profiler, project, properties, queries, queryBuilder, queryTimeoutDefault, serializer, sessionLog, shouldCheckWriteLock, shouldOptimizeResultSetAccess, shouldPropagateChanges, staticMetamodelClasses, tablePerTenantDescriptors, tablePerTenantQueries, transactionMutex, wasJTSTransactionInternallyStarted
LOG_DEBUG, LOG_ERROR, LOG_INFO, LOG_WARNING
Modifier | Constructor and Description |
---|---|
protected |
DistributedSession(int nothing)
INTERNAL:
Create a blank session, used for proxy session.
|
|
DistributedSession(org.eclipse.persistence.internal.sessions.remote.RemoteConnection remoteConnection)
PUBLIC:
Creates a DistributedSession.
|
Modifier and Type | Method and Description |
---|---|
abstract org.eclipse.persistence.internal.sessions.UnitOfWorkImpl |
acquireUnitOfWork()
PUBLIC:
Return a unit of work for this session.
|
void |
beginTransaction()
PUBLIC:
Start a transaction on the server.
|
void |
commitTransaction()
PUBLIC:
Commit a transaction on the server.
|
void |
connect()
INTERNAL:
Connect not required.
|
org.eclipse.persistence.internal.sessions.remote.RemoteCursoredStream |
cursorSelectObjects(CursoredStreamPolicy policy)
INTERNAL:
Return remote cursor stream.
|
org.eclipse.persistence.internal.sessions.remote.RemoteScrollableCursor |
cursorSelectObjects(ScrollableCursorPolicy policy)
INTERNAL:
Return remote scrollable cursor
|
void |
disconnect()
INTERNAL:
Disconnect not required.
|
abstract java.lang.Object |
executeQuery(DatabaseQuery query)
Execute the database query.
|
java.lang.Object |
executeQuery(DatabaseQuery query,
org.eclipse.persistence.internal.sessions.AbstractRecord row)
INTERNAL:
Execute the database query.
|
java.lang.Object |
executeQuery(java.lang.String queryName)
PUBLIC:
Execute the pre-defined query by name and return the result.
|
java.lang.Object |
executeQuery(java.lang.String queryName,
java.lang.Class domainClass)
PUBLIC:
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)
PUBLIC:
Execute the pre-defined query by name and return the result.
|
java.lang.Object |
executeQuery(java.lang.String queryName,
java.util.Vector argumentValues)
PUBLIC:
Execute the pre-defined query by name and return the result.
|
java.util.Vector |
getDefaultReadOnlyClasses()
INTERNAL:
CR#2751
Returns the set of read-only classes for the receiver.
|
ClassDescriptor |
getDescriptor(java.lang.Class domainClass)
INTERNAL:
Return the table descriptor specified for the class.
|
ClassDescriptor |
getDescriptorCorrespondingTo(ClassDescriptor descriptor)
INTERNAL:
Return the descriptor.
|
ClassDescriptor |
getDescriptorForAlias(java.lang.String alias)
INTERNAL:
Return the table descriptor specified for the class.
|
abstract java.lang.Object |
getObjectCorrespondingTo(java.lang.Object serverSideDomainObject,
java.util.Map objectDescriptors,
java.util.Map processedObjects,
ObjectLevelReadQuery query)
INTERNAL:
Return the corresponding objects from the remote session for the objects read from the server.
|
abstract java.lang.Object |
getObjectsCorrespondingToAll(java.lang.Object serverSideDomainObjects,
java.util.Map objectDescriptors,
java.util.Map processedObjects,
ObjectLevelReadQuery query,
org.eclipse.persistence.internal.queries.ContainerPolicy containerPolicy)
INTERNAL:
Return the corresponding objects from the remote session for the objects read from the server.
|
org.eclipse.persistence.internal.sessions.remote.RemoteConnection |
getRemoteConnection()
INTERNAL:
Return the remote connection.
|
boolean |
hasCorrespondingDescriptor(ClassDescriptor descriptor)
INTERNAL:
Checks if the descriptor exists or not.
|
void |
initializeIdentityMapAccessor()
INTERNAL:
Set up the IdentityMapManager.
|
abstract java.lang.Object |
instantiateRemoteValueHolderOnServer(org.eclipse.persistence.internal.sessions.remote.RemoteValueHolder remoteValueHolder)
INTERNAL:
This will instantiate value holder on the server.
|
boolean |
isConnected()
PUBLIC:
Return if this session is connected to the server.
|
boolean |
isDistributedSession()
INTERNAL:
Return if this session is a distributed session.
|
boolean |
isMetadataRemote()
ADVANCED:
Return if the descriptors and meta-data should be serialized from the server,
or if they will be provided locally.
|
boolean |
isRemoteSession()
INTERNAL:
Return if this session is a remote session.
|
void |
login()
PUBLIC:
Connect to the database using the predefined login.
|
void |
loginAndDetectDatasource()
PUBLIC:
Connect to the database using the predefined login.
|
void |
logout()
PUBLIC:
Logout the session, close the remote connection and release the hold resources
|
void |
privilegedAddDescriptor(ClassDescriptor descriptor)
INTERNAL:
You cannot add descriptors to a remote session.
|
void |
rollbackTransaction()
PUBLIC:
Rollback a transaction on the server.
|
void |
setIsMetadataRemote(boolean isMetadataRemote)
ADVANCED:
Set if the descriptors and meta-data should be serialized from the server,
or if they will be provided locally.
|
void |
setRemoteConnection(org.eclipse.persistence.internal.sessions.remote.RemoteConnection remoteConnection)
INTERNAL:
Set the remote connection.
|
java.lang.String |
toString()
PUBLIC:
Avoid printing the accessor and platform.
|
addDescriptor, addDescriptors, addDescriptors, addDescriptorsToSequencing, addSequence, finalize, getConnectedTime, getDatabaseEventListener, getDatasourcePlatform, getPlatform, getPlatform, getReadLogin, getSequencing, getSequencingControl, getSequencingHome, getServerPlatform, getTuner, initializeConnectedTime, initializeDescriptorIfSessionAlive, initializeDescriptors, initializeDescriptors, initializeDescriptors, initializeDescriptors, initializeDescriptors, initializeSequencing, isDatabaseSession, isLoggedIn, isProtectedSession, isSequencingCallbackRequired, login, login, postConnectDatasource, postLogin, preConnectDatasource, releaseJTSConnection, retryQuery, setDatabaseEventListener, setDatasourceAndInitialize, setOrDetectDatasource, setSequencingHome, setServerPlatform, setTuner, writeAllObjects, writeAllObjects
acquireHistoricalSession, acquireNonSynchronizedUnitOfWork, acquireNonSynchronizedUnitOfWork, acquireRepeatableWriteUnitOfWork, acquireUnitOfWork, addAlias, addJPAQuery, addJPATablePerTenantQuery, addMultitenantContextProperty, addQuery, addQuery, addQuery, addStaticMetamodelClass, addTablePerTenantDescriptor, addTablePerTenantQuery, basicBeginTransaction, basicBeginTransaction, basicCommitTransaction, basicExecuteCall, basicRollbackTransaction, beginExternalTransaction, buildDefaultQueryBuilder, checkAndRefreshInvalidObject, checkHierarchyForDescriptor, cleanUpEntityListenerInjectionManager, clearDescriptors, clearIntegrityChecker, clearLastDescriptorAccessed, clearProfile, clone, commitExternalTransaction, compareObjects, compareObjectsDontMatch, config, containsQuery, copy, copy, copyDescriptorNamedQueries, copyDescriptorsFromProject, copyInternal, copyObject, copyObject, copyReadOnlyClasses, createCloneQueryValueHolder, createCloneTransformationValueHolder, createEntityListenerInjectionManager, createProtectedInstanceFromCachedData, deferEvent, deleteAllObjects, deleteAllObjects, deleteObject, doesObjectExist, dontLogMessages, endOperationProfile, endOperationProfile, executeCall, executeDeferredEvents, executeNonSelectingCall, executeNonSelectingSQL, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeSelectingCall, executeSQL, fine, finer, finest, getAccessor, getAccessors, getAccessors, getActiveCommandThreads, getActiveSession, getActiveUnitOfWork, getAliasDescriptors, getAllQueries, getAsOfClause, getAttributeGroups, getBroker, getCacheKeyFromTargetSessionForMerge, getClassDescriptor, getClassDescriptor, getClassDescriptorForAlias, getCommandManager, getCommitManager, getDatasourceLogin, getDefaultReferenceMode, getDescriptor, getDescriptors, getEntityListenerInjectionManager, getEventManager, getExceptionHandler, getExceptionHandlerClass, getExecutionSession, getExternalTransactionController, getId, getIdentityMapAccessor, getIdentityMapAccessorInstance, getIntegrityChecker, getJPAQueries, getJPATablePerTenantQueries, getLoader, getLog, getLogin, getLogLevel, getLogLevel, getLogSessionString, getMappedSuperclass, getMultitenantContextProperties, getName, getNextQueryId, getNextSequenceNumberValue, getNumberOfActiveUnitsOfWork, getParent, getParentIdentityMapSession, getParentIdentityMapSession, getParentIdentityMapSession, getPartitioningPolicy, getPessimisticLockTimeoutDefault, getProfiler, getProject, getProperties, getProperty, getQueries, getQuery, getQuery, getQuery, getQuery, getQueryBuilder, getQueryTimeoutDefault, getRefreshMetadataListener, getRootSession, getSerializer, getSessionForClass, getSessionForName, getSessionLog, getSessionTypeString, getStaticMetamodelClass, getTablePerTenantDescriptors, getTablePerTenantQueries, getTransactionMutex, handleException, handleSevere, hasBroker, hasCommitManager, hasDescriptor, hasEventManager, hasExceptionHandler, hasExternalTransactionController, hasProperties, hasTablePerTenantDescriptors, hasTablePerTenantQueries, incrementProfile, incrementProfile, info, insertObject, internalExecuteQuery, isBroker, isClassReadOnly, isClassReadOnly, isClientSession, isConcurrent, isConsideredInvalid, isExclusiveConnectionRequired, isExclusiveIsolatedClientSession, isFinalizersEnabled, isHistoricalSession, isInBroker, isInProfile, isInTransaction, isIsolatedClientSession, isJPAQueriesProcessed, isLoggingOff, isRemoteUnitOfWork, isServerSession, isSessionBroker, isSynchronized, isUnitOfWork, keyFromObject, keyFromObject, load, load, log, log, log, log, log, log, log, log, log, log, logMessage, logMessage, logThrowable, postAcquireConnection, prepareDatabaseQuery, preReleaseConnection, priviledgedExecuteNonSelectingCall, priviledgedExecuteSelectingCall, processCommand, processJPAQueries, processJPAQuery, readAllObjects, readAllObjects, readAllObjects, readAllObjects, readObject, readObject, readObject, readObject, readObject, refreshAndLockObject, refreshAndLockObject, refreshObject, registerFinalizer, release, releaseConnectionAfterCall, releaseReadConnection, releaseUnitOfWork, removeProperty, removeQuery, removeQuery, retrieveCacheKey, retryTransaction, rollbackExternalTransaction, setAccessor, setBroker, setCommandManager, setCommitManager, setDatasourceLogin, setDefaultReferenceMode, setEntityListenerInjectionManager, setEventManager, setExceptionHandler, setExternalTransactionController, setIntegrityChecker, setIsConcurrent, setIsFinalizersEnabled, setIsInBroker, setIsInProfile, setJPAQueriesProcessed, setLog, setLogin, setLogin, setLogLevel, setName, setNumberOfActiveUnitsOfWork, setPartitioningPolicy, setPessimisticLockTimeoutDefault, setProfiler, setProject, setProperties, setProperty, setQueries, setQueryBuilder, setQueryTimeoutDefault, setRefreshMetadataListener, setSerializer, setSessionLog, setShouldOptimizeResultSetAccess, setShouldPropagateChanges, setSynchronized, setTransactionMutex, setWasJTSTransactionInternallyStarted, severe, shouldDisplayData, shouldLog, shouldLogMessages, shouldLogMessages, shouldOptimizeResultSetAccess, shouldPropagateChanges, startOperationProfile, startOperationProfile, unwrapObject, updateObject, updateProfile, updateTablePerTenantDescriptors, validateCache, validateQuery, verifyDelete, warning, wasJTSTransactionInternallyStarted, wrapObject, writeAllObjectsWithChangeSet, writeObject, writesCompleted
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
deleteAllObjects, deleteObject, getCommandManager, insertObject, isInTransaction, refreshAndLockObject, refreshAndLockObject, setCommandManager, setDatasourceLogin, setExternalTransactionController, setLogin, setShouldPropagateChanges, shouldPropagateChanges, updateObject, writeObject
acquireHistoricalSession, acquireUnitOfWork, addJPAQuery, addQuery, clearIntegrityChecker, clearProfile, containsQuery, copy, copy, copyObject, copyObject, doesObjectExist, dontLogMessages, executeNonSelectingCall, executeNonSelectingSQL, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeSelectingCall, executeSQL, getActiveSession, getActiveUnitOfWork, getAsOfClause, getClassDescriptor, getClassDescriptor, getClassDescriptorForAlias, getDatasourceLogin, getDefaultReferenceMode, getDescriptor, getDescriptors, getEventManager, getExceptionHandler, getExternalTransactionController, getId, getIdentityMapAccessor, getIntegrityChecker, getJPAQueries, getLog, getLogin, getLogLevel, getLogLevel, getName, getNextSequenceNumberValue, getPartitioningPolicy, getProfiler, getProject, getProperties, getProperty, getQueries, getQuery, getQuery, getSerializer, getSessionLog, handleException, handleSevere, hasDescriptor, hasExceptionHandler, hasExternalTransactionController, isClientSession, isFinalizersEnabled, isInProfile, isRemoteUnitOfWork, isServerSession, isSessionBroker, isUnitOfWork, keyFromObject, log, logMessage, readAllObjects, readAllObjects, readAllObjects, readObject, readObject, readObject, readObject, refreshObject, release, removeProperty, removeQuery, setDefaultReferenceMode, setExceptionHandler, setIntegrityChecker, setIsFinalizersEnabled, setLog, setLogLevel, setName, setPartitioningPolicy, setProfiler, setProperty, setQueryTimeoutDefault, setSerializer, setSessionLog, shouldLog, shouldLogMessages, validateCache
protected transient org.eclipse.persistence.internal.sessions.remote.RemoteConnection remoteConnection
protected boolean hasDefaultReadOnlyClasses
protected boolean isMetadataRemote
protected DistributedSession(int nothing)
public DistributedSession(org.eclipse.persistence.internal.sessions.remote.RemoteConnection remoteConnection)
remoteConnection
- remote session requires a remote connection. This must be accessed remotely from the client through RMI or CORBA.public abstract org.eclipse.persistence.internal.sessions.UnitOfWorkImpl acquireUnitOfWork()
acquireUnitOfWork
in interface Session
acquireUnitOfWork
in class org.eclipse.persistence.internal.sessions.AbstractSession
UnitOfWorkImpl
public void beginTransaction()
beginTransaction
in interface DatabaseSession
beginTransaction
in class org.eclipse.persistence.internal.sessions.AbstractSession
DatabaseSession.isInTransaction()
public void commitTransaction()
commitTransaction
in interface DatabaseSession
commitTransaction
in class org.eclipse.persistence.internal.sessions.AbstractSession
public org.eclipse.persistence.internal.sessions.remote.RemoteCursoredStream cursorSelectObjects(CursoredStreamPolicy policy)
public org.eclipse.persistence.internal.sessions.remote.RemoteScrollableCursor cursorSelectObjects(ScrollableCursorPolicy policy)
public java.lang.Object executeQuery(java.lang.String queryName) throws DatabaseException
executeQuery
in interface Session
executeQuery
in class org.eclipse.persistence.internal.sessions.AbstractSession
DatabaseException
AbstractSession.addQuery(String, DatabaseQuery)
public java.lang.Object executeQuery(java.lang.String queryName, java.lang.Class domainClass) throws DatabaseException
executeQuery
in interface Session
executeQuery
in class org.eclipse.persistence.internal.sessions.AbstractSession
DatabaseException
DescriptorQueryManager.addQuery(String, DatabaseQuery)
public java.lang.Object executeQuery(java.lang.String queryName, java.lang.Class domainClass, java.util.Vector argumentValues) throws DatabaseException
executeQuery
in class org.eclipse.persistence.internal.sessions.AbstractSession
DatabaseException
DescriptorQueryManager.addQuery(String, DatabaseQuery)
public java.lang.Object executeQuery(java.lang.String queryName, java.util.Vector argumentValues) throws DatabaseException
executeQuery
in class org.eclipse.persistence.internal.sessions.AbstractSession
DatabaseException
AbstractSession.addQuery(String, DatabaseQuery)
public abstract java.lang.Object executeQuery(DatabaseQuery query)
executeQuery
in interface Session
executeQuery
in class org.eclipse.persistence.internal.sessions.AbstractSession
DatabaseQuery
public java.lang.Object executeQuery(DatabaseQuery query, org.eclipse.persistence.internal.sessions.AbstractRecord row)
executeQuery
in class org.eclipse.persistence.internal.sessions.AbstractSession
public java.util.Vector getDefaultReadOnlyClasses()
getDefaultReadOnlyClasses
in class org.eclipse.persistence.internal.sessions.AbstractSession
public ClassDescriptor getDescriptor(java.lang.Class domainClass)
getDescriptor
in interface CoreSession<ClassDescriptor,Login,org.eclipse.persistence.internal.databaseaccess.Platform,Project,SessionEventManager>
getDescriptor
in interface Session
getDescriptor
in class org.eclipse.persistence.internal.sessions.AbstractSession
public ClassDescriptor getDescriptorForAlias(java.lang.String alias)
getDescriptorForAlias
in interface Session
getDescriptorForAlias
in class org.eclipse.persistence.internal.sessions.AbstractSession
public ClassDescriptor getDescriptorCorrespondingTo(ClassDescriptor descriptor)
public abstract java.lang.Object getObjectCorrespondingTo(java.lang.Object serverSideDomainObject, java.util.Map objectDescriptors, java.util.Map processedObjects, ObjectLevelReadQuery query)
public abstract java.lang.Object getObjectsCorrespondingToAll(java.lang.Object serverSideDomainObjects, java.util.Map objectDescriptors, java.util.Map processedObjects, ObjectLevelReadQuery query, org.eclipse.persistence.internal.queries.ContainerPolicy containerPolicy)
public org.eclipse.persistence.internal.sessions.remote.RemoteConnection getRemoteConnection()
public boolean hasCorrespondingDescriptor(ClassDescriptor descriptor)
public void initializeIdentityMapAccessor()
initializeIdentityMapAccessor
in class org.eclipse.persistence.internal.sessions.AbstractSession
public abstract java.lang.Object instantiateRemoteValueHolderOnServer(org.eclipse.persistence.internal.sessions.remote.RemoteValueHolder remoteValueHolder)
public boolean isConnected()
isConnected
in interface Session
isConnected
in class org.eclipse.persistence.internal.sessions.AbstractSession
public boolean isDistributedSession()
isDistributedSession
in interface Session
isDistributedSession
in class org.eclipse.persistence.internal.sessions.AbstractSession
public boolean isRemoteSession()
isRemoteSession
in interface Session
isRemoteSession
in class org.eclipse.persistence.internal.sessions.AbstractSession
public void privilegedAddDescriptor(ClassDescriptor descriptor)
public void rollbackTransaction()
rollbackTransaction
in interface DatabaseSession
rollbackTransaction
in class org.eclipse.persistence.internal.sessions.AbstractSession
public void setRemoteConnection(org.eclipse.persistence.internal.sessions.remote.RemoteConnection remoteConnection)
public java.lang.String toString()
toString
in class org.eclipse.persistence.internal.sessions.AbstractSession
public void logout()
logout
in interface DatabaseSession
logout
in class org.eclipse.persistence.internal.sessions.DatabaseSessionImpl
public boolean isMetadataRemote()
public void setIsMetadataRemote(boolean isMetadataRemote)
public void connect() throws DatabaseException
connect
in class org.eclipse.persistence.internal.sessions.DatabaseSessionImpl
DatabaseException
public void disconnect() throws DatabaseException
disconnect
in class org.eclipse.persistence.internal.sessions.DatabaseSessionImpl
DatabaseException
public void loginAndDetectDatasource() throws DatabaseException
loginAndDetectDatasource
in class org.eclipse.persistence.internal.sessions.DatabaseSessionImpl
DatabaseException
public void login() throws DatabaseException
login
in interface DatabaseSession
login
in class org.eclipse.persistence.internal.sessions.DatabaseSessionImpl
DatabaseException
DatabaseSession.login(Login)