Class RMIConnection
- java.lang.Object
-
- org.eclipse.persistence.internal.sessions.remote.RemoteConnection
-
- org.eclipse.persistence.sessions.remote.rmi.iiop.RMIConnection
-
- All Implemented Interfaces:
java.io.Serializable
public class RMIConnection extends org.eclipse.persistence.internal.sessions.remote.RemoteConnection
This class exists on on the client side which talks to remote session controller through RMI connection.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RMIConnection(RMIRemoteSessionController controller)
PUBLIC: The connection must be create from the server-side session controllers stub.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
beginEarlyTransaction()
INTERNAL: Begin an early unit of work transaction.void
beginTransaction()
INTERNAL: Begin a transaction on the database.org.eclipse.persistence.internal.sessions.remote.RemoteUnitOfWork
commitRootUnitOfWork(org.eclipse.persistence.internal.sessions.remote.RemoteUnitOfWork theRemoteUnitOfWork)
INTERNAL: Commit root unit of work from the client side to the server side.void
commitTransaction()
INTERNAL: Commit a transaction on the database.Session
createRemoteSession()
PUBLIC: Returns a remote session.void
cursoredStreamClose(java.rmi.server.ObjID remoteCursoredStreamOid)
Used for closing cursored streams across RMI.java.util.Vector
cursoredStreamNextPage(org.eclipse.persistence.internal.sessions.remote.RemoteCursoredStream remoteCursoredStream, ReadQuery query, DistributedSession session, int pageSize)
Retrieve next page size of objects from the remote cursored streamint
cursoredStreamSize(java.rmi.server.ObjID remoteCursoredStreamID)
Return the cursored stream sizeorg.eclipse.persistence.internal.sessions.remote.RemoteCursoredStream
cursorSelectObjects(CursoredStreamPolicy policy, DistributedSession session)
INTERNAL: Returns remote cursor streamorg.eclipse.persistence.internal.sessions.remote.RemoteScrollableCursor
cursorSelectObjects(ScrollableCursorPolicy policy, DistributedSession session)
INTERNAL: Returns remote cursor streamjava.util.Vector
getDefaultReadOnlyClasses()
INTERNAL Return the read-only classesClassDescriptor
getDescriptor(java.lang.Class domainClass)
INTERNAL: Return the table descriptor specified for the class.ClassDescriptor
getDescriptorForAlias(java.lang.String alias)
INTERNAL: Return the table descriptor specified for the alias.Login
getLogin()
INTERNAL: Return the table descriptor specified for the class.RMIRemoteSessionController
getRemoteSessionController()
INTERNAL: Return the remote session controllerjava.lang.Object
getSequenceNumberNamed(java.lang.Object remoteFunctionCall)
INTERNAL: Perform remote function callvoid
initializeIdentityMapsOnServerSession()
INTERNAL: Reset the cache on the server-side session.org.eclipse.persistence.internal.sessions.remote.Transporter
instantiateRemoteValueHolderOnServer(org.eclipse.persistence.internal.sessions.remote.RemoteValueHolder remoteValueHolder)
INTERNAL: Instantiate remote value holder on the servervoid
processCommand(org.eclipse.persistence.internal.sessions.remote.RemoteCommand command)
ADVANCED: This method will send the command to the remote session for processingorg.eclipse.persistence.internal.sessions.remote.Transporter
remoteExecute(DatabaseQuery query)
INTERNAL: Execute the query on the server.org.eclipse.persistence.internal.sessions.remote.Transporter
remoteExecuteNamedQuery(java.lang.String name, java.lang.Class javaClass, java.util.Vector arguments)
INTERNAL: Execute query remotely.void
rollbackTransaction()
INTERNAL: Rollback a transaction on the database.boolean
scrollableCursorAbsolute(java.rmi.server.ObjID remoteScrollableCursorOid, int rows)
Moves the cursor to the given row number in the result setvoid
scrollableCursorAfterLast(java.rmi.server.ObjID remoteScrollableCursorOid)
Moves the cursor to the end of the result set, just after the last row.void
scrollableCursorBeforeFirst(java.rmi.server.ObjID remoteScrollableCursorOid)
Moves the cursor to the front of the result set, just before the first rowvoid
scrollableCursorClose(java.rmi.server.ObjID remoteScrollableCursorOid)
Used for closing scrollable cursor across RMI.int
scrollableCursorCurrentIndex(java.rmi.server.ObjID remoteScrollableCursorOid)
Retrieves the current row index numberboolean
scrollableCursorFirst(java.rmi.server.ObjID remoteScrollableCursorOid)
Moves the cursor to the first row in the result setboolean
scrollableCursorIsAfterLast(java.rmi.server.ObjID remoteScrollableCursorOid)
Indicates whether the cursor is after the last row in the result set.boolean
scrollableCursorIsBeforeFirst(java.rmi.server.ObjID remoteScrollableCursorOid)
Indicates whether the cursor is before the first row in the result set.boolean
scrollableCursorIsFirst(java.rmi.server.ObjID remoteScrollableCursorOid)
Indicates whether the cursor is on the first row of the result set.boolean
scrollableCursorIsLast(java.rmi.server.ObjID remoteScrollableCursorOid)
Indicates whether the cursor is on the last row of the result set.boolean
scrollableCursorLast(java.rmi.server.ObjID remoteScrollableCursorOid)
Moves the cursor to the last row in the result setjava.lang.Object
scrollableCursorNextObject(java.rmi.server.ObjID remoteScrollableCursorOid, ReadQuery query, DistributedSession session)
Retrieve next object from the remote scrollable cursorjava.lang.Object
scrollableCursorPreviousObject(java.rmi.server.ObjID remoteScrollableCursorOid, ReadQuery query, DistributedSession session)
Retrieve previous object from the remote scrollable cursorboolean
scrollableCursorRelative(java.rmi.server.ObjID remoteScrollableCursorOid, int rows)
Moves the cursor to the given row number in the result setint
scrollableCursorSize(java.rmi.server.ObjID cursorId)
Return the scrollable cursor sizevoid
setRemoteSessionController(RMIRemoteSessionController remoteSessionController)
INTERNAL: Set remote session controller
-
-
-
Constructor Detail
-
RMIConnection
public RMIConnection(RMIRemoteSessionController controller)
PUBLIC: The connection must be create from the server-side session controllers stub. The session in then created from the connection through createRemoteSession().- See Also:
createRemoteSession()
-
-
Method Detail
-
processCommand
public void processCommand(org.eclipse.persistence.internal.sessions.remote.RemoteCommand command)
ADVANCED: This method will send the command to the remote session for processing- Specified by:
processCommand
in classorg.eclipse.persistence.internal.sessions.remote.RemoteConnection
- Parameters:
command
- RemoteCOmmand Contains a command that will be executed on the remote session- See Also:
RemoteCommand
-
beginTransaction
public void beginTransaction()
INTERNAL: Begin a transaction on the database.- Specified by:
beginTransaction
in classorg.eclipse.persistence.internal.sessions.remote.RemoteConnection
-
beginEarlyTransaction
public void beginEarlyTransaction()
INTERNAL: Begin an early unit of work transaction.- Specified by:
beginEarlyTransaction
in classorg.eclipse.persistence.internal.sessions.remote.RemoteConnection
-
commitRootUnitOfWork
public org.eclipse.persistence.internal.sessions.remote.RemoteUnitOfWork commitRootUnitOfWork(org.eclipse.persistence.internal.sessions.remote.RemoteUnitOfWork theRemoteUnitOfWork)
INTERNAL: Commit root unit of work from the client side to the server side.- Specified by:
commitRootUnitOfWork
in classorg.eclipse.persistence.internal.sessions.remote.RemoteConnection
-
commitTransaction
public void commitTransaction()
INTERNAL: Commit a transaction on the database.- Specified by:
commitTransaction
in classorg.eclipse.persistence.internal.sessions.remote.RemoteConnection
-
createRemoteSession
public Session createRemoteSession()
PUBLIC: Returns a remote session.- Specified by:
createRemoteSession
in classorg.eclipse.persistence.internal.sessions.remote.RemoteConnection
-
cursoredStreamClose
public void cursoredStreamClose(java.rmi.server.ObjID remoteCursoredStreamOid)
Used for closing cursored streams across RMI.- Specified by:
cursoredStreamClose
in classorg.eclipse.persistence.internal.sessions.remote.RemoteConnection
-
cursoredStreamNextPage
public java.util.Vector cursoredStreamNextPage(org.eclipse.persistence.internal.sessions.remote.RemoteCursoredStream remoteCursoredStream, ReadQuery query, DistributedSession session, int pageSize)
Retrieve next page size of objects from the remote cursored stream- Specified by:
cursoredStreamNextPage
in classorg.eclipse.persistence.internal.sessions.remote.RemoteConnection
-
cursoredStreamSize
public int cursoredStreamSize(java.rmi.server.ObjID remoteCursoredStreamID)
Return the cursored stream size- Specified by:
cursoredStreamSize
in classorg.eclipse.persistence.internal.sessions.remote.RemoteConnection
-
cursorSelectObjects
public org.eclipse.persistence.internal.sessions.remote.RemoteCursoredStream cursorSelectObjects(CursoredStreamPolicy policy, DistributedSession session)
INTERNAL: Returns remote cursor stream- Specified by:
cursorSelectObjects
in classorg.eclipse.persistence.internal.sessions.remote.RemoteConnection
-
cursorSelectObjects
public org.eclipse.persistence.internal.sessions.remote.RemoteScrollableCursor cursorSelectObjects(ScrollableCursorPolicy policy, DistributedSession session)
INTERNAL: Returns remote cursor stream- Specified by:
cursorSelectObjects
in classorg.eclipse.persistence.internal.sessions.remote.RemoteConnection
-
getDefaultReadOnlyClasses
public java.util.Vector getDefaultReadOnlyClasses()
INTERNAL Return the read-only classes- Specified by:
getDefaultReadOnlyClasses
in classorg.eclipse.persistence.internal.sessions.remote.RemoteConnection
-
getDescriptor
public ClassDescriptor getDescriptor(java.lang.Class domainClass)
INTERNAL: Return the table descriptor specified for the class.- Specified by:
getDescriptor
in classorg.eclipse.persistence.internal.sessions.remote.RemoteConnection
-
getDescriptorForAlias
public ClassDescriptor getDescriptorForAlias(java.lang.String alias)
INTERNAL: Return the table descriptor specified for the alias.- Specified by:
getDescriptorForAlias
in classorg.eclipse.persistence.internal.sessions.remote.RemoteConnection
-
getLogin
public Login getLogin()
INTERNAL: Return the table descriptor specified for the class.- Specified by:
getLogin
in classorg.eclipse.persistence.internal.sessions.remote.RemoteConnection
-
getRemoteSessionController
public RMIRemoteSessionController getRemoteSessionController()
INTERNAL: Return the remote session controller
-
getSequenceNumberNamed
public java.lang.Object getSequenceNumberNamed(java.lang.Object remoteFunctionCall)
INTERNAL: Perform remote function call- Specified by:
getSequenceNumberNamed
in classorg.eclipse.persistence.internal.sessions.remote.RemoteConnection
-
initializeIdentityMapsOnServerSession
public void initializeIdentityMapsOnServerSession()
INTERNAL: Reset the cache on the server-side session.- Specified by:
initializeIdentityMapsOnServerSession
in classorg.eclipse.persistence.internal.sessions.remote.RemoteConnection
-
instantiateRemoteValueHolderOnServer
public org.eclipse.persistence.internal.sessions.remote.Transporter instantiateRemoteValueHolderOnServer(org.eclipse.persistence.internal.sessions.remote.RemoteValueHolder remoteValueHolder)
INTERNAL: Instantiate remote value holder on the server- Specified by:
instantiateRemoteValueHolderOnServer
in classorg.eclipse.persistence.internal.sessions.remote.RemoteConnection
-
remoteExecute
public org.eclipse.persistence.internal.sessions.remote.Transporter remoteExecute(DatabaseQuery query)
INTERNAL: Execute the query on the server.- Specified by:
remoteExecute
in classorg.eclipse.persistence.internal.sessions.remote.RemoteConnection
-
remoteExecuteNamedQuery
public org.eclipse.persistence.internal.sessions.remote.Transporter remoteExecuteNamedQuery(java.lang.String name, java.lang.Class javaClass, java.util.Vector arguments)
INTERNAL: Execute query remotely.- Specified by:
remoteExecuteNamedQuery
in classorg.eclipse.persistence.internal.sessions.remote.RemoteConnection
-
rollbackTransaction
public void rollbackTransaction()
INTERNAL: Rollback a transaction on the database.- Specified by:
rollbackTransaction
in classorg.eclipse.persistence.internal.sessions.remote.RemoteConnection
-
scrollableCursorAbsolute
public boolean scrollableCursorAbsolute(java.rmi.server.ObjID remoteScrollableCursorOid, int rows)
Moves the cursor to the given row number in the result set- Specified by:
scrollableCursorAbsolute
in classorg.eclipse.persistence.internal.sessions.remote.RemoteConnection
-
scrollableCursorAfterLast
public void scrollableCursorAfterLast(java.rmi.server.ObjID remoteScrollableCursorOid)
Moves the cursor to the end of the result set, just after the last row.- Specified by:
scrollableCursorAfterLast
in classorg.eclipse.persistence.internal.sessions.remote.RemoteConnection
-
scrollableCursorBeforeFirst
public void scrollableCursorBeforeFirst(java.rmi.server.ObjID remoteScrollableCursorOid)
Moves the cursor to the front of the result set, just before the first row- Specified by:
scrollableCursorBeforeFirst
in classorg.eclipse.persistence.internal.sessions.remote.RemoteConnection
-
scrollableCursorClose
public void scrollableCursorClose(java.rmi.server.ObjID remoteScrollableCursorOid)
Used for closing scrollable cursor across RMI.- Specified by:
scrollableCursorClose
in classorg.eclipse.persistence.internal.sessions.remote.RemoteConnection
-
scrollableCursorCurrentIndex
public int scrollableCursorCurrentIndex(java.rmi.server.ObjID remoteScrollableCursorOid)
Retrieves the current row index number- Specified by:
scrollableCursorCurrentIndex
in classorg.eclipse.persistence.internal.sessions.remote.RemoteConnection
-
scrollableCursorFirst
public boolean scrollableCursorFirst(java.rmi.server.ObjID remoteScrollableCursorOid)
Moves the cursor to the first row in the result set- Specified by:
scrollableCursorFirst
in classorg.eclipse.persistence.internal.sessions.remote.RemoteConnection
-
scrollableCursorIsAfterLast
public boolean scrollableCursorIsAfterLast(java.rmi.server.ObjID remoteScrollableCursorOid)
Indicates whether the cursor is after the last row in the result set.- Specified by:
scrollableCursorIsAfterLast
in classorg.eclipse.persistence.internal.sessions.remote.RemoteConnection
-
scrollableCursorIsBeforeFirst
public boolean scrollableCursorIsBeforeFirst(java.rmi.server.ObjID remoteScrollableCursorOid)
Indicates whether the cursor is before the first row in the result set.- Specified by:
scrollableCursorIsBeforeFirst
in classorg.eclipse.persistence.internal.sessions.remote.RemoteConnection
-
scrollableCursorIsFirst
public boolean scrollableCursorIsFirst(java.rmi.server.ObjID remoteScrollableCursorOid)
Indicates whether the cursor is on the first row of the result set.- Specified by:
scrollableCursorIsFirst
in classorg.eclipse.persistence.internal.sessions.remote.RemoteConnection
-
scrollableCursorIsLast
public boolean scrollableCursorIsLast(java.rmi.server.ObjID remoteScrollableCursorOid)
Indicates whether the cursor is on the last row of the result set.- Specified by:
scrollableCursorIsLast
in classorg.eclipse.persistence.internal.sessions.remote.RemoteConnection
-
scrollableCursorLast
public boolean scrollableCursorLast(java.rmi.server.ObjID remoteScrollableCursorOid)
Moves the cursor to the last row in the result set- Specified by:
scrollableCursorLast
in classorg.eclipse.persistence.internal.sessions.remote.RemoteConnection
-
scrollableCursorNextObject
public java.lang.Object scrollableCursorNextObject(java.rmi.server.ObjID remoteScrollableCursorOid, ReadQuery query, DistributedSession session)
Retrieve next object from the remote scrollable cursor- Specified by:
scrollableCursorNextObject
in classorg.eclipse.persistence.internal.sessions.remote.RemoteConnection
-
scrollableCursorPreviousObject
public java.lang.Object scrollableCursorPreviousObject(java.rmi.server.ObjID remoteScrollableCursorOid, ReadQuery query, DistributedSession session)
Retrieve previous object from the remote scrollable cursor- Specified by:
scrollableCursorPreviousObject
in classorg.eclipse.persistence.internal.sessions.remote.RemoteConnection
-
scrollableCursorRelative
public boolean scrollableCursorRelative(java.rmi.server.ObjID remoteScrollableCursorOid, int rows)
Moves the cursor to the given row number in the result set- Specified by:
scrollableCursorRelative
in classorg.eclipse.persistence.internal.sessions.remote.RemoteConnection
-
scrollableCursorSize
public int scrollableCursorSize(java.rmi.server.ObjID cursorId)
Return the scrollable cursor size- Specified by:
scrollableCursorSize
in classorg.eclipse.persistence.internal.sessions.remote.RemoteConnection
-
setRemoteSessionController
public void setRemoteSessionController(RMIRemoteSessionController remoteSessionController)
INTERNAL: Set remote session controller
-
-