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

public Class RemoteSession

extends DistributedSession
Class Inheritance
Imports
java.util.*, org.eclipse.persistence.config.ReferenceMode, org.eclipse.persistence.descriptors.ClassDescriptor, org.eclipse.persistence.exceptions.ValidationException, org.eclipse.persistence.history.AsOfClause, org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy, org.eclipse.persistence.internal.sessions.*, org.eclipse.persistence.internal.sessions.remote.*, org.eclipse.persistence.queries.*, org.eclipse.persistence.internal.queries.*, org.eclipse.persistence.sessions.Login, .Session, .SessionProfiler, org.eclipse.persistence.internal.sequencing.Sequencing, .SequencingFactory, org.eclipse.persistence.logging.SessionLog

Purpose: Provide transparent remote three-tiered replacation support. The remote session allows for complex three-tiered applications to be easily built. It gives the remote client the fully functionality of the TopLink api including, This session is a primary interface which resides on the client side. Users would interact with session just the same way as if it was a normal session.

Field Summary

Modifier and TypeField and Description
protected Sequencing
protected boolean
Inherited from org.eclipse.persistence.sessions.remote.DistributedSession:
hasDefaultReadOnlyClassesisMetadataRemoteremoteConnection

Constructor Summary

AccessConstructor and Description
public
public
RemoteSession(RemoteConnection
remote session requires a remote connection. This must be accessed remotely from the client through RMI or CORBA.
remoteConnection
)

PUBLIC: Creates a RemoteSession.

Method Summary

Modifier and TypeMethod and Description
public Session
acquireHistoricalSession(AsOfClause
Represents a valid snap shot time.
clause
)

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

Implements org.eclipse.persistence.sessions.Session.acquireHistoricalSession.

INTERNAL: Acquires a special historical session for reading objects as of a past time.
public RepeatableWriteUnitOfWork
acquireRepeatableWriteUnitOfWork(ReferenceMode referenceMode)

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

PUBLIC: Return a repeatable write unit of work for this session.
public UnitOfWorkImpl
public UnitOfWorkImpl
acquireUnitOfWork(ReferenceMode
The reference type the UOW should use internally when referencing Working clones. Setting this to WEAK means the UOW will use weak references to reference clones and if the application no longer references the clone the clone may be garbage collected. If the clone has uncommitted changes then those changes will be lost.
referenceMode
)

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

Implements org.eclipse.persistence.sessions.Session.acquireUnitOfWork.

PUBLIC: Return a unit of work for this session.
public Object
public Login
public Object
getObjectCorrespondingTo(Object serverSideDomainObject, Map<Object, ObjectDescriptor> objectDescriptors, Map<Object, Object> processedObjects, ObjectLevelReadQuery query)

Implements abstract org.eclipse.persistence.sessions.remote.DistributedSession.getObjectCorrespondingTo.

INTERNAL: Return the corresponding objects from the remote session for the objects read from the server.
public Object
getObjectsCorrespondingToAll(Object serverSideDomainObjects, Map<Object, ObjectDescriptor> objectDescriptors, Map<Object, Object> processedObjects, ObjectLevelReadQuery query, ContainerPolicy containerPolicy)

Implements abstract org.eclipse.persistence.sessions.remote.DistributedSession.getObjectsCorrespondingToAll.

INTERNAL: Return the corresponding objects from the remote session for the objects read from the server.
public Sequencing
getSequencing()

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

INTERNAL: Return the Sequencing object used by the session.
public void
public Object
instantiateRemoteValueHolderOnServer(RemoteValueHolder<T> remoteValueHolder)

Implements abstract org.eclipse.persistence.sessions.remote.DistributedSession.instantiateRemoteValueHolderOnServer.

INTERNAL: This will instantiate value holder on the server.
public boolean
public void
setShouldEnableDistributedIndirectionGarbageCollection(boolean shouldEnableDistributedIndirectionGarbageCollection)

ADVANCED: Allow the server-side value holders to be cleaned-up when the client-side value holder finalize.

public boolean
shouldEnableDistributedIndirectionGarbageCollection()

ADVANCED: Allow the server-side value holders to be cleaned-up when the client-side value holder finalize.

Inherited from org.eclipse.persistence.sessions.remote.DistributedSession:
beginTransactioncommitTransactionconnectcursorSelectObjectscursorSelectObjectsdisconnectexecuteQueryexecuteQueryexecuteQueryexecuteQueryexecuteQuerygetDefaultReadOnlyClassesgetDescriptorgetDescriptorCorrespondingTogetDescriptorForAliasgetRemoteConnectionhasCorrespondingDescriptorinitializeIdentityMapAccessorisConnectedisDistributedSessionisMetadataRemoteloginloginAndDetectDatasourcelogoutprivilegedAddDescriptorrollbackTransactionsetIsMetadataRemotesetRemoteConnectiontoString

Field Detail

sequencingback to summary
protected Sequencing sequencing
shouldEnableDistributedIndirectionGarbageCollectionback to summary
protected boolean shouldEnableDistributedIndirectionGarbageCollection

Constructor Detail

RemoteSessionback to summary
public RemoteSession()
RemoteSessionback to summary
public RemoteSession(RemoteConnection remoteConnection)

PUBLIC: Creates a RemoteSession.

Parameters
remoteConnection:RemoteConnection

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

Method Detail

acquireHistoricalSessionback to summary
public Session acquireHistoricalSession(AsOfClause clause) throws ValidationException

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

Implements org.eclipse.persistence.sessions.Session.acquireHistoricalSession.

INTERNAL: Acquires a special historical session for reading objects as of a past time.

Parameters
clause:AsOfClause

Doc from org.eclipse.persistence.sessions.Session.acquireHistoricalSession.

Represents a valid snap shot time.

Annotations
@Override
acquireRepeatableWriteUnitOfWorkback to summary
public RepeatableWriteUnitOfWork acquireRepeatableWriteUnitOfWork(ReferenceMode referenceMode)

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

PUBLIC: Return a repeatable write unit of work for this session. A repeatable write unit of work allows multiple writeChanges (flushes).

Annotations
@Override
See Also
RepeatableWriteUnitOfWork
acquireUnitOfWorkback to summary
public UnitOfWorkImpl acquireUnitOfWork()

Implements abstract org.eclipse.persistence.sessions.remote.DistributedSession.acquireUnitOfWork.

Implements org.eclipse.persistence.sessions.Session.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
acquireUnitOfWorkback to summary
public UnitOfWorkImpl acquireUnitOfWork(ReferenceMode referenceMode)

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

Implements org.eclipse.persistence.sessions.Session.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.

Parameters
referenceMode:ReferenceMode

The reference type the UOW should use internally when referencing Working clones. Setting this to WEAK means the UOW will use weak references to reference clones and if the application no longer references the clone the clone may be garbage collected. If the clone has uncommitted changes then those changes will be lost.

Annotations
@Override
See Also
UnitOfWorkImpl
executeQueryback to summary
public Object executeQuery(DatabaseQuery query)

Implements abstract org.eclipse.persistence.sessions.remote.DistributedSession.executeQuery.

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

PUBLIC: Execute the database query.

Annotations
@Override
getDatasourceLoginback to summary
public Login getDatasourceLogin()

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

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

PUBLIC: Return the login. This must retrieve the login information from the server this first time called. This is useful to be able to do things differently depending on the database platform.

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

Implements abstract org.eclipse.persistence.sessions.remote.DistributedSession.getObjectCorrespondingTo.

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

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

Implements abstract org.eclipse.persistence.sessions.remote.DistributedSession.getObjectsCorrespondingToAll.

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

Annotations
@Override
getSequencingback to summary
public Sequencing getSequencing()

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

INTERNAL: Return the Sequencing object used by the session. Sequences may be provided locally, or remotely.

Annotations
@Override
initializeSequencingback to summary
public void initializeSequencing()

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

ADVANCED: Creates sequencing object for the session. Sequences may be provided locally, or remotely.

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

Implements abstract org.eclipse.persistence.sessions.remote.DistributedSession.instantiateRemoteValueHolderOnServer.

INTERNAL: This will instantiate value holder on the server.

Annotations
@Override
isRemoteSessionback to summary
public boolean isRemoteSession()

Overrides org.eclipse.persistence.sessions.remote.DistributedSession.isRemoteSession.

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

INTERNAL: Return if this session is remote.

Annotations
@Override
setShouldEnableDistributedIndirectionGarbageCollectionback to summary
public void setShouldEnableDistributedIndirectionGarbageCollection(boolean shouldEnableDistributedIndirectionGarbageCollection)

ADVANCED: Allow the server-side value holders to be cleaned-up when the client-side value holder finalize.

shouldEnableDistributedIndirectionGarbageCollectionback to summary
public boolean shouldEnableDistributedIndirectionGarbageCollection()

ADVANCED: Allow the server-side value holders to be cleaned-up when the client-side value holder finalize.