Module org.eclipse.persistence.core
Class RemoteConnection
java.lang.Object
org.eclipse.persistence.internal.sessions.remote.RemoteConnection
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
CORBAConnection,RMIConnection,RMIConnection
Defines set of abstract methods which one must overwrite for any kind to implement a communication mechanism.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringThis attribute is used to provide a globally unique identifier for this connection.protected DistributedSessionBack reference to owning session. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidBegin an early unit of work transaction.abstract voidBegin a transaction on the database.abstract RemoteUnitOfWorkcommitRootUnitOfWork(RemoteUnitOfWork remoteUnitOfWork) Commit remote unit of workabstract voidCommit a transaction on the database.abstract SessionReturns remote client session.abstract voidUsed for closing cursored streams across RMI.abstract VectorcursoredStreamNextPage(RemoteCursoredStream remoteCursoredStream, ReadQuery query, DistributedSession session, int pageSize) Retrieve next page size of objects from the remote cursored streamabstract intcursoredStreamSize(ObjID remoteCursoredStreamID) Return the cursored stream sizeabstract RemoteCursoredStreamcursorSelectObjects(CursoredStreamPolicy policy, DistributedSession session) Get remote cursor stream.abstract RemoteScrollableCursorcursorSelectObjects(ScrollableCursorPolicy policy, DistributedSession session) Get remote cursor stream.voidfixObjectReferences(Transporter remoteCursoredStream, ObjectLevelReadQuery query, DistributedSession session) INTERNAL: An object has been serialized from the server to the remote client.abstract VectorINTERNAL: Get the read-only classesabstract ClassDescriptorgetDescriptor(Class<?> domainClass) Get descriptorabstract ClassDescriptorgetDescriptorForAlias(String alias) Get descriptorabstract LogingetLogin()Return the login informaiton from the server.abstract ObjectgetSequenceNumberNamed(Object remoteFunctionCall) INTERNAL: Perform remote function callADVANCED: This method is used to get the globally unique identifier for this connection.voidinitialize(DistributedSession session) Allow the connection to initialize an setting in the session.abstract voidabstract TransporterinstantiateRemoteValueHolderOnServer(RemoteValueHolder remoteValueHolder) Instantiated remote value holder.booleanabstract voidprocessCommand(RemoteCommand remoteCommand) ADVANCED: This method will send the command to the remote session for processingvoidrelease()PUBLIC: Release the connection resource.abstract TransporterremoteExecute(DatabaseQuery query) Execute query remotely.abstract TransporterremoteExecuteNamedQuery(String name, Class<?> javaClass, Vector arguments) Execute query remotely.abstract voidRollback a transaction on the database.abstract booleanscrollableCursorAbsolute(ObjID remoteScrollableCursorOid, int rows) Moves the cursor to the given row number in the result setabstract voidscrollableCursorAfterLast(ObjID remoteScrollableCursorOid) Moves the cursor to the end of the result set, just after the last row.abstract voidscrollableCursorBeforeFirst(ObjID remoteScrollableCursorOid) Moves the cursor to the front of the result set, just before the first rowabstract voidscrollableCursorClose(ObjID remoteScrollableCursorOid) Used for closing scrolable cursor across RMI.abstract intscrollableCursorCurrentIndex(ObjID remoteScrollableCursorOid) Retrieves the current row index numberabstract booleanscrollableCursorFirst(ObjID remoteScrollableCursorOid) Moves the cursor to the first row in the result setabstract booleanscrollableCursorIsAfterLast(ObjID remoteScrollableCursorOid) Indicates whether the cursor is after the last row in the result set.abstract booleanscrollableCursorIsBeforeFirst(ObjID remoteScrollableCursorOid) Indicates whether the cursor is before the first row in the result set.abstract booleanscrollableCursorIsFirst(ObjID remoteScrollableCursorOid) Indicates whether the cursor is on the first row of the result set.abstract booleanscrollableCursorIsLast(ObjID remoteScrollableCursorOid) Indicates whether the cursor is on the last row of the result set.abstract booleanscrollableCursorLast(ObjID remoteScrollableCursorOid) Moves the cursor to the last row in the result setabstract ObjectscrollableCursorNextObject(ObjID remoteScrollableCursorOid, ReadQuery query, DistributedSession session) Retrieve next object from the remote scrollable cursorabstract ObjectscrollableCursorPreviousObject(ObjID remoteScrollableCursorOid, ReadQuery query, DistributedSession session) Retrieve previous object from the remote scrollable cursorabstract booleanscrollableCursorRelative(ObjID remoteScrollableCursorOid, int rows) Moves the cursor a relative number of rows, either positive or negative.abstract intscrollableCursorSize(ObjID cursorId) Return the scrollable cursor sizevoidsetServiceName(String newServiceName) ADVANCED: This method is used to set the globally unique identifier for this connection.voidsetSession(DistributedSession session)
-
Field Details
-
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. -
session
Back reference to owning session.
-
-
Constructor Details
-
RemoteConnection
public RemoteConnection()
-
-
Method Details
-
processCommand
ADVANCED: This method will send the command to the remote session for processing- Parameters:
remoteCommand- Contains a command that will be executed on the remote session- See Also:
-
initialize
Allow the connection to initialize an setting in the session. -
getSession
-
setSession
-
isConnected
public boolean isConnected() -
beginTransaction
public abstract void beginTransaction()Begin a transaction on the database. -
beginEarlyTransaction
public abstract void beginEarlyTransaction()Begin an early unit of work transaction. -
commitRootUnitOfWork
Commit remote unit of work -
commitTransaction
public abstract void commitTransaction()Commit a transaction on the database. -
createRemoteSession
Returns remote client session. -
cursoredStreamClose
Used for closing cursored streams across RMI. -
cursoredStreamNextPage
public abstract Vector cursoredStreamNextPage(RemoteCursoredStream remoteCursoredStream, ReadQuery query, DistributedSession session, int pageSize) Retrieve next page size of objects from the remote cursored stream -
cursoredStreamSize
Return the cursored stream size -
cursorSelectObjects
public abstract RemoteCursoredStream cursorSelectObjects(CursoredStreamPolicy policy, DistributedSession session) Get remote cursor stream. -
cursorSelectObjects
public abstract RemoteScrollableCursor cursorSelectObjects(ScrollableCursorPolicy policy, DistributedSession session) Get remote cursor stream. -
getDefaultReadOnlyClasses
INTERNAL: Get the read-only classes -
getDescriptor
Get descriptor -
getDescriptorForAlias
Get descriptor -
getLogin
Return the login informaiton from the server. -
getSequenceNumberNamed
INTERNAL: Perform remote function call -
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:
- java.lang.String the name
-
initializeIdentityMapsOnServerSession
public abstract void initializeIdentityMapsOnServerSession() -
instantiateRemoteValueHolderOnServer
public abstract Transporter instantiateRemoteValueHolderOnServer(RemoteValueHolder remoteValueHolder) Instantiated remote value holder. -
remoteExecute
Execute query remotely. -
remoteExecuteNamedQuery
public abstract Transporter remoteExecuteNamedQuery(String name, Class<?> javaClass, Vector arguments) Execute query remotely. -
rollbackTransaction
public abstract void rollbackTransaction()Rollback a transaction on the database. -
scrollableCursorAbsolute
Moves the cursor to the given row number in the result set -
scrollableCursorAfterLast
Moves the cursor to the end of the result set, just after the last row. -
scrollableCursorBeforeFirst
Moves the cursor to the front of the result set, just before the first row -
scrollableCursorClose
Used for closing scrolable cursor across RMI. -
scrollableCursorCurrentIndex
Retrieves the current row index number -
scrollableCursorFirst
Moves the cursor to the first row in the result set -
scrollableCursorIsAfterLast
Indicates whether the cursor is after the last row in the result set. -
scrollableCursorIsBeforeFirst
Indicates whether the cursor is before the first row in the result set. -
scrollableCursorIsFirst
Indicates whether the cursor is on the first row of the result set. -
scrollableCursorIsLast
Indicates whether the cursor is on the last row of the result set. -
scrollableCursorLast
Moves the cursor to the last row in the result set -
scrollableCursorNextObject
public abstract Object scrollableCursorNextObject(ObjID remoteScrollableCursorOid, ReadQuery query, DistributedSession session) Retrieve next object from the remote scrollable cursor -
scrollableCursorPreviousObject
public abstract Object scrollableCursorPreviousObject(ObjID remoteScrollableCursorOid, ReadQuery query, DistributedSession session) Retrieve previous object from the remote scrollable cursor -
scrollableCursorRelative
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 -
scrollableCursorSize
Return the scrollable cursor size -
setServiceName
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- java.lang.String
-
release
public void release()PUBLIC: Release the connection resource. -
fixObjectReferences
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
-