Module org.eclipse.persistence.core
Class ExclusiveIsolatedClientSession
- java.lang.Object
-
- org.eclipse.persistence.internal.core.sessions.CoreAbstractSession<ClassDescriptor,Login,Platform,Project,SessionEventManager>
-
- org.eclipse.persistence.internal.sessions.AbstractSession
-
- org.eclipse.persistence.sessions.server.ClientSession
-
- org.eclipse.persistence.internal.sessions.IsolatedClientSession
-
- org.eclipse.persistence.internal.sessions.ExclusiveIsolatedClientSession
-
- All Implemented Interfaces:
Serializable,Cloneable,CoreSession<ClassDescriptor,Login,Platform,Project,SessionEventManager>,CommandProcessor,Session
public class ExclusiveIsolatedClientSession extends IsolatedClientSession
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanshouldAlwaysUseExclusiveConnectionIf true all classes are read through the exclusive connection, otherwise only the isolated ones.-
Fields inherited from class org.eclipse.persistence.sessions.server.ClientSession
connectionPolicy, isActive, parent, sequencing, writeConnections
-
Fields inherited from class org.eclipse.persistence.internal.sessions.AbstractSession
accessors, 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, wasJTSTransactionInternallyStarted
-
Fields inherited from interface org.eclipse.persistence.sessions.coordination.CommandProcessor
LOG_DEBUG, LOG_ERROR, LOG_INFO, LOG_WARNING
-
-
Constructor Summary
Constructors Constructor Description ExclusiveIsolatedClientSession(ServerSession parent, ConnectionPolicy connectionPolicy)ExclusiveIsolatedClientSession(ServerSession parent, ConnectionPolicy connectionPolicy, Map properties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<Accessor>getAccessors()INTERNAL: Always use writeConnection.booleanisExclusiveConnectionRequired()INTERNAL: This method is called in case externalConnectionPooling is used.booleanisExclusiveIsolatedClientSession()PUBLIC: Return if this session is an exclusive isolated client session.voidpostAcquireConnection(Accessor accessor)INTERNAL: This method rises appropriate for the session event(s) right after connection is acquired.voidpreReleaseConnection(Accessor accessor)INTERNAL: This method rises appropriate for the session event(s) right before the connection is released.protected voidreleaseWriteConnection()INTERNAL: As this session type should maintain it's transaction for its entire life- cycle we will wait for 'release' before releasing connection.voidsetAccessor(Accessor accessor)INTERNAL: Provided for consistency.protected booleanshouldExecuteLocally(DatabaseQuery query)INTERNAL: Helper method to calculate whether to execute this query locally or send it to the server session.-
Methods inherited from class org.eclipse.persistence.internal.sessions.IsolatedClientSession
getCacheKeyFromTargetSessionForMerge, getExecutionSession, getParentIdentityMapSession, initializeIdentityMapAccessor, isIsolatedClientSession, isIsolatedQuery, isProtectedSession
-
Methods inherited from class org.eclipse.persistence.sessions.server.ClientSession
addWriteConnection, basicCommitTransaction, basicRollbackTransaction, connect, containsQuery, disconnect, executeCall, getAccessor, getCommandManager, getConnectionPolicy, getDescriptors, getParent, getProperty, getQuery, getQuery, getSequencing, getServerPlatform, getSessionTypeString, getWriteConnection, getWriteConnections, hasWriteConnection, initializeSequencing, isActive, isClientSession, isConnected, release, releaseConnectionAfterCall, releaseJTSConnection, releaseReadConnection, retryQuery, retryTransaction, setConnectionPolicy, setIsActive, setParent, setWriteConnection, setWriteConnections, shouldPropagateChanges, toString
-
Methods inherited from class org.eclipse.persistence.internal.sessions.AbstractSession
acquireHistoricalSession, acquireNonSynchronizedUnitOfWork, acquireNonSynchronizedUnitOfWork, acquireRepeatableWriteUnitOfWork, acquireUnitOfWork, acquireUnitOfWork, addAlias, addJPAQuery, addJPATablePerTenantQuery, addMultitenantContextProperty, addQuery, addQuery, addQuery, addStaticMetamodelClass, addTablePerTenantDescriptor, addTablePerTenantQuery, basicBeginTransaction, basicBeginTransaction, basicExecuteCall, beginExternalTransaction, beginTransaction, buildDefaultQueryBuilder, checkAndRefreshInvalidObject, checkHierarchyForDescriptor, cleanUpInjectionManager, clearDescriptors, clearIntegrityChecker, clearLastDescriptorAccessed, clearProfile, clone, commitExternalTransaction, commitTransaction, compareObjects, compareObjectsDontMatch, config, copy, copy, copyDescriptorNamedQueries, copyDescriptorsFromProject, copyInternal, copyReadOnlyClasses, createCloneQueryValueHolder, createCloneTransformationValueHolder, createInjectionManager, createProtectedInstanceFromCachedData, deferEvent, deleteAllObjects, deleteObject, doesObjectExist, dontLogMessages, endOperationProfile, endOperationProfile, executeDeferredEvents, executeNonSelectingCall, executeNonSelectingSQL, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeSelectingCall, executeSQL, fine, finer, finest, getAccessors, getActiveCommandThreads, getActiveSession, getActiveUnitOfWork, getAliasDescriptors, getAllQueries, getAsOfClause, getAttributeGroups, getBroker, getClassDescriptor, getClassDescriptor, getClassDescriptorForAlias, getCommitManager, getDatasourceLogin, getDatasourcePlatform, getDefaultReadOnlyClasses, getDefaultReferenceMode, getDescriptor, getDescriptor, getDescriptorForAlias, getEventManager, getExceptionHandler, getExceptionHandlerClass, getExternalTransactionController, getId, getIdentityMapAccessor, getIdentityMapAccessorInstance, getInjectionManager, getIntegrityChecker, getJPAQueries, getJPATablePerTenantQueries, getLoader, getLog, getLogin, getLogLevel, getLogLevel, getLogSessionString, getMappedSuperclass, getMultitenantContextProperties, getName, getNextQueryId, getNextSequenceNumberValue, getNumberOfActiveUnitsOfWork, getParentIdentityMapSession, getParentIdentityMapSession, getPartitioningPolicy, getPessimisticLockTimeoutDefault, getPessimisticLockTimeoutUnitDefault, getPlatform, getPlatform, getProfiler, getProject, getProperties, getQueries, getQuery, getQuery, getQueryBuilder, getQueryTimeoutDefault, getQueryTimeoutUnitDefault, getRefreshMetadataListener, getRootSession, getSerializer, getSessionForClass, getSessionForName, getSessionLog, getStaticMetamodelClass, getTablePerTenantDescriptors, getTablePerTenantQueries, getTransactionMutex, handleException, handleSevere, hasBroker, hasCommitManager, hasDescriptor, hasEventManager, hasExceptionHandler, hasExternalTransactionController, hasProperties, hasTablePerTenantDescriptors, hasTablePerTenantQueries, incrementProfile, incrementProfile, info, insertObject, internalExecuteQuery, isBroker, isClassReadOnly, isClassReadOnly, isConcurrent, isConsideredInvalid, isDatabaseSession, isDistributedSession, isFinalizersEnabled, isHistoricalSession, isInBroker, isInProfile, isInTransaction, isJPAQueriesProcessed, isLoggingOff, isRemoteSession, isRemoteUnitOfWork, isServerSession, isSessionBroker, isSynchronized, isUnitOfWork, keyFromObject, load, load, log, log, log, log, log, log, log, log, logMessage, logMessage, logThrowable, prepareDatabaseQuery, priviledgedExecuteNonSelectingCall, priviledgedExecuteSelectingCall, processCommand, processJPAQueries, processJPAQuery, readAllObjects, readAllObjects, readAllObjects, readAllObjects, readObject, readObject, readObject, readObject, readObject, refreshAndLockObject, refreshAndLockObject, refreshObject, registerFinalizer, releaseUnitOfWork, removeProperty, removeQuery, removeQuery, retrieveCacheKey, rollbackExternalTransaction, rollbackTransaction, 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, shouldTolerateInvalidJPQL, startOperationProfile, startOperationProfile, unwrapObject, updateObject, updateProfile, updateTablePerTenantDescriptors, validateCache, validateQuery, verifyDelete, warning, wasJTSTransactionInternallyStarted, wrapObject, writeAllObjectsWithChangeSet, writeObject, writesCompleted
-
-
-
-
Constructor Detail
-
ExclusiveIsolatedClientSession
public ExclusiveIsolatedClientSession(ServerSession parent, ConnectionPolicy connectionPolicy)
-
ExclusiveIsolatedClientSession
public ExclusiveIsolatedClientSession(ServerSession parent, ConnectionPolicy connectionPolicy, Map properties)
-
-
Method Detail
-
getAccessors
public Collection<Accessor> getAccessors()
INTERNAL: Always use writeConnection.- Overrides:
getAccessorsin classClientSession
-
setAccessor
public void setAccessor(Accessor accessor)
INTERNAL: Provided for consistency.- Overrides:
setAccessorin classAbstractSession
-
releaseWriteConnection
protected void releaseWriteConnection()
INTERNAL: As this session type should maintain it's transaction for its entire life- cycle we will wait for 'release' before releasing connection. By making this method a no-op the connection will not be released until 'release()' is called on the client session.- Overrides:
releaseWriteConnectionin classClientSession
-
postAcquireConnection
public void postAcquireConnection(Accessor accessor)
INTERNAL: This method rises appropriate for the session event(s) right after connection is acquired.- Overrides:
postAcquireConnectionin classAbstractSession
-
preReleaseConnection
public void preReleaseConnection(Accessor accessor)
INTERNAL: This method rises appropriate for the session event(s) right before the connection is released.- Overrides:
preReleaseConnectionin classAbstractSession
-
isExclusiveConnectionRequired
public boolean isExclusiveConnectionRequired()
INTERNAL: This method is called in case externalConnectionPooling is used. If returns true, accessor used by the session keeps its connection open until released by the session.- Overrides:
isExclusiveConnectionRequiredin classClientSession
-
isExclusiveIsolatedClientSession
public boolean isExclusiveIsolatedClientSession()
PUBLIC: Return if this session is an exclusive isolated client session.- Overrides:
isExclusiveIsolatedClientSessionin classAbstractSession
-
shouldExecuteLocally
protected boolean shouldExecuteLocally(DatabaseQuery query)
INTERNAL: Helper method to calculate whether to execute this query locally or send it to the server session.- Overrides:
shouldExecuteLocallyin classIsolatedClientSession
-
-