Oracle Application Server TopLink API Reference
10g (9.0.4.3)

B10491-02

oracle.toplink.remote.rmi.iiop
Class RMIConnection

java.lang.Object
  extended byoracle.toplink.internal.remote.RemoteConnection
      extended byoracle.toplink.remote.rmi.iiop.RMIConnection

All Implemented Interfaces:
java.io.Serializable

public class RMIConnection
extends oracle.toplink.internal.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
RMIConnection(RMIRemoteSessionController controller)
          PUBLIC: The connection must be create from the server-side session controllers stub.

 

Method Summary
 void addRemoteControllerForSynchronization(java.lang.Object remoteDispatcher)
          Deprecated. Since 4.0
 void beginTransaction()
          INTERNAL: Begin a transaction on the database.
 oracle.toplink.internal.remote.RemoteUnitOfWork commitRootUnitOfWork(oracle.toplink.internal.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.
 boolean compareObjects(java.lang.Object firstObject, java.lang.Object secondObject)
          TESTING: Return if the two object match completely.
 boolean compareObjectsDontMatch(java.lang.Object firstObject, java.lang.Object secondObject)
          TESTING: Return true if the object do not match.
 boolean containsObjectInIdentityMap(java.lang.Object domainObject)
          ADVANCED: Return if their is an object for the primary key.
 boolean containsObjectInIdentityMap(java.util.Vector primaryKey, java.lang.Class theClass)
          ADVANCED: Return if their is an object for the primary key.
 Session createProxySession()
          PUBLIC: Returns a proxy session.
 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(oracle.toplink.internal.remote.RemoteCursoredStream remoteCursoredStream, ReadQuery query, RemoteSession session, int pageSize)
          Retrieve next page size of objects from the remote cursored stream
 int cursoredStreamSize(java.rmi.server.ObjID remoteCursoredStreamID)
          Return the cursored stream size
 oracle.toplink.internal.remote.RemoteCursoredStream cursorSelectObjects(CursoredStreamPolicy policy, DistributedSession session)
          INTERNAL: Returns remote cursor stream
 oracle.toplink.internal.remote.RemoteScrollableCursor cursorSelectObjects(ScrollableCursorPolicy policy, DistributedSession session)
          INTERNAL: Returns remote cursor stream
 void fixObjectReferences(oracle.toplink.internal.remote.Transporter remoteCursoredStream, ObjectLevelReadQuery query, RemoteSession session)
          INTERNAL: An object has been serialized from the server to the remote client.
 java.util.Vector getDefaultReadOnlyClasses()
          INTERNAL Return the read-only classes
 Descriptor getDescriptor(java.lang.Class domainClass)
          INTERNAL: Return the table descriptor specified for the class.
 ExceptionHandler getExceptionHandler()
          PUBLIC: Return the ExceptionHandler.Exception handler can catch errors that occur on queries or during database access.
 java.lang.Object getFromIdentityMap(java.lang.Object domainObject)
          ADVANCED: Return the object from the identity with primary and class of the given object.
 java.lang.Object getFromIdentityMap(java.util.Vector primaryKey, java.lang.Class theClass)
          ADVANCED: Return the object from the identity with the primary and class.
 java.io.Writer getLog()
          PUBLIC: Return the writer to which an accessor writes logged messages and SQL.
 DatabaseLogin getLogin()
          INTERNAL: Return the table descriptor specified for the class.
 SessionProfiler getProfiler()
          PUBLIC: Return the profiler.
 RMIRemoteSessionController getRemoteSessionController()
          INTERNAL: Return the remote session controller
 java.lang.Object getSequenceNumberNamed(java.lang.Object remoteFunctionCall)
          INTERNAL: Perform remote function call
 SessionLog getSessionLog()
          PUBLIC: Return the session log to which an accessor logs messages and SQL.
 void initializeIdentityMap(java.lang.Class theClass)
          PUBLIC: Reset the identity map for only the instances of the class.
 void initializeIdentityMapsOnServerSession()
          INTERNAL: Reset the cache on the server-side session.
 oracle.toplink.internal.remote.Transporter instantiateRemoteValueHolderOnServer(oracle.toplink.internal.remote.RemoteValueHolder remoteValueHolder)
          INTERNAL: Instantiate remote value holder on the server
 boolean isConnected()
          INTERNAL: Return if this session is connected.
 void log(SessionLogEntry entry)
          Log the log entry.
 void printIdentityMap(java.lang.Class theClass)
          PUBLIC: Used to print all the objects in the identity map of the passed in class.
 void printIdentityMaps()
          PUBLIC: Used to print all the objects in every identity map in this session.
 void processCommand(oracle.toplink.internal.remote.RemoteCommand command)
          ADVANCED: This method will send the command to the remote session for processing
 oracle.toplink.internal.remote.Transporter remoteExecute(DatabaseQuery query)
          INTERNAL: Execute the query on the server.
 oracle.toplink.internal.remote.Transporter remoteExecuteNamedQuery(java.lang.String name, java.lang.Class javaClass, java.util.Vector arguments)
          INTERNAL: Execute query remotely.
 void removeFromIdentityMap(java.lang.Object domainObject)
          ADVANCED: Remove the object from the object cache.
 void removeFromIdentityMap(java.util.Vector key, java.lang.Class theClass)
          ADVANCED: Remove the object from the object cache.
 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 set
 void 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 row
 void 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 number
 boolean scrollableCursorFirst(java.rmi.server.ObjID remoteScrollableCursorOid)
          Moves the cursor to the first row in the result set
 boolean 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 set
 java.lang.Object scrollableCursorNextObject(java.rmi.server.ObjID remoteScrollableCursorOid, ReadQuery query, RemoteSession session)
          Retrieve next object from the remote scrollable cursor
 java.lang.Object scrollableCursorPreviousObject(java.rmi.server.ObjID remoteScrollableCursorOid, ReadQuery query, RemoteSession session)
          Retrieve previous object from the remote scrollable cursor
 boolean scrollableCursorRelative(java.rmi.server.ObjID remoteScrollableCursorOid, int rows)
          Moves the cursor to the given row number in the result set
 int scrollableCursorSize(java.rmi.server.ObjID cursorId)
          Return the scrollable cursor size
 void setExceptionHandler(ExceptionHandler exceptionHandler)
          PUBLIC: Set the exceptionHandler.
 void setLog(java.io.Writer log)
          PUBLIC: Set the writer to which an accessor writes logged messages and SQL.
 void setLogin(DatabaseLogin login)
          INTERNAL: Set the login.
 void setProfiler(SessionProfiler profiler)
          PUBLIC: Set the profiler for the session.
 void setRemoteSessionController(RMIRemoteSessionController remoteSessionController)
          INTERNAL: Set remote session controller
 void setSessionLog(SessionLog sessionLog)
          PUBLIC: Set the session log to which an accessor logs messages and SQL.
 void setShouldLogMessages(boolean shouldLogMessages)
          PUBLIC: Set messages logging.
 boolean shouldLogMessages()
          Return if all messages such as executed SQL commands should be logged.
 void validateCache()
          ADVANCED: This can be used to help debugging an object identity problem.
 boolean verifyDelete(java.lang.Object domainObject)
          INTERNAL: TESTING: This is used by testing code to ensure that a deletion was successful.

 

Methods inherited from class oracle.toplink.internal.remote.RemoteConnection
getServiceName, release, setServiceName

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

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

addRemoteControllerForSynchronization

public void addRemoteControllerForSynchronization(java.lang.Object remoteDispatcher)
                                           throws java.lang.Exception
Deprecated. Since 4.0
ADVANCED: This method is intended to be used by newly connecting nodes to notify the other nodes in a distributed system to send changes to this calling server
Throws:
java.lang.Exception

processCommand

public void processCommand(oracle.toplink.internal.remote.RemoteCommand command)
ADVANCED: This method will send the command to the remote session for processing
Parameters:
command - RemoteCOmmand Contains a command that will be executed on the remote session
See Also:
oracle.toplink.internal.RemoteCommand

beginTransaction

public void beginTransaction()
INTERNAL: Begin a transaction on the database.

commitRootUnitOfWork

public oracle.toplink.internal.remote.RemoteUnitOfWork commitRootUnitOfWork(oracle.toplink.internal.remote.RemoteUnitOfWork theRemoteUnitOfWork)
INTERNAL: Commit root unit of work from the client side to the server side.

commitTransaction

public void commitTransaction()
INTERNAL: Commit a transaction on the database.

compareObjects

public boolean compareObjects(java.lang.Object firstObject,
                              java.lang.Object secondObject)
TESTING: Return if the two object match completely. This checks the objects attributes and their private parts.

compareObjectsDontMatch

public boolean compareObjectsDontMatch(java.lang.Object firstObject,
                                       java.lang.Object secondObject)
TESTING: Return true if the object do not match. This checks the objects attributes and their private parts.

containsObjectInIdentityMap

public boolean containsObjectInIdentityMap(java.lang.Object domainObject)
ADVANCED: Return if their is an object for the primary key.

containsObjectInIdentityMap

public boolean containsObjectInIdentityMap(java.util.Vector primaryKey,
                                           java.lang.Class theClass)
ADVANCED: Return if their is an object for the primary key.

createProxySession

public Session createProxySession()
PUBLIC: Returns a proxy session.

createRemoteSession

public Session createRemoteSession()
PUBLIC: Returns a remote session.

cursoredStreamClose

public void cursoredStreamClose(java.rmi.server.ObjID remoteCursoredStreamOid)
Used for closing cursored streams across RMI.

cursoredStreamNextPage

public java.util.Vector cursoredStreamNextPage(oracle.toplink.internal.remote.RemoteCursoredStream remoteCursoredStream,
ReadQuery query,
RemoteSession session,
                                               int pageSize)
Retrieve next page size of objects from the remote cursored stream

cursoredStreamSize

public int cursoredStreamSize(java.rmi.server.ObjID remoteCursoredStreamID)
Return the cursored stream size

cursorSelectObjects

public oracle.toplink.internal.remote.RemoteCursoredStream cursorSelectObjects(CursoredStreamPolicy policy,
DistributedSession session)
INTERNAL: Returns remote cursor stream

cursorSelectObjects

public oracle.toplink.internal.remote.RemoteScrollableCursor cursorSelectObjects(ScrollableCursorPolicy policy,
DistributedSession session)
INTERNAL: Returns remote cursor stream

fixObjectReferences

public void fixObjectReferences(oracle.toplink.internal.remote.Transporter remoteCursoredStream,
ObjectLevelReadQuery query,
RemoteSession 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

getDefaultReadOnlyClasses

public java.util.Vector getDefaultReadOnlyClasses()
INTERNAL Return the read-only classes

getDescriptor

public Descriptor getDescriptor(java.lang.Class domainClass)
INTERNAL: Return the table descriptor specified for the class.

getExceptionHandler

public ExceptionHandler getExceptionHandler()
PUBLIC: Return the ExceptionHandler.Exception handler can catch errors that occur on queries or during database access.

getFromIdentityMap

public java.lang.Object getFromIdentityMap(java.lang.Object domainObject)
ADVANCED: Return the object from the identity with primary and class of the given object.

getFromIdentityMap

public java.lang.Object getFromIdentityMap(java.util.Vector primaryKey,
                                           java.lang.Class theClass)
ADVANCED: Return the object from the identity with the primary and class.

getLog

public java.io.Writer getLog()
PUBLIC: Return the writer to which an accessor writes logged messages and SQL. If not set, this reference defaults to a writer on System.out. To enable logging, logMessages must be turned on.
See Also:
#logMessages()

getLogin

public DatabaseLogin getLogin()
INTERNAL: Return the table descriptor specified for the class.

getProfiler

public SessionProfiler getProfiler()
PUBLIC: Return the profiler. The profiler is a tool that can be used to determine performance bottlenecks. The profiler can be queries to print summaries and configure for logging purposes.

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

getSessionLog

public SessionLog getSessionLog()
PUBLIC: Return the session log to which an accessor logs messages and SQL. If not set, this will default to a session log on a writer on System.out. To enable logging, logMessages must be turned on.
See Also:
#logMessages()

initializeIdentityMap

public void initializeIdentityMap(java.lang.Class theClass)
PUBLIC: Reset the identity map for only the instances of the class. For inheritance the user must make sure that they only use the root class. Caution must be used in doing this to ensure that the objects within the identity map are not referenced from other objects of other classes or from the application.

initializeIdentityMapsOnServerSession

public void initializeIdentityMapsOnServerSession()
INTERNAL: Reset the cache on the server-side session.

instantiateRemoteValueHolderOnServer

public oracle.toplink.internal.remote.Transporter instantiateRemoteValueHolderOnServer(oracle.toplink.internal.remote.RemoteValueHolder remoteValueHolder)
INTERNAL: Instantiate remote value holder on the server

isConnected

public boolean isConnected()
INTERNAL: Return if this session is connected.

log

public void log(SessionLogEntry entry)
Log the log entry.

printIdentityMap

public void printIdentityMap(java.lang.Class theClass)
PUBLIC: Used to print all the objects in the identity map of the passed in class. The output of this method will go the the Session's log.

printIdentityMaps

public void printIdentityMaps()
PUBLIC: Used to print all the objects in every identity map in this session. The output of this method will go to the Session's log.

remoteExecute

public oracle.toplink.internal.remote.Transporter remoteExecute(DatabaseQuery query)
INTERNAL: Execute the query on the server.

remoteExecuteNamedQuery

public oracle.toplink.internal.remote.Transporter remoteExecuteNamedQuery(java.lang.String name,
                                                                          java.lang.Class javaClass,
                                                                          java.util.Vector arguments)
INTERNAL: Execute query remotely.

removeFromIdentityMap

public void removeFromIdentityMap(java.lang.Object domainObject)
ADVANCED: Remove the object from the object cache. Caution should be used when calling to avoid violating object identity. The application should only call this is it knows that no references to the object exist.

removeFromIdentityMap

public void removeFromIdentityMap(java.util.Vector key,
                                  java.lang.Class theClass)
ADVANCED: Remove the object from the object cache. Caution should be used when calling to avoid violating object identity. The application should only call this is it knows that no references to the object exist.

rollbackTransaction

public void rollbackTransaction()
INTERNAL: Rollback a transaction on the database.

scrollableCursorAbsolute

public boolean scrollableCursorAbsolute(java.rmi.server.ObjID remoteScrollableCursorOid,
                                        int rows)
Moves the cursor to the given row number in the result set

scrollableCursorAfterLast

public void scrollableCursorAfterLast(java.rmi.server.ObjID remoteScrollableCursorOid)
Moves the cursor to the end of the result set, just after the last row.

scrollableCursorBeforeFirst

public void scrollableCursorBeforeFirst(java.rmi.server.ObjID remoteScrollableCursorOid)
Moves the cursor to the front of the result set, just before the first row

scrollableCursorClose

public void scrollableCursorClose(java.rmi.server.ObjID remoteScrollableCursorOid)
Used for closing scrollable cursor across RMI.

scrollableCursorCurrentIndex

public int scrollableCursorCurrentIndex(java.rmi.server.ObjID remoteScrollableCursorOid)
Retrieves the current row index number

scrollableCursorFirst

public boolean scrollableCursorFirst(java.rmi.server.ObjID remoteScrollableCursorOid)
Moves the cursor to the first row in the result set

scrollableCursorIsAfterLast

public boolean scrollableCursorIsAfterLast(java.rmi.server.ObjID remoteScrollableCursorOid)
Indicates whether the cursor is after the last row in the result set.

scrollableCursorIsBeforeFirst

public boolean scrollableCursorIsBeforeFirst(java.rmi.server.ObjID remoteScrollableCursorOid)
Indicates whether the cursor is before the first row in the result set.

scrollableCursorIsFirst

public boolean scrollableCursorIsFirst(java.rmi.server.ObjID remoteScrollableCursorOid)
Indicates whether the cursor is on the first row of the result set.

scrollableCursorIsLast

public boolean scrollableCursorIsLast(java.rmi.server.ObjID remoteScrollableCursorOid)
Indicates whether the cursor is on the last row of the result set.

scrollableCursorLast

public boolean scrollableCursorLast(java.rmi.server.ObjID remoteScrollableCursorOid)
Moves the cursor to the last row in the result set

scrollableCursorNextObject

public java.lang.Object scrollableCursorNextObject(java.rmi.server.ObjID remoteScrollableCursorOid,
ReadQuery query,
RemoteSession session)
Retrieve next object from the remote scrollable cursor

scrollableCursorPreviousObject

public java.lang.Object scrollableCursorPreviousObject(java.rmi.server.ObjID remoteScrollableCursorOid,
ReadQuery query,
RemoteSession session)
Retrieve previous object from the remote scrollable cursor

scrollableCursorRelative

public boolean scrollableCursorRelative(java.rmi.server.ObjID remoteScrollableCursorOid,
                                        int rows)
Moves the cursor to the given row number in the result set

scrollableCursorSize

public int scrollableCursorSize(java.rmi.server.ObjID cursorId)
Return the scrollable cursor size

setExceptionHandler

public void setExceptionHandler(ExceptionHandler exceptionHandler)
PUBLIC: Set the exceptionHandler. Exception handler can catch errors that occur on queries or during database access.

setLog

public void setLog(java.io.Writer log)
PUBLIC: Set the writer to which an accessor writes logged messages and SQL. If not set, this reference defaults to a writer on System.out. To enable logging logMessages() is used.
See Also:
#logMessages()

setLogin

public void setLogin(DatabaseLogin login)
INTERNAL: Set the login.

setProfiler

public void setProfiler(SessionProfiler profiler)
PUBLIC: Set the profiler for the session. This allows for performance operations to be profiled.

setRemoteSessionController

public void setRemoteSessionController(RMIRemoteSessionController remoteSessionController)
INTERNAL: Set remote session controller

setSessionLog

public void setSessionLog(SessionLog sessionLog)
PUBLIC: Set the session log to which an accessor logs messages and SQL. If not set, this will default to a session log on a writer on System.out. To enable logging, logMessages must be turned on.
See Also:
#logMessages()

setShouldLogMessages

public void setShouldLogMessages(boolean shouldLogMessages)
PUBLIC: Set messages logging. Message logging will dump all SQL executed through TopLink to the session's log. By default this is System.out, but can be set to any Writer.
See Also:
setLog(Writer)

shouldLogMessages

public boolean shouldLogMessages()
Return if all messages such as executed SQL commands should be logged.

validateCache

public void validateCache()
ADVANCED: This can be used to help debugging an object identity problem. An object identity problem is when an object in the cache references an object not in the cache. This method will validate that all cached objects are in a correct state.

verifyDelete

public boolean verifyDelete(java.lang.Object domainObject)
INTERNAL: TESTING: This is used by testing code to ensure that a deletion was successful.

Copyright © 1998, 2004 Oracle Corporation. All Rights Reserved.