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, tuneraccessors, activeCommandThreads, attributeGroups, broker, commandManager, commitManager, defaultReferenceMode, deferredEvents, descriptors, eventManager, exceptionHandler, externalTransactionController, identityMapAccessor, injectionManager, integrityChecker, isConcurrent, isExecutingEvents, isFinalizersEnabled, isInBroker, isInProfile, isLoggingOff, isSynchronized, jpaQueriesProcessed, lastDescriptorAccessed, logSessionString, metadatalistener, multitenantContextProperties, name, numberOfActiveUnitsOfWork, objectsLockedForClone, partitioningPolicy, pessimisticLockTimeoutDefault, pessimisticLockTimeoutUnitDefault, platform, profiler, project, properties, queries, queryBuilder, queryTimeoutDefault, queryTimeoutUnitDefault, serializer, sessionLog, shouldCheckWriteLock, shouldOptimizeResultSetAccess, shouldPropagateChanges, staticMetamodelClasses, tablePerTenantDescriptors, tablePerTenantQueries, tolerateInvalidJPQL, transactionMutex, wasJTSTransactionInternallyStartedLOG_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 Object |
executeQuery(DatabaseQuery query)
Execute the database query.
|
Object |
executeQuery(DatabaseQuery query,
org.eclipse.persistence.internal.sessions.AbstractRecord row)
INTERNAL:
Execute the database query.
|
Object |
executeQuery(String queryName)
PUBLIC:
Execute the pre-defined query by name and return the result.
|
Object |
executeQuery(String queryName,
Class domainClass)
PUBLIC:
Execute the pre-defined query by name and return the result.
|
Object |
executeQuery(String queryName,
Class domainClass,
Vector argumentValues)
PUBLIC:
Execute the pre-defined query by name and return the result.
|
Object |
executeQuery(String queryName,
Vector argumentValues)
PUBLIC:
Execute the pre-defined query by name and return the result.
|
Vector |
getDefaultReadOnlyClasses()
INTERNAL:
CR#2751
Returns the set of read-only classes for the receiver.
|
ClassDescriptor |
getDescriptor(Class domainClass)
INTERNAL:
Return the table descriptor specified for the class.
|
ClassDescriptor |
getDescriptorCorrespondingTo(ClassDescriptor descriptor)
INTERNAL:
Return the descriptor.
|
ClassDescriptor |
getDescriptorForAlias(String alias)
INTERNAL:
Return the table descriptor specified for the class.
|
abstract Object |
getObjectCorrespondingTo(Object serverSideDomainObject,
Map objectDescriptors,
Map processedObjects,
ObjectLevelReadQuery query)
INTERNAL:
Return the corresponding objects from the remote session for the objects read from the server.
|
abstract Object |
getObjectsCorrespondingToAll(Object serverSideDomainObjects,
Map objectDescriptors,
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 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.
|
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, writeAllObjectsacquireHistoricalSession, acquireNonSynchronizedUnitOfWork, acquireNonSynchronizedUnitOfWork, acquireRepeatableWriteUnitOfWork, acquireUnitOfWork, addAlias, addJPAQuery, addJPATablePerTenantQuery, addMultitenantContextProperty, addQuery, addQuery, addQuery, addStaticMetamodelClass, addTablePerTenantDescriptor, addTablePerTenantQuery, basicBeginTransaction, basicBeginTransaction, basicCommitTransaction, basicExecuteCall, basicRollbackTransaction, beginExternalTransaction, buildDefaultQueryBuilder, checkAndRefreshInvalidObject, checkHierarchyForDescriptor, cleanUpInjectionManager, clearDescriptors, clearIntegrityChecker, clearLastDescriptorAccessed, clearProfile, clone, commitExternalTransaction, compareObjects, compareObjectsDontMatch, config, containsQuery, copy, copy, copyDescriptorNamedQueries, copyDescriptorsFromProject, copyInternal, copyReadOnlyClasses, createCloneQueryValueHolder, createCloneTransformationValueHolder, createInjectionManager, createProtectedInstanceFromCachedData, deferEvent, 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, getEventManager, getExceptionHandler, getExceptionHandlerClass, getExecutionSession, getExternalTransactionController, getId, getIdentityMapAccessor, getIdentityMapAccessorInstance, getInjectionManager, getIntegrityChecker, getJPAQueries, getJPATablePerTenantQueries, getLoader, getLog, getLogin, getLogLevel, getLogLevel, getLogSessionString, getMappedSuperclass, getMultitenantContextProperties, getName, getNextQueryId, getNextSequenceNumberValue, getNumberOfActiveUnitsOfWork, getParent, getParentIdentityMapSession, getParentIdentityMapSession, getParentIdentityMapSession, getPartitioningPolicy, getPessimisticLockTimeoutDefault, getPessimisticLockTimeoutUnitDefault, getProfiler, getProject, getProperties, getProperty, getQueries, getQuery, getQuery, getQuery, getQuery, getQueryBuilder, getQueryTimeoutDefault, getQueryTimeoutUnitDefault, 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, load, load, 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, setEventManager, setExceptionHandler, setExternalTransactionController, setInjectionManager, setIntegrityChecker, setIsConcurrent, setIsFinalizersEnabled, setIsInBroker, setIsInProfile, setJPAQueriesProcessed, setLog, setLoggingOff, setLogin, setLogin, setLogLevel, setName, setNumberOfActiveUnitsOfWork, setPartitioningPolicy, setPessimisticLockTimeoutDefault, setPessimisticLockTimeoutUnitDefault, setProfiler, setProject, setProperties, setProperty, setQueries, setQueryBuilder, setQueryTimeoutDefault, setQueryTimeoutUnitDefault, setRefreshMetadataListener, setSerializer, setSessionLog, setShouldOptimizeResultSetAccess, setShouldPropagateChanges, setSynchronized, setTolerateInvalidJPQL, setTransactionMutex, setWasJTSTransactionInternallyStarted, severe, shouldDisplayData, shouldLog, shouldLogMessages, shouldLogMessages, shouldOptimizeResultSetAccess, shouldPropagateChanges, shouldTolerateInvalidJPQL, startOperationProfile, startOperationProfile, unwrapObject, updateObject, updateProfile, updateTablePerTenantDescriptors, validateCache, validateQuery, verifyDelete, warning, wasJTSTransactionInternallyStarted, wrapObject, writeAllObjectsWithChangeSet, writeObject, writesCompletedequals, getClass, hashCode, notify, notifyAll, wait, wait, waitdeleteAllObjects, deleteObject, getCommandManager, insertObject, isInTransaction, refreshAndLockObject, refreshAndLockObject, setCommandManager, setDatasourceLogin, setExternalTransactionController, setLogin, setShouldPropagateChanges, shouldPropagateChanges, updateObject, writeObjectacquireHistoricalSession, acquireUnitOfWork, addJPAQuery, addQuery, clearIntegrityChecker, clearProfile, containsQuery, copy, copy, 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, log, logMessage, readAllObjects, readAllObjects, readAllObjects, readObject, readObject, readObject, readObject, refreshObject, release, removeProperty, removeQuery, setDefaultReferenceMode, setExceptionHandler, setIntegrityChecker, setIsFinalizersEnabled, setLog, setLogLevel, setName, setPartitioningPolicy, setProfiler, setProperty, setQueryTimeoutDefault, setQueryTimeoutUnitDefault, setSerializer, setSessionLog, shouldLog, shouldLogMessages, validateCacheprotected 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 SessionacquireUnitOfWork in class org.eclipse.persistence.internal.sessions.AbstractSessionUnitOfWorkImplpublic void beginTransaction()
beginTransaction in interface DatabaseSessionbeginTransaction in class org.eclipse.persistence.internal.sessions.AbstractSessionAbstractSession.isInTransaction()public void commitTransaction()
commitTransaction in interface DatabaseSessioncommitTransaction in class org.eclipse.persistence.internal.sessions.AbstractSessionpublic org.eclipse.persistence.internal.sessions.remote.RemoteCursoredStream cursorSelectObjects(CursoredStreamPolicy policy)
public org.eclipse.persistence.internal.sessions.remote.RemoteScrollableCursor cursorSelectObjects(ScrollableCursorPolicy policy)
public Object executeQuery(String queryName) throws DatabaseException
executeQuery in interface SessionexecuteQuery in class org.eclipse.persistence.internal.sessions.AbstractSessionDatabaseExceptionAbstractSession.addQuery(String, DatabaseQuery)public Object executeQuery(String queryName, Class domainClass) throws DatabaseException
executeQuery in interface SessionexecuteQuery in class org.eclipse.persistence.internal.sessions.AbstractSessionDatabaseExceptionDescriptorQueryManager.addQuery(String, DatabaseQuery)public Object executeQuery(String queryName, Class domainClass, Vector argumentValues) throws DatabaseException
executeQuery in class org.eclipse.persistence.internal.sessions.AbstractSessionDatabaseExceptionDescriptorQueryManager.addQuery(String, DatabaseQuery)public Object executeQuery(String queryName, Vector argumentValues) throws DatabaseException
executeQuery in class org.eclipse.persistence.internal.sessions.AbstractSessionDatabaseExceptionAbstractSession.addQuery(String, DatabaseQuery)public abstract Object executeQuery(DatabaseQuery query)
executeQuery in interface SessionexecuteQuery in class org.eclipse.persistence.internal.sessions.AbstractSessionDatabaseQuerypublic Object executeQuery(DatabaseQuery query, org.eclipse.persistence.internal.sessions.AbstractRecord row)
executeQuery in class org.eclipse.persistence.internal.sessions.AbstractSessionpublic Vector getDefaultReadOnlyClasses()
getDefaultReadOnlyClasses in class org.eclipse.persistence.internal.sessions.AbstractSessionProject.setDefaultReadOnlyClasses(Collection)public ClassDescriptor getDescriptor(Class domainClass)
getDescriptor in interface CoreSession<ClassDescriptor,Login,org.eclipse.persistence.internal.databaseaccess.Platform,Project,SessionEventManager>getDescriptor in interface SessiongetDescriptor in class org.eclipse.persistence.internal.sessions.AbstractSessionpublic ClassDescriptor getDescriptorForAlias(String alias)
getDescriptorForAlias in interface SessiongetDescriptorForAlias in class org.eclipse.persistence.internal.sessions.AbstractSessionalias - The descriptor alias.null if no descriptor was found.public ClassDescriptor getDescriptorCorrespondingTo(ClassDescriptor descriptor)
public abstract Object getObjectCorrespondingTo(Object serverSideDomainObject, Map objectDescriptors, Map processedObjects, ObjectLevelReadQuery query)
public abstract Object getObjectsCorrespondingToAll(Object serverSideDomainObjects, Map objectDescriptors, 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.AbstractSessionpublic abstract Object instantiateRemoteValueHolderOnServer(org.eclipse.persistence.internal.sessions.remote.RemoteValueHolder remoteValueHolder)
public boolean isConnected()
isConnected in interface SessionisConnected in class org.eclipse.persistence.internal.sessions.AbstractSessionpublic boolean isDistributedSession()
isDistributedSession in interface SessionisDistributedSession in class org.eclipse.persistence.internal.sessions.AbstractSessionpublic boolean isRemoteSession()
isRemoteSession in interface SessionisRemoteSession in class org.eclipse.persistence.internal.sessions.AbstractSessionpublic void privilegedAddDescriptor(ClassDescriptor descriptor)
public void rollbackTransaction()
rollbackTransaction in interface DatabaseSessionrollbackTransaction in class org.eclipse.persistence.internal.sessions.AbstractSessionpublic void setRemoteConnection(org.eclipse.persistence.internal.sessions.remote.RemoteConnection remoteConnection)
public String toString()
toString in class org.eclipse.persistence.internal.sessions.AbstractSessionpublic void logout()
logout in interface DatabaseSessionlogout in class org.eclipse.persistence.internal.sessions.DatabaseSessionImplpublic boolean isMetadataRemote()
public void setIsMetadataRemote(boolean isMetadataRemote)
public void connect()
throws DatabaseException
connect in class org.eclipse.persistence.internal.sessions.DatabaseSessionImplDatabaseExceptionpublic void disconnect()
throws DatabaseException
disconnect in class org.eclipse.persistence.internal.sessions.DatabaseSessionImplDatabaseExceptionpublic void loginAndDetectDatasource()
throws DatabaseException
loginAndDetectDatasource in class org.eclipse.persistence.internal.sessions.DatabaseSessionImplDatabaseExceptionpublic void login()
throws DatabaseException
login in interface DatabaseSessionlogin in class org.eclipse.persistence.internal.sessions.DatabaseSessionImplDatabaseExceptionDatabaseSessionImpl.login(Login)Copyright © 2007–2021 Eclipse.org - EclipseLink Project. All rights reserved.