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

public abstract Class RemoteConnection

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Known Direct Subclasses
org.eclipse.persistence.sessions.remote.rmi.RMIConnection
Imports
java.rmi.server.ObjID, java.util.IdentityHashMap, .List, .Map, .Vector, org.eclipse.persistence.descriptors.ClassDescriptor, org.eclipse.persistence.queries.CursoredStreamPolicy, .DatabaseQuery, .ObjectLevelReadQuery, .ReadQuery, .ScrollableCursorPolicy, org.eclipse.persistence.sessions.Login, org.eclipse.persistence.sessions.remote.DistributedSession

Defines set of abstract methods which one must overwrite for any kind to implement a communication mechanism.

Field Summary

Modifier and TypeField and Description
protected String
serviceName

This attribute is used to provide a globally unique identifier for this connection.

protected DistributedSession
session

Back reference to owning session.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public abstract void
beginEarlyTransaction()

Begin an early unit of work transaction.

public abstract void
beginTransaction()

Begin a transaction on the database.

public abstract RemoteUnitOfWork
commitRootUnitOfWork(RemoteUnitOfWork remoteUnitOfWork)

Commit remote unit of work

public abstract void
commitTransaction()

Commit a transaction on the database.

public abstract Session
createRemoteSession()

Returns remote client session.

public abstract void
cursoredStreamClose(ObjID id)

Used for closing cursored streams across RMI.

public abstract Vector<E>
cursoredStreamNextPage(RemoteCursoredStream remoteCursoredStream, ReadQuery query, DistributedSession session, int pageSize)

Retrieve next page size of objects from the remote cursored stream

public abstract int
cursoredStreamSize(ObjID remoteCursoredStreamID)

Return the cursored stream size

public abstract RemoteCursoredStream
cursorSelectObjects(CursoredStreamPolicy policy, DistributedSession session)

Get remote cursor stream.

public abstract RemoteScrollableCursor
cursorSelectObjects(ScrollableCursorPolicy policy, DistributedSession session)

Get remote cursor stream.

public void
fixObjectReferences(Transporter remoteCursoredStream, ObjectLevelReadQuery query, DistributedSession session)

INTERNAL: An object has been serialized from the server to the remote client.

public abstract Vector<E>
getDefaultReadOnlyClasses()

INTERNAL: Get the read-only classes

public abstract ClassDescriptor
getDescriptor(Class<?> domainClass)

Get descriptor

public abstract ClassDescriptor
getDescriptorForAlias(String alias)

Get descriptor

public abstract Login
getLogin()

Return the login informaiton from the server.

public abstract Object
getSequenceNumberNamed(Object remoteFunctionCall)

INTERNAL: Perform remote function call

public String

Returns:

java.lang.String the name
getServiceName
()

ADVANCED: This method is used to get the globally unique identifier for this connection.

public DistributedSession
public void
initialize(DistributedSession session)

Allow the connection to initialize an setting in the session.

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

Instantiated remote value holder.

public boolean
public abstract void
processCommand(RemoteCommand
Contains a command that will be executed on the remote session
remoteCommand
)

ADVANCED: This method will send the command to the remote session for processing

public void
release()

PUBLIC: Release the connection resource.

public abstract Transporter
remoteExecute(DatabaseQuery query)

Execute query remotely.

public abstract Transporter
remoteExecuteNamedQuery(String name, Class<?> javaClass, Vector<E> arguments)

Execute query remotely.

public abstract void
rollbackTransaction()

Rollback a transaction on the database.

public abstract boolean
scrollableCursorAbsolute(ObjID remoteScrollableCursorOid, int rows)

Moves the cursor to the given row number in the result set

public abstract void
scrollableCursorAfterLast(ObjID remoteScrollableCursorOid)

Moves the cursor to the end of the result set, just after the last row.

public abstract void
scrollableCursorBeforeFirst(ObjID remoteScrollableCursorOid)

Moves the cursor to the front of the result set, just before the first row

public abstract void
scrollableCursorClose(ObjID remoteScrollableCursorOid)

Used for closing scrolable cursor across RMI.

public abstract int
scrollableCursorCurrentIndex(ObjID remoteScrollableCursorOid)

Retrieves the current row index number

public abstract boolean
scrollableCursorFirst(ObjID remoteScrollableCursorOid)

Moves the cursor to the first row in the result set

public abstract boolean
scrollableCursorIsAfterLast(ObjID remoteScrollableCursorOid)

Indicates whether the cursor is after the last row in the result set.

public abstract boolean
scrollableCursorIsBeforeFirst(ObjID remoteScrollableCursorOid)

Indicates whether the cursor is before the first row in the result set.

public abstract boolean
scrollableCursorIsFirst(ObjID remoteScrollableCursorOid)

Indicates whether the cursor is on the first row of the result set.

public abstract boolean
scrollableCursorIsLast(ObjID remoteScrollableCursorOid)

Indicates whether the cursor is on the last row of the result set.

public abstract boolean
scrollableCursorLast(ObjID remoteScrollableCursorOid)

Moves the cursor to the last row in the result set

public abstract Object
scrollableCursorNextObject(ObjID remoteScrollableCursorOid, ReadQuery query, DistributedSession session)

Retrieve next object from the remote scrollable cursor

public abstract Object
scrollableCursorPreviousObject(ObjID remoteScrollableCursorOid, ReadQuery query, DistributedSession session)

Retrieve previous object from the remote scrollable cursor

public abstract boolean
scrollableCursorRelative(ObjID remoteScrollableCursorOid, int rows)

Moves the cursor a relative number of rows, either positive or negative.

public abstract int
scrollableCursorSize(ObjID cursorId)

Return the scrollable cursor size

public void
setServiceName(String
java.lang.String
newServiceName
)

ADVANCED: This method is used to set the globally unique identifier for this connection.

public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

serviceNameback to summary
protected String serviceName

This attribute is used to provide a globally unique identifier for this connection. It should be the same value as the JNDI context or the RMIRegistry context.

sessionback to summary
protected DistributedSession session

Back reference to owning session.

Constructor Detail

RemoteConnectionback to summary
public RemoteConnection()

Method Detail

beginEarlyTransactionback to summary
public abstract void beginEarlyTransaction()

Begin an early unit of work transaction.

beginTransactionback to summary
public abstract void beginTransaction()

Begin a transaction on the database.

commitRootUnitOfWorkback to summary
public abstract RemoteUnitOfWork commitRootUnitOfWork(RemoteUnitOfWork remoteUnitOfWork)

Commit remote unit of work

commitTransactionback to summary
public abstract void commitTransaction()

Commit a transaction on the database.

createRemoteSessionback to summary
public abstract Session createRemoteSession()

Returns remote client session.

cursoredStreamCloseback to summary
public abstract void cursoredStreamClose(ObjID id)

Used for closing cursored streams across RMI.

cursoredStreamNextPageback to summary
public abstract Vector<E> cursoredStreamNextPage(RemoteCursoredStream remoteCursoredStream, ReadQuery query, DistributedSession session, int pageSize)

Retrieve next page size of objects from the remote cursored stream

cursoredStreamSizeback to summary
public abstract int cursoredStreamSize(ObjID remoteCursoredStreamID)

Return the cursored stream size

cursorSelectObjectsback to summary
public abstract RemoteCursoredStream cursorSelectObjects(CursoredStreamPolicy policy, DistributedSession session)

Get remote cursor stream.

cursorSelectObjectsback to summary
public abstract RemoteScrollableCursor cursorSelectObjects(ScrollableCursorPolicy policy, DistributedSession session)

Get remote cursor stream.

fixObjectReferencesback to summary
public void fixObjectReferences(Transporter remoteCursoredStream, ObjectLevelReadQuery query, DistributedSession session)

INTERNAL: An object has been serialized from the server to the remote client. Replace the transient attributes of the remote value holders with client-side objects. Being used for the cursored stream only

getDefaultReadOnlyClassesback to summary
public abstract Vector<E> getDefaultReadOnlyClasses()

INTERNAL: Get the read-only classes

getDescriptorback to summary
public abstract ClassDescriptor getDescriptor(Class<?> domainClass)

Get descriptor

getDescriptorForAliasback to summary
public abstract ClassDescriptor getDescriptorForAlias(String alias)

Get descriptor

getLoginback to summary
public abstract Login getLogin()

Return the login informaiton from the server.

getSequenceNumberNamedback to summary
public abstract Object getSequenceNumberNamed(Object remoteFunctionCall)

INTERNAL: Perform remote function call

getServiceNameback to summary
public String getServiceName()

ADVANCED: This method is used to get the globally unique identifier for this connection. This identifier should be the same as the JNDI context the service was stored under.

Returns:String

java.lang.String the name

getSessionback to summary
public DistributedSession getSession()
initializeback to summary
public void initialize(DistributedSession session)

Allow the connection to initialize an setting in the session.

initializeIdentityMapsOnServerSessionback to summary
public abstract void initializeIdentityMapsOnServerSession()
instantiateRemoteValueHolderOnServerback to summary
public abstract Transporter instantiateRemoteValueHolderOnServer(RemoteValueHolder<T> remoteValueHolder)

Instantiated remote value holder.

isConnectedback to summary
public boolean isConnected()
processCommandback to summary
public abstract void processCommand(RemoteCommand remoteCommand)

ADVANCED: This method will send the command to the remote session for processing

Parameters
remoteCommand:RemoteCommand

Contains a command that will be executed on the remote session

See Also
org.eclipse.persistence.internal.sessions.remote.RemoteCommand
releaseback to summary
public void release()

PUBLIC: Release the connection resource.

remoteExecuteback to summary
public abstract Transporter remoteExecute(DatabaseQuery query)

Execute query remotely.

remoteExecuteNamedQueryback to summary
public abstract Transporter remoteExecuteNamedQuery(String name, Class<?> javaClass, Vector<E> arguments)

Execute query remotely.

rollbackTransactionback to summary
public abstract void rollbackTransaction()

Rollback a transaction on the database.

scrollableCursorAbsoluteback to summary
public abstract boolean scrollableCursorAbsolute(ObjID remoteScrollableCursorOid, int rows)

Moves the cursor to the given row number in the result set

scrollableCursorAfterLastback to summary
public abstract void scrollableCursorAfterLast(ObjID remoteScrollableCursorOid)

Moves the cursor to the end of the result set, just after the last row.

scrollableCursorBeforeFirstback to summary
public abstract void scrollableCursorBeforeFirst(ObjID remoteScrollableCursorOid)

Moves the cursor to the front of the result set, just before the first row

scrollableCursorCloseback to summary
public abstract void scrollableCursorClose(ObjID remoteScrollableCursorOid)

Used for closing scrolable cursor across RMI.

scrollableCursorCurrentIndexback to summary
public abstract int scrollableCursorCurrentIndex(ObjID remoteScrollableCursorOid)

Retrieves the current row index number

scrollableCursorFirstback to summary
public abstract boolean scrollableCursorFirst(ObjID remoteScrollableCursorOid)

Moves the cursor to the first row in the result set

scrollableCursorIsAfterLastback to summary
public abstract boolean scrollableCursorIsAfterLast(ObjID remoteScrollableCursorOid)

Indicates whether the cursor is after the last row in the result set.

scrollableCursorIsBeforeFirstback to summary
public abstract boolean scrollableCursorIsBeforeFirst(ObjID remoteScrollableCursorOid)

Indicates whether the cursor is before the first row in the result set.

scrollableCursorIsFirstback to summary
public abstract boolean scrollableCursorIsFirst(ObjID remoteScrollableCursorOid)

Indicates whether the cursor is on the first row of the result set.

scrollableCursorIsLastback to summary
public abstract boolean scrollableCursorIsLast(ObjID remoteScrollableCursorOid)

Indicates whether the cursor is on the last row of the result set.

scrollableCursorLastback to summary
public abstract boolean scrollableCursorLast(ObjID remoteScrollableCursorOid)

Moves the cursor to the last row in the result set

scrollableCursorNextObjectback to summary
public abstract Object scrollableCursorNextObject(ObjID remoteScrollableCursorOid, ReadQuery query, DistributedSession session)

Retrieve next object from the remote scrollable cursor

scrollableCursorPreviousObjectback to summary
public abstract Object scrollableCursorPreviousObject(ObjID remoteScrollableCursorOid, ReadQuery query, DistributedSession session)

Retrieve previous object from the remote scrollable cursor

scrollableCursorRelativeback to summary
public abstract boolean scrollableCursorRelative(ObjID remoteScrollableCursorOid, int rows)

Moves the cursor a relative number of rows, either positive or negative. Attempting to move beyond the first/last row in the result set positions the cursor before/after the the first/last row

scrollableCursorSizeback to summary
public abstract int scrollableCursorSize(ObjID cursorId)

Return the scrollable cursor size

setServiceNameback to summary
public void setServiceName(String newServiceName)

ADVANCED: This method is used to set the globally unique identifier for this connection. This identifier should be the same as the JNDI context the service was stored under.

Parameters
newServiceName:String

java.lang.String

setSessionback to summary
public void setSession(DistributedSession session)