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
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
If 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
ConstructorsConstructorDescriptionExclusiveIsolatedClientSession
(ServerSession parent, ConnectionPolicy connectionPolicy) ExclusiveIsolatedClientSession
(ServerSession parent, ConnectionPolicy connectionPolicy, Map properties) -
Method Summary
Modifier and TypeMethodDescriptionINTERNAL: Always use writeConnection.boolean
INTERNAL: This method is called in case externalConnectionPooling is used.boolean
PUBLIC: Return if this session is an exclusive isolated client session.void
postAcquireConnection
(Accessor accessor) INTERNAL: This method rises appropriate for the session event(s) right after connection is acquired.void
preReleaseConnection
(Accessor accessor) INTERNAL: This method rises appropriate for the session event(s) right before the connection is released.protected void
INTERNAL: As this session type should maintain it's transaction for its entire life- cycle we will wait for 'release' before releasing connection.void
setAccessor
(Accessor accessor) INTERNAL: Provided for consistency.protected boolean
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, clearThreadsToWaitMergeManagerWaitingDeferredCacheKeys, 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, getThreadsToWaitMergeManagerWaitingDeferredCacheKeysSnapshot, 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, setThreadsToWaitMergeManagerWaitingDeferredCacheKeys, 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
-
Field Details
-
shouldAlwaysUseExclusiveConnection
protected boolean shouldAlwaysUseExclusiveConnectionIf true all classes are read through the exclusive connection, otherwise only the isolated ones.
-
-
Constructor Details
-
ExclusiveIsolatedClientSession
-
ExclusiveIsolatedClientSession
public ExclusiveIsolatedClientSession(ServerSession parent, ConnectionPolicy connectionPolicy, Map properties)
-
-
Method Details
-
getAccessors
INTERNAL: Always use writeConnection.- Overrides:
getAccessors
in classClientSession
-
setAccessor
INTERNAL: Provided for consistency.- Overrides:
setAccessor
in 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:
releaseWriteConnection
in classClientSession
-
postAcquireConnection
INTERNAL: This method rises appropriate for the session event(s) right after connection is acquired.- Overrides:
postAcquireConnection
in classAbstractSession
-
preReleaseConnection
INTERNAL: This method rises appropriate for the session event(s) right before the connection is released.- Overrides:
preReleaseConnection
in 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:
isExclusiveConnectionRequired
in classClientSession
-
isExclusiveIsolatedClientSession
public boolean isExclusiveIsolatedClientSession()PUBLIC: Return if this session is an exclusive isolated client session.- Overrides:
isExclusiveIsolatedClientSession
in classAbstractSession
-
shouldExecuteLocally
INTERNAL: Helper method to calculate whether to execute this query locally or send it to the server session.- Overrides:
shouldExecuteLocally
in classIsolatedClientSession
-