oracle.toplink.remote.rmi
Class RMIJNDIClusteringService

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--oracle.toplink.remote.AbstractClusteringService
              |
              +--oracle.toplink.remote.AbstractJNDIClusteringService
                    |
                    +--oracle.toplink.remote.rmi.RMIJNDIClusteringService
All Implemented Interfaces:
java.lang.Runnable

public class RMIJNDIClusteringService
extends AbstractJNDIClusteringService

PURPOSE:To Provide a framework for offering customers the ability to automatically connect multiple sessions for synchrnization.

Descripton:This thread object will place a remote dispatcher in the specified JNDI space. it will also monitor the specified multicast socket to allow other sessions to connect. This Particular class has been configured to use the RMI transport protocols. This class also assumes that there is a JNDI service available. And is best used within an application server.

See Also:
CacheSynchronizationManager, oracle.toplink.remote.

Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
RMIJNDIClusteringService(Session session)
          PUBLIC: Creates a RMIJNDIClusteringService
RMIJNDIClusteringService(java.lang.String multicastAddress, int multicastPort, Session session)
          ADVANCED: Creates a RMIJNDIClusteringService
 
Method Summary
TypeMethod
 oracle.toplink.internal.remote.RemoteConnection createRemoteConnection(java.lang.String sessionId, java.lang.String jndiHostURL)
          ADVANCED: This method should return a remote connection of the appropraite type for use in the synchronizatio
 java.net.MulticastSocket getCommunicationSocket()
          ADVANCED: Returns the socket that will be used for the multicast communication.
 java.lang.Object getDispatcher()
          ADVANCED: This is the object that will be placed in JNDI to provide remote synchronization services
 oracle.toplink.internal.remote.RemoteConnection getLocalRemoteConnection()
          ADVANCED: This method should return a Remote Connection of the appropriate type that references the Remote dispatcher for this Session
 void registerDispatcher()
          ADVANCED: This method will register the dispatcher for this session in JNDI on the specified host.
 
Methods inherited from class oracle.toplink.remote.AbstractJNDIClusteringService
getContext, getInitialContextProperties, getPassword, getUserName, setContext, setInitialContextFactoryName, setInitialContextProperties, setLocalHostURL, setPassword, setUserName
 
Methods inherited from class oracle.toplink.remote.AbstractClusteringService
getAnnouncementDelay, getMulticastGroupAddress, getMulticastPort, getSessionId, getTimeToLive, setAnnouncementDelay, setDispatcher, setMulticastGroupAddress, setMulticastPort, setSessionId, setTimeToLive, stopListening
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RMIJNDIClusteringService

public RMIJNDIClusteringService(java.lang.String multicastAddress,
                                int multicastPort,
                                Session session)
ADVANCED: Creates a RMIJNDIClusteringService
Parameters:
multicastAddress - The address of the multicast group
multicastPort - The port the multicast group is listening on

RMIJNDIClusteringService

public RMIJNDIClusteringService(Session session)
PUBLIC: Creates a RMIJNDIClusteringService
Method Detail

registerDispatcher

public void registerDispatcher()
ADVANCED: This method will register the dispatcher for this session in JNDI on the specified host. It must register the dispatcher under the SessionId
Overrides:
registerDispatcher in class AbstractClusteringService
Following copied from class: oracle.toplink.remote.AbstractClusteringService
Parameters:
jndiHostURL - This is the URL that will be used to register the synchronization service

createRemoteConnection

public oracle.toplink.internal.remote.RemoteConnection createRemoteConnection(java.lang.String sessionId,
                                                                              java.lang.String jndiHostURL)
ADVANCED: This method should return a remote connection of the appropraite type for use in the synchronizatio
Overrides:
createRemoteConnection in class AbstractClusteringService

getCommunicationSocket

public java.net.MulticastSocket getCommunicationSocket()
ADVANCED: Returns the socket that will be used for the multicast communication. By default this will be java.net.MulticastSocket
Overrides:
getCommunicationSocket in class AbstractClusteringService

getDispatcher

public java.lang.Object getDispatcher()
                               throws java.rmi.RemoteException
ADVANCED: This is the object that will be placed in JNDI to provide remote synchronization services
Overrides:
getDispatcher in class AbstractClusteringService

getLocalRemoteConnection

public oracle.toplink.internal.remote.RemoteConnection getLocalRemoteConnection()
ADVANCED: This method should return a Remote Connection of the appropriate type that references the Remote dispatcher for this Session
Overrides:
getLocalRemoteConnection in class AbstractClusteringService