EclipseLink 1.0_1.0M2 API Reference - Incubation

org.eclipse.persistence.sessions.remote
Class RemoteSession

java.lang.Object
  extended by AbstractSession
      extended by org.eclipse.persistence.sessions.remote.DistributedSession
          extended by org.eclipse.persistence.sessions.remote.RemoteSession

public class RemoteSession
extends DistributedSession

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
protected  Sequencing sequencing
           
protected  boolean shouldEnableDistributedIndirectionGarbageCollection
           
 
Fields inherited from class org.eclipse.persistence.sessions.remote.DistributedSession
remoteConnection
 
Constructor Summary
RemoteSession(RemoteConnection remoteConnection)
          PUBLIC: Creates a RemoteSession.
 
Method Summary
 Session acquireHistoricalSession(AsOfClause clause)
          INTERNAL: Acquires a special historical session for reading objects as of a past time.
 UnitOfWorkImpl acquireUnitOfWork()
          PUBLIC: Return a unit of work for this session.
 java.lang.Object executeQuery(DatabaseQuery query)
          PUBLIC: Execute the database query.
 Login getDatasourceLogin()
          PUBLIC: Return the login.
 DatabaseLogin getLogin()
          Deprecated. replaced by getDatasourceLogin()
 java.lang.Object getObjectCorrespondingTo(java.lang.Object serverSideDomainObject, IdentityHashtable objectDescriptors, IdentityHashtable processedObjects, ObjectLevelReadQuery query)
          INTERNAL: Return the corresponding objects from the remote session for the objects read from the server.
 java.lang.Object getObjectsCorrespondingToAll(java.lang.Object serverSideDomainObjects, IdentityHashtable objectDescriptors, IdentityHashtable processedObjects, ObjectLevelReadQuery query, ContainerPolicy containerPolicy)
          INTERNAL: Return the corresponding objects from the remote session for the objects read from the server.
 Sequencing getSequencing()
          INTERNAL: Return the Sequencing object used by the session.
 void initializeSequencing()
          ADVANCED: Creates sequencing object for the session.
 java.lang.Object instantiateRemoteValueHolderOnServer(RemoteValueHolder remoteValueHolder)
          INTERNAL: This will instantiate value holder on the server.
 boolean isRemoteSession()
          INTERNAL: Return if this session is remote.
 void setShouldEnableDistributedIndirectionGarbageCollection(boolean shouldEnableDistributedIndirectionGarbageCollection)
          ADVANCED: Allow the server-side value holders to be cleaned-up when the client-side value holder finalize.
 boolean shouldEnableDistributedIndirectionGarbageCollection()
          ADVANCED: Allow the server-side value holders to be cleaned-up when the client-side value holder finalize.
 
Methods inherited from class org.eclipse.persistence.sessions.remote.DistributedSession
beginTransaction, commitTransaction, cursorSelectObjects, cursorSelectObjects, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, getDefaultReadOnlyClasses, getDescriptor, getDescriptorCorrespondingTo, getRemoteConnection, hasCorrespondingDescriptor, initializeIdentityMapAccessor, isConnected, isDistributedSession, privilegedAddDescriptor, release, rollbackTransaction, setRemoteConnection, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sequencing

protected Sequencing sequencing

shouldEnableDistributedIndirectionGarbageCollection

protected boolean shouldEnableDistributedIndirectionGarbageCollection
Constructor Detail

RemoteSession

public RemoteSession(RemoteConnection remoteConnection)
PUBLIC: Creates a RemoteSession.

Parameters:
remoteConnection - remote session requires a remote connection. This must be accessed remotely from the client through RMI or CORBA.
Method Detail

setShouldEnableDistributedIndirectionGarbageCollection

public void setShouldEnableDistributedIndirectionGarbageCollection(boolean shouldEnableDistributedIndirectionGarbageCollection)
ADVANCED: Allow the server-side value holders to be cleaned-up when the client-side value holder finalize.


shouldEnableDistributedIndirectionGarbageCollection

public boolean shouldEnableDistributedIndirectionGarbageCollection()
ADVANCED: Allow the server-side value holders to be cleaned-up when the client-side value holder finalize.


acquireHistoricalSession

public Session acquireHistoricalSession(AsOfClause clause)
                                 throws ValidationException
INTERNAL: Acquires a special historical session for reading objects as of a past time.

Throws:
ValidationException

acquireUnitOfWork

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

Specified by:
acquireUnitOfWork in class DistributedSession
See Also:
UnitOfWorkImpl

executeQuery

public java.lang.Object executeQuery(DatabaseQuery query)
PUBLIC: Execute the database query.

Specified by:
executeQuery in class DistributedSession

getLogin

public DatabaseLogin getLogin()
Deprecated. replaced by getDatasourceLogin()

OBSOLETE: Return the login, the login holds any database connection information given. This has been replaced by getDatasourceLogin to make use of the Login interface to support non-relational datasources, if DatabaseLogin API is required it will need to be cast.


getDatasourceLogin

public Login getDatasourceLogin()
PUBLIC: Return the login. This must retreive 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.


getObjectCorrespondingTo

public java.lang.Object getObjectCorrespondingTo(java.lang.Object serverSideDomainObject,
                                                 IdentityHashtable objectDescriptors,
                                                 IdentityHashtable processedObjects,
                                                 ObjectLevelReadQuery query)
INTERNAL: Return the corresponding objects from the remote session for the objects read from the server.

Specified by:
getObjectCorrespondingTo in class DistributedSession

getObjectsCorrespondingToAll

public java.lang.Object getObjectsCorrespondingToAll(java.lang.Object serverSideDomainObjects,
                                                     IdentityHashtable objectDescriptors,
                                                     IdentityHashtable processedObjects,
                                                     ObjectLevelReadQuery query,
                                                     ContainerPolicy containerPolicy)
INTERNAL: Return the corresponding objects from the remote session for the objects read from the server.

Specified by:
getObjectsCorrespondingToAll in class DistributedSession

instantiateRemoteValueHolderOnServer

public java.lang.Object instantiateRemoteValueHolderOnServer(RemoteValueHolder remoteValueHolder)
INTERNAL: This will instantiate value holder on the server.

Specified by:
instantiateRemoteValueHolderOnServer in class DistributedSession

isRemoteSession

public boolean isRemoteSession()
INTERNAL: Return if this session is remote.

Overrides:
isRemoteSession in class DistributedSession

getSequencing

public Sequencing getSequencing()
INTERNAL: Return the Sequencing object used by the session.


initializeSequencing

public void initializeSequencing()
ADVANCED: Creates sequencing object for the session. Typically there is no need for the user to call this method - it is called from the constructor.


EclipseLink 1.0_1.0M2 API Reference - Incubation