Top Description Fields Constructors Methods
org.eclipse.persistence.sessions.remote

public abstract Class DistributedSession

extends DatabaseSessionImpl
Class Inheritance
Known Direct Subclasses
org.eclipse.persistence.sessions.remote.RemoteSession
Imports
java.util.*, org.eclipse.persistence.internal.helper.*, org.eclipse.persistence.descriptors.ClassDescriptor, .DescriptorQueryManager, org.eclipse.persistence.exceptions.*, org.eclipse.persistence.internal.sessions.remote.*, org.eclipse.persistence.queries.*, org.eclipse.persistence.sessions.Login, .SessionProfiler, org.eclipse.persistence.internal.queries.*, org.eclipse.persistence.internal.identitymaps.*, org.eclipse.persistence.internal.sessions.*

Purpose: Super class to all remote client session's.

Field Summary

Modifier and TypeField 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 transient RemoteConnection
remoteConnection

Connection to remote persistence service.

Inherited from org.eclipse.persistence.internal.sessions.DatabaseSessionImpl:
connectedTimedatabaseEventListenerisLoggedInsequencingHomeserverPlatformtuner

Constructor Summary

AccessConstructor and Description
protected
DistributedSession(int nothing)

INTERNAL: Create a blank session, used for proxy session.

protected
DistributedSession(RemoteConnection
remote session requires a remote connection. This must be accessed remotely from the client through RMI or CORBA.
remoteConnection
)

PUBLIC: Creates a DistributedSession.

Method Summary

Modifier and TypeMethod and Description
public abstract UnitOfWorkImpl
public void
public void
public void
public RemoteCursoredStream
cursorSelectObjects(CursoredStreamPolicy policy)

INTERNAL: Return remote cursor stream.

public RemoteScrollableCursor
cursorSelectObjects(ScrollableCursorPolicy policy)

INTERNAL: Return remote scrollable cursor

public void
public Object
executeQuery(String queryName)

Overrides org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery.

Implements org.eclipse.persistence.sessions.Session.executeQuery.

PUBLIC: Execute the pre-defined query by name and return the result.
public Object
executeQuery(String queryName, Class<?> domainClass)

Overrides org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery.

Implements org.eclipse.persistence.sessions.Session.executeQuery.

PUBLIC: Execute the pre-defined query by name and return the result.
public Object
executeQuery(String queryName, Class<?> domainClass, Vector<E> argumentValues)

Overrides org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery.

PUBLIC: Execute the pre-defined query by name and return the result.
public Object
executeQuery(String queryName, Vector<E> argumentValues)

Overrides org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery.

PUBLIC: Execute the pre-defined query by name and return the result.
public abstract Object
public Object
public Vector<E>

Returns:

A Vector containing the Java Classes that are currently read-only.
getDefaultReadOnlyClasses
()

Overrides org.eclipse.persistence.internal.sessions.AbstractSession.getDefaultReadOnlyClasses.

INTERNAL: CR#2751 Returns the set of read-only classes for the receiver.
public ClassDescriptor
public ClassDescriptor
getDescriptorCorrespondingTo(ClassDescriptor descriptor)

INTERNAL: Return the descriptor.

public ClassDescriptor
getDescriptorForAlias(String
The descriptor alias.
alias
)

Overrides org.eclipse.persistence.internal.sessions.AbstractSession.getDescriptorForAlias.

Implements org.eclipse.persistence.sessions.Session.getDescriptorForAlias.

INTERNAL: Return the table descriptor specified for the class.
public abstract Object
getObjectCorrespondingTo(Object serverSideDomainObject, Map<Object, ObjectDescriptor> objectDescriptors, Map<Object, Object> processedObjects, ObjectLevelReadQuery query)

INTERNAL: Return the corresponding objects from the remote session for the objects read from the server.

public abstract Object
getObjectsCorrespondingToAll(Object serverSideDomainObjects, Map<Object, ObjectDescriptor> objectDescriptors, Map<Object, Object> processedObjects, ObjectLevelReadQuery query, ContainerPolicy containerPolicy)

INTERNAL: Return the corresponding objects from the remote session for the objects read from the server.

public RemoteConnection
getRemoteConnection()

INTERNAL: Return the remote connection.

public boolean
hasCorrespondingDescriptor(ClassDescriptor descriptor)

INTERNAL: Checks if the descriptor exists or not.

public void
public abstract Object
instantiateRemoteValueHolderOnServer(RemoteValueHolder<T> remoteValueHolder)

INTERNAL: This will instantiate value holder on the server.

public boolean
public boolean
public boolean
isMetadataRemote()

ADVANCED: Return if the descriptors and meta-data should be serialized from the server, or if they will be provided locally.

public boolean
public void
login()

Overrides org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login.

Implements org.eclipse.persistence.sessions.DatabaseSession.login.

PUBLIC: Connect to the database using the predefined login.
public void
loginAndDetectDatasource()

Overrides org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource.

PUBLIC: Connect to the database using the predefined login.
public void
logout()

Overrides org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.logout.

Implements org.eclipse.persistence.sessions.DatabaseSession.logout.

PUBLIC: Logout the session, close the remote connection and release the hold resources
public void
privilegedAddDescriptor(ClassDescriptor descriptor)

INTERNAL: You cannot add descriptors to a remote session.

public void
public 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.

public void
setRemoteConnection(RemoteConnection remoteConnection)

INTERNAL: Set the remote connection.

public String
toString()

Overrides org.eclipse.persistence.internal.sessions.AbstractSession.toString.

PUBLIC: Avoid printing the accessor and platform.
Inherited from org.eclipse.persistence.internal.sessions.DatabaseSessionImpl:
addDescriptoraddDescriptorsaddDescriptorsaddDescriptorsToSequencingaddSequencefinalizegetConnectedTimegetDatabaseEventListenergetDatasourcePlatformgetPlatformgetPlatformgetReadLogingetSequencinggetSequencingControlgetSequencingHomegetServerPlatformgetTunerinitializeConnectedTimeinitializeDescriptorIfSessionAliveinitializeDescriptorsinitializeDescriptorsinitializeDescriptorsinitializeDescriptorsinitializeDescriptorsinitializeSequencingisDatabaseSessionisLoggedInisProtectedSessionisSequencingCallbackRequiredloginloginpostConnectDatasourcepostLoginpreConnectDatasourcereleaseJTSConnectionretryQuerysetDatabaseEventListenersetDatasourceAndInitializesetOrDetectDatasourcesetSequencingHomesetServerPlatformsetTunerwriteAllObjectswriteAllObjects

Field Detail

hasDefaultReadOnlyClassesback to summary
protected boolean hasDefaultReadOnlyClasses

Cache if default classes have been read from server.

isMetadataRemoteback to summary
protected boolean isMetadataRemote

Define if meta-data is initialized locally, or serialized from the server.

remoteConnectionback to summary
protected transient RemoteConnection remoteConnection

Connection to remote persistence service.

Constructor Detail

DistributedSessionback to summary
protected DistributedSession(int nothing)

INTERNAL: Create a blank session, used for proxy session.

DistributedSessionback to summary
protected DistributedSession(RemoteConnection remoteConnection)

PUBLIC: Creates a DistributedSession.

Parameters
remoteConnection:RemoteConnection

remote session requires a remote connection. This must be accessed remotely from the client through RMI or CORBA.

Method Detail

acquireUnitOfWorkback to summary
public abstract UnitOfWorkImpl acquireUnitOfWork()

Redeclares org.eclipse.persistence.sessions.Session.acquireUnitOfWork.

Overrides org.eclipse.persistence.internal.sessions.AbstractSession.acquireUnitOfWork.

PUBLIC: Return a unit of work for this session. The unit of work is an object level transaction that allows a group of changes to be applied as a unit.

Annotations
@Override
See Also
UnitOfWorkImpl
beginTransactionback to summary
public void beginTransaction()

Overrides org.eclipse.persistence.internal.sessions.AbstractSession.beginTransaction.

Implements org.eclipse.persistence.sessions.DatabaseSession.beginTransaction.

PUBLIC: Start a transaction on the server. A unit of work should normally be used instead of transactions for the remote session.

Annotations
@Override
commitTransactionback to summary
public void commitTransaction()

Overrides org.eclipse.persistence.internal.sessions.AbstractSession.commitTransaction.

Implements org.eclipse.persistence.sessions.DatabaseSession.commitTransaction.

PUBLIC: Commit a transaction on the server. A unit of work should normally be used instead of transactions for the remote session.

Annotations
@Override
connectback to summary
public void connect() throws DatabaseException

Overrides org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.connect.

INTERNAL: Connect not required.

Annotations
@Override
cursorSelectObjectsback to summary
public RemoteCursoredStream cursorSelectObjects(CursoredStreamPolicy policy)

INTERNAL: Return remote cursor stream.

cursorSelectObjectsback to summary
public RemoteScrollableCursor cursorSelectObjects(ScrollableCursorPolicy policy)

INTERNAL: Return remote scrollable cursor

disconnectback to summary
public void disconnect() throws DatabaseException

Overrides org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.disconnect.

INTERNAL: Disconnect not required.

Annotations
@Override
executeQueryback to summary
public Object executeQuery(String queryName) throws DatabaseException

Overrides org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery.

Implements org.eclipse.persistence.sessions.Session.executeQuery.

PUBLIC: Execute the pre-defined query by name and return the result. Queries can be pre-defined and named to allow for their reuse. The named query can be defined on the remote session or the server-side session.

Annotations
@Override
See Also
addQuery(String, DatabaseQuery)
executeQueryback to summary
public Object executeQuery(String queryName, Class<?> domainClass) throws DatabaseException

Overrides org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery.

Implements org.eclipse.persistence.sessions.Session.executeQuery.

PUBLIC: Execute the pre-defined query by name and return the result. Queries can be pre-defined and named to allow for their reuse. The class is the descriptor in which the query was pre-defined. The query is executed on the server-side session.

Annotations
@Override
See Also
DescriptorQueryManager#addQuery(String, DatabaseQuery)
executeQueryback to summary
public Object executeQuery(String queryName, Class<?> domainClass, Vector<E> argumentValues) throws DatabaseException

Overrides org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery.

PUBLIC: Execute the pre-defined query by name and return the result. Queries can be pre-defined and named to allow for their reuse. The class is the descriptor in which the query was pre-defined.

Annotations
@Override
See Also
DescriptorQueryManager#addQuery(String, DatabaseQuery)
executeQueryback to summary
public Object executeQuery(String queryName, Vector<E> argumentValues) throws DatabaseException

Overrides org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery.

PUBLIC: Execute the pre-defined query by name and return the result. Queries can be pre-defined and named to allow for their reuse.

Annotations
@Override
See Also
addQuery(String, DatabaseQuery)
executeQueryback to summary
public abstract Object executeQuery(DatabaseQuery query)

Redeclares org.eclipse.persistence.sessions.Session.executeQuery.

Overrides org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery.

Execute the database query.

Annotations
@Override
executeQueryback to summary
public Object executeQuery(DatabaseQuery query, AbstractRecord row)

Overrides org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery.

INTERNAL: Execute the database query.

Annotations
@Override
getDefaultReadOnlyClassesback to summary
public Vector<E> getDefaultReadOnlyClasses()

Overrides org.eclipse.persistence.internal.sessions.AbstractSession.getDefaultReadOnlyClasses.

INTERNAL: CR#2751 Returns the set of read-only classes for the receiver. These class come from the Remote connection

Returns:Vector<E>

A Vector containing the Java Classes that are currently read-only.

Annotations
@Override
getDescriptorback to summary
public ClassDescriptor getDescriptor(Class<?> domainClass)

Overrides org.eclipse.persistence.internal.sessions.AbstractSession.getDescriptor.

Implements org.eclipse.persistence.sessions.Session.getDescriptor, org.eclipse.persistence.core.sessions.CoreSession.getDescriptor.

INTERNAL: Return the table descriptor specified for the class.

Annotations
@Override
getDescriptorCorrespondingToback to summary
public ClassDescriptor getDescriptorCorrespondingTo(ClassDescriptor descriptor)

INTERNAL: Return the descriptor.

getDescriptorForAliasback to summary
public ClassDescriptor getDescriptorForAlias(String alias)

Overrides org.eclipse.persistence.internal.sessions.AbstractSession.getDescriptorForAlias.

Implements org.eclipse.persistence.sessions.Session.getDescriptorForAlias.

INTERNAL: Return the table descriptor specified for the class.

Parameters
alias:String

Doc from org.eclipse.persistence.internal.sessions.AbstractSession.getDescriptorForAlias.

The descriptor alias.

Returns:ClassDescriptor

Doc from org.eclipse.persistence.internal.sessions.AbstractSession.getDescriptorForAlias.

The descriptor for the alias or null if no descriptor was found.

Annotations
@Override
getObjectCorrespondingToback to summary
public abstract Object getObjectCorrespondingTo(Object serverSideDomainObject, Map<Object, ObjectDescriptor> objectDescriptors, Map<Object, Object> processedObjects, ObjectLevelReadQuery query)

INTERNAL: Return the corresponding objects from the remote session for the objects read from the server.

getObjectsCorrespondingToAllback to summary
public abstract Object getObjectsCorrespondingToAll(Object serverSideDomainObjects, Map<Object, ObjectDescriptor> objectDescriptors, Map<Object, Object> processedObjects, ObjectLevelReadQuery query, ContainerPolicy containerPolicy)

INTERNAL: Return the corresponding objects from the remote session for the objects read from the server.

getRemoteConnectionback to summary
public RemoteConnection getRemoteConnection()

INTERNAL: Return the remote connection.

hasCorrespondingDescriptorback to summary
public boolean hasCorrespondingDescriptor(ClassDescriptor descriptor)

INTERNAL: Checks if the descriptor exists or not.

initializeIdentityMapAccessorback to summary
public void initializeIdentityMapAccessor()

Overrides org.eclipse.persistence.internal.sessions.AbstractSession.initializeIdentityMapAccessor.

INTERNAL: Set up the IdentityMapManager. Overrides the default IdentityMapManager

Annotations
@Override
instantiateRemoteValueHolderOnServerback to summary
public abstract Object instantiateRemoteValueHolderOnServer(RemoteValueHolder<T> remoteValueHolder)

INTERNAL: This will instantiate value holder on the server.

isConnectedback to summary
public boolean isConnected()

Overrides org.eclipse.persistence.internal.sessions.AbstractSession.isConnected.

Implements org.eclipse.persistence.sessions.Session.isConnected.

PUBLIC: Return if this session is connected to the server.

Annotations
@Override
isDistributedSessionback to summary
public boolean isDistributedSession()

Overrides org.eclipse.persistence.internal.sessions.AbstractSession.isDistributedSession.

Implements org.eclipse.persistence.sessions.Session.isDistributedSession.

INTERNAL: Return if this session is a distributed session.

Annotations
@Override
isMetadataRemoteback to summary
public boolean isMetadataRemote()

ADVANCED: Return if the descriptors and meta-data should be serialized from the server, or if they will be provided locally.

isRemoteSessionback to summary
public boolean isRemoteSession()

Overrides org.eclipse.persistence.internal.sessions.AbstractSession.isRemoteSession.

Implements org.eclipse.persistence.sessions.Session.isRemoteSession.

INTERNAL: Return if this session is a remote session.

Annotations
@Override
loginback to summary
public void login() throws DatabaseException

Overrides org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login.

Implements org.eclipse.persistence.sessions.DatabaseSession.login.

PUBLIC: Connect to the database using the predefined login. Obtain the login from the server, as it may have configuration initialized from the database meta-data.

Annotations
@Override
loginAndDetectDatasourceback to summary
public void loginAndDetectDatasource() throws DatabaseException

Overrides org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource.

PUBLIC: Connect to the database using the predefined login. During connection, attempt to auto detect the required database platform. This method can be used in systems where for ease of use developers have EclipseLink autodetect the platform. To be safe, however, the platform should be configured directly. The login must have been assigned when or after creating the session.

Annotations
@Override
logoutback to summary
public void logout()

Overrides org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.logout.

Implements org.eclipse.persistence.sessions.DatabaseSession.logout.

PUBLIC: Logout the session, close the remote connection and release the hold resources

Annotations
@Override
privilegedAddDescriptorback to summary
public void privilegedAddDescriptor(ClassDescriptor descriptor)

INTERNAL: You cannot add descriptors to a remote session. This is a internal method used by TopLink

rollbackTransactionback to summary
public void rollbackTransaction()

Overrides org.eclipse.persistence.internal.sessions.AbstractSession.rollbackTransaction.

Implements org.eclipse.persistence.sessions.DatabaseSession.rollbackTransaction.

PUBLIC: Rollback a transaction on the server. A unit of work should normally be used instead of transactions for the remote session.

Annotations
@Override
setIsMetadataRemoteback to summary
public 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.

setRemoteConnectionback to summary
public void setRemoteConnection(RemoteConnection remoteConnection)

INTERNAL: Set the remote connection.

toStringback to summary
public String toString()

Overrides org.eclipse.persistence.internal.sessions.AbstractSession.toString.

PUBLIC: Avoid printing the accessor and platform.

Returns:String

Doc from java.lang.Object.toString.

a string representation of the object.

Annotations
@Override