EclipseLink 2.2.0, build 'v20110202-r8913' API Reference

org.eclipse.persistence.sessions.coordination.rmi
Class RMITransportManager

java.lang.Object
  extended by org.eclipse.persistence.sessions.coordination.TransportManager
      extended by org.eclipse.persistence.sessions.coordination.rmi.RMITransportManager

public class RMITransportManager
extends TransportManager

Purpose: Provide an RMI transport implementation for RCM.

Description: This class manages the RMI remote connections to other RCM service instances and posts the local RMI connection to this service instance in a name service so that other RCM service instances can connect to it.

Author:
Steven Vo
Since:
OracleAS TopLink 10g (9.0.4)

Field Summary
 boolean isRMIOverIIOP
          Determines whether RMI over IIOP or not
 
Fields inherited from class org.eclipse.persistence.sessions.coordination.TransportManager
connectionsToExternalServices, DEFAULT_CONTEXT_FACTORY, DEFAULT_DEDICATED_CONNECTION_KEY, DEFAULT_DEDICATED_CONNECTION_VALUE, DEFAULT_IIOP_URL_PORT, DEFAULT_IIOP_URL_PROTOCOL, DEFAULT_NAMING_SERVICE, DEFAULT_REMOVE_CONNECTION_ON_ERROR_MODE, DEFAULT_URL_PORT, DEFAULT_URL_PROTOCOL, DEFAULT_USER_NAME, JNDI_NAMING_SERVICE, localConnection, localContextProperties, namingServiceType, rcm, REGISTRY_NAMING_SERVICE, remoteContextProperties, shouldRemoveConnectionOnError
 
Constructor Summary
RMITransportManager(RemoteCommandManager rcm)
           
 
Method Summary
 org.eclipse.persistence.internal.sessions.coordination.RemoteConnection createConnection(ServiceId connectionServiceId)
          INTERNAL: Create and return an RMI remote connection to the specified service
protected  org.eclipse.persistence.internal.sessions.coordination.RemoteConnection createConnectionFromJNDI(java.lang.String remoteObjectIdentifier, java.lang.String hostURL)
          INTERNAL: Look the specified remote object up in JNDI and return a Connection to it.
protected  org.eclipse.persistence.internal.sessions.coordination.RemoteConnection createConnectionFromRegistry(java.lang.String remoteObjectIdentifier, java.lang.String hostURL)
          INTERNAL: Look the specified remote object up in the RMIRegistry and return a Connection to it.
 void createLocalConnection()
          INTERNAL: Create the local command connection for this transport in a naming service and return it.
protected  void createLocalConnectionInJNDI()
          INTERNAL: Put the local command connection of this transport in JNDI and return it
protected  org.eclipse.persistence.internal.sessions.coordination.RemoteConnection createLocalConnectionInRegistry()
          INTERNAL: Put the local command connection of this transport in the Registry and return it
 java.lang.String getDefaultLocalUrl()
          INTERNAL: Return the default local URL for JNDI lookups
 javax.naming.Context getLocalHostContext()
          INTERNAL: Return the context used for looking up in local JNDI.
 void initialize()
          INTERNAL: Initialize default properties for RMI.
 boolean isRMIOverIIOP()
          INTERNAL Check whether RMI over IIOP or not
 void removeLocalConnection()
          ADVANCED: Remove the local connection from remote accesses.
 void setIsRMIOverIIOP(boolean value)
          INTERNAL set RMI over IIOP
 
Methods inherited from class org.eclipse.persistence.sessions.coordination.TransportManager
addConnectionToExternalService, connectBackToRemote, createConnections, createDiscoveryManager, decrypt, discardConnections, encrypt, getConnectionsToExternalServices, getConnectionsToExternalServicesForCommandPropagation, getConnectionToLocalHost, getContext, getInitialContextFactoryName, getLocalContextProperties, getNamingServiceType, getPassword, getRemoteCommandManager, getRemoteContextProperties, getRemoteHostContext, getUserName, removeAllConnectionsToExternalServices, removeConnectionToExternalService, setEncryptedPassword, setEncryptionClassName, setInitialContextFactoryName, setLocalContextProperties, setNamingServiceType, setPassword, setRemoteContextProperties, setShouldRemoveConnectionOnError, setUserName, shouldRemoveConnectionOnError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isRMIOverIIOP

public boolean isRMIOverIIOP
Determines whether RMI over IIOP or not

Constructor Detail

RMITransportManager

public RMITransportManager(RemoteCommandManager rcm)
Method Detail

createConnection

public org.eclipse.persistence.internal.sessions.coordination.RemoteConnection createConnection(ServiceId connectionServiceId)
INTERNAL: Create and return an RMI remote connection to the specified service

Specified by:
createConnection in class TransportManager

createConnectionFromJNDI

protected org.eclipse.persistence.internal.sessions.coordination.RemoteConnection createConnectionFromJNDI(java.lang.String remoteObjectIdentifier,
                                                                                                           java.lang.String hostURL)
INTERNAL: Look the specified remote object up in JNDI and return a Connection to it.


createConnectionFromRegistry

protected org.eclipse.persistence.internal.sessions.coordination.RemoteConnection createConnectionFromRegistry(java.lang.String remoteObjectIdentifier,
                                                                                                               java.lang.String hostURL)
INTERNAL: Look the specified remote object up in the RMIRegistry and return a Connection to it.


createLocalConnection

public void createLocalConnection()
INTERNAL: Create the local command connection for this transport in a naming service and return it.

Specified by:
createLocalConnection in class TransportManager

createLocalConnectionInJNDI

protected void createLocalConnectionInJNDI()
INTERNAL: Put the local command connection of this transport in JNDI and return it


createLocalConnectionInRegistry

protected org.eclipse.persistence.internal.sessions.coordination.RemoteConnection createLocalConnectionInRegistry()
INTERNAL: Put the local command connection of this transport in the Registry and return it


getLocalHostContext

public javax.naming.Context getLocalHostContext()
INTERNAL: Return the context used for looking up in local JNDI.


getDefaultLocalUrl

public java.lang.String getDefaultLocalUrl()
INTERNAL: Return the default local URL for JNDI lookups


initialize

public void initialize()
INTERNAL: Initialize default properties for RMI.

Overrides:
initialize in class TransportManager

removeLocalConnection

public void removeLocalConnection()
ADVANCED: Remove the local connection from remote accesses. The implementation removes the local connection from JNDI or RMI registry and set it to null. This method is invoked internally by EclipseLink when the RCM is shutdown and should not be invoked by user's application.

Specified by:
removeLocalConnection in class TransportManager

isRMIOverIIOP

public boolean isRMIOverIIOP()
INTERNAL Check whether RMI over IIOP or not


setIsRMIOverIIOP

public void setIsRMIOverIIOP(boolean value)
INTERNAL set RMI over IIOP


EclipseLink 2.2.0, build 'v20110202-r8913' API Reference