oracle.toplink.remote.jms
Class JMSConnection

java.lang.Object
  |
  +--oracle.toplink.internal.remote.RemoteConnection
        |
        +--oracle.toplink.remote.jms.JMSConnection
All Implemented Interfaces:
java.io.Serializable

public class JMSConnection
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
JMSConnection(oracle.toplink.remote.jms.TopicSession session, oracle.toplink.remote.jms.TopicPublisher publisher)
          PUBLIC: The connection must be create from the server-side session controllers stub.
 
Method Summary
TypeMethod
 void addRemoteControllerForSynchronization(java.lang.Object remoteDispatcher)
          Deprecated. Since 4.0
 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
 java.util.Vector getDefaultReadOnlyClasses()
          INTERNAL Return the read-only classes
 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.
 SessionProfiler getProfiler()
          PUBLIC: Return the profiler.
 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 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
 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.
 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
 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 setProfiler(SessionProfiler profiler)
          PUBLIC: Set the profiler for the session.
 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.
 
Methods inherited from class oracle.toplink.internal.remote.RemoteConnection
getServiceName, setServiceName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JMSConnection

public JMSConnection(oracle.toplink.remote.jms.TopicSession session,
                     oracle.toplink.remote.jms.TopicPublisher publisher)
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:
Method Detail

processCommand

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

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
Overrides:
addRemoteControllerForSynchronization in class oracle.toplink.internal.remote.RemoteConnection
Parameters:
remoteTransporter - Transporter This transporter contains the RemoteDispatcher of the calling server.

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.
Overrides:
compareObjects in class oracle.toplink.internal.remote.RemoteConnection

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.
Overrides:
compareObjectsDontMatch in class oracle.toplink.internal.remote.RemoteConnection

containsObjectInIdentityMap

public boolean containsObjectInIdentityMap(java.lang.Object domainObject)
ADVANCED: Return if their is an object for the primary key.
Overrides:
containsObjectInIdentityMap in class oracle.toplink.internal.remote.RemoteConnection

containsObjectInIdentityMap

public boolean containsObjectInIdentityMap(java.util.Vector primaryKey,
                                           java.lang.Class theClass)
ADVANCED: Return if their is an object for the primary key.
Overrides:
containsObjectInIdentityMap in class oracle.toplink.internal.remote.RemoteConnection

createProxySession

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

createRemoteSession

public Session createRemoteSession()
PUBLIC: Returns a remote session.
Overrides:
createRemoteSession in class oracle.toplink.internal.remote.RemoteConnection

cursoredStreamClose

public void cursoredStreamClose(java.rmi.server.ObjID remoteCursoredStreamOid)
Used for closing cursored streams across RMI.
Overrides:
cursoredStreamClose in class oracle.toplink.internal.remote.RemoteConnection

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
Overrides:
cursoredStreamNextPage in class oracle.toplink.internal.remote.RemoteConnection

cursoredStreamSize

public int cursoredStreamSize(java.rmi.server.ObjID remoteCursoredStreamID)
Return the cursored stream size
Overrides:
cursoredStreamSize in class oracle.toplink.internal.remote.RemoteConnection

getDefaultReadOnlyClasses

public java.util.Vector getDefaultReadOnlyClasses()
INTERNAL Return the read-only classes
Overrides:
getDefaultReadOnlyClasses in class oracle.toplink.internal.remote.RemoteConnection

getExceptionHandler

public ExceptionHandler getExceptionHandler()
PUBLIC: Return the ExceptionHandler.Exception handler can catch errors that occur on queries or during database access.
Overrides:
getExceptionHandler in class oracle.toplink.internal.remote.RemoteConnection

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.
Overrides:
getFromIdentityMap in class oracle.toplink.internal.remote.RemoteConnection

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.
Overrides:
getFromIdentityMap in class oracle.toplink.internal.remote.RemoteConnection

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.
Overrides:
getLog in class oracle.toplink.internal.remote.RemoteConnection
See Also:
#logMessages()

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.
Overrides:
getProfiler in class oracle.toplink.internal.remote.RemoteConnection

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.
Overrides:
getSessionLog in class oracle.toplink.internal.remote.RemoteConnection
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.
Overrides:
initializeIdentityMap in class oracle.toplink.internal.remote.RemoteConnection

log

public void log(SessionLogEntry entry)
Log the log entry.
Overrides:
log in class oracle.toplink.internal.remote.RemoteConnection

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.
Overrides:
printIdentityMap in class oracle.toplink.internal.remote.RemoteConnection

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.
Overrides:
printIdentityMaps in class oracle.toplink.internal.remote.RemoteConnection

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.
Overrides:
removeFromIdentityMap in class oracle.toplink.internal.remote.RemoteConnection

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.
Overrides:
removeFromIdentityMap in class oracle.toplink.internal.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
Overrides:
scrollableCursorAbsolute in class oracle.toplink.internal.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.
Overrides:
scrollableCursorAfterLast in class oracle.toplink.internal.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
Overrides:
scrollableCursorBeforeFirst in class oracle.toplink.internal.remote.RemoteConnection

scrollableCursorClose

public void scrollableCursorClose(java.rmi.server.ObjID remoteScrollableCursorOid)
Used for closing scrollable cursor across RMI.
Overrides:
scrollableCursorClose in class oracle.toplink.internal.remote.RemoteConnection

scrollableCursorCurrentIndex

public int scrollableCursorCurrentIndex(java.rmi.server.ObjID remoteScrollableCursorOid)
Retrieves the current row index number
Overrides:
scrollableCursorCurrentIndex in class oracle.toplink.internal.remote.RemoteConnection

scrollableCursorFirst

public boolean scrollableCursorFirst(java.rmi.server.ObjID remoteScrollableCursorOid)
Moves the cursor to the first row in the result set
Overrides:
scrollableCursorFirst in class oracle.toplink.internal.remote.RemoteConnection

scrollableCursorIsAfterLast

public boolean scrollableCursorIsAfterLast(java.rmi.server.ObjID remoteScrollableCursorOid)
Indicates whether the cursor is after the last row in the result set.
Overrides:
scrollableCursorIsAfterLast in class oracle.toplink.internal.remote.RemoteConnection

scrollableCursorIsBeforeFirst

public boolean scrollableCursorIsBeforeFirst(java.rmi.server.ObjID remoteScrollableCursorOid)
Indicates whether the cursor is before the first row in the result set.
Overrides:
scrollableCursorIsBeforeFirst in class oracle.toplink.internal.remote.RemoteConnection

scrollableCursorIsFirst

public boolean scrollableCursorIsFirst(java.rmi.server.ObjID remoteScrollableCursorOid)
Indicates whether the cursor is on the first row of the result set.
Overrides:
scrollableCursorIsFirst in class oracle.toplink.internal.remote.RemoteConnection

scrollableCursorIsLast

public boolean scrollableCursorIsLast(java.rmi.server.ObjID remoteScrollableCursorOid)
Indicates whether the cursor is on the last row of the result set.
Overrides:
scrollableCursorIsLast in class oracle.toplink.internal.remote.RemoteConnection

scrollableCursorLast

public boolean scrollableCursorLast(java.rmi.server.ObjID remoteScrollableCursorOid)
Moves the cursor to the last row in the result set
Overrides:
scrollableCursorLast in class oracle.toplink.internal.remote.RemoteConnection

scrollableCursorNextObject

public java.lang.Object scrollableCursorNextObject(java.rmi.server.ObjID remoteScrollableCursorOid,
                                                   ReadQuery query,
                                                   RemoteSession session)
Retrieve next object from the remote scrollable cursor
Overrides:
scrollableCursorNextObject in class oracle.toplink.internal.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
Overrides:
scrollableCursorRelative in class oracle.toplink.internal.remote.RemoteConnection

scrollableCursorSize

public int scrollableCursorSize(java.rmi.server.ObjID cursorId)
Return the scrollable cursor size
Overrides:
scrollableCursorSize in class oracle.toplink.internal.remote.RemoteConnection

setExceptionHandler

public void setExceptionHandler(ExceptionHandler exceptionHandler)
PUBLIC: Set the exceptionHandler. Exception handler can catch errors that occur on queries or during database access.
Overrides:
setExceptionHandler in class oracle.toplink.internal.remote.RemoteConnection

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.
Overrides:
setLog in class oracle.toplink.internal.remote.RemoteConnection
See Also:
#logMessages()

setProfiler

public void setProfiler(SessionProfiler profiler)
PUBLIC: Set the profiler for the session. This allows for performance operations to be profiled.
Overrides:
setProfiler in class oracle.toplink.internal.remote.RemoteConnection

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.
Overrides:
setSessionLog in class oracle.toplink.internal.remote.RemoteConnection
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.
Overrides:
setShouldLogMessages in class oracle.toplink.internal.remote.RemoteConnection
See Also:
setLog(Writer)

shouldLogMessages

public boolean shouldLogMessages()
Return if all messages such as executed SQL commands should be logged.
Overrides:
shouldLogMessages in class oracle.toplink.internal.remote.RemoteConnection

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.
Overrides:
validateCache in class oracle.toplink.internal.remote.RemoteConnection