org.eclipse.persistence.sessions.coordination.jms
Class JMSTopicTransportManager

java.lang.Object
  extended by org.eclipse.persistence.sessions.coordination.TransportManager
      extended by org.eclipse.persistence.sessions.coordination.broadcast.BroadcastTransportManager
          extended by org.eclipse.persistence.sessions.coordination.jms.JMSTopicTransportManager

public class JMSTopicTransportManager
extends BroadcastTransportManager

Purpose: Provide a JMS transport implementation for the Remote Command Module (RCM).

Description: This class manages two connections to the same known JMS Topic: external connection for publishing, local connection for receiving messages.

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

Field Summary
static java.lang.String DEFAULT_CONNECTION_FACTORY
           
static java.lang.String DEFAULT_TOPIC
           
 
Fields inherited from class org.eclipse.persistence.sessions.coordination.TransportManager
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, REGISTRY_NAMING_SERVICE
 
Constructor Summary
JMSTopicTransportManager(RemoteCommandManager rcm)
           
 
Method Summary
 void createConnections()
          INTERNAL: JMTopicTransportManager doesn't use DiscoveryManager, therefore this method is called during RCM initialization to create all the necessary connections.
 void createExternalConnection()
          INTERNAL: JMSTopicTransportManager has maximum one external connection.
 void createLocalConnection()
          INTERNAL: JMSTopicTransportManager may have only two connections: one local and one external.
 java.util.Hashtable getConnectionsToExternalServicesForCommandPropagation()
          INTERNAL: In case there's no external connection attempts to create one, if that's successful then (in case there is no local connection, too) attempts to create local connection in a separate thread.
 java.lang.String getTopicConnectionFactoryName()
          PUBLIC: Return the JMS Topic Connection Factory Name for the JMS Topic connections.
 java.lang.String getTopicHostUrl()
          PUBLIC: Return the URL of the machine on the network that hosts the JMS Topic.
 void initialize()
          INTERNAL: Initialize default properties.
 void removeLocalConnection()
          INTERNAL: caches local connection, set localConnection to null, closes the cached connection in a new thread.
 void setNamingServiceType(int serviceType)
          ADVANCED: This funcation is not supported for naming service other than JNDI or TransportManager.JNDI_NAMING_SERVICE.
 void setTopicConnectionFactoryName(java.lang.String newTopicConnectionFactoryName)
          PUBLIC: Configure the JMS Topic Connection Factory Name for the JMS Topic connections.
 void setTopicHostUrl(java.lang.String jmsHostUrl)
          PUBLIC: Configure the URL of the machine on the network that hosts the JMS Topic.
 
Methods inherited from class org.eclipse.persistence.sessions.coordination.broadcast.BroadcastTransportManager
addConnectionToExternalService, connectBackToRemote, createConnection, createDiscoveryManager, getTopicName, setTopicName
 
Methods inherited from class org.eclipse.persistence.sessions.coordination.TransportManager
discardConnections, getConnectionsToExternalServices, getConnectionToLocalHost, getContext, getInitialContextFactoryName, getLocalContextProperties, getNamingServiceType, getPassword, getRemoteCommandManager, getRemoteContextProperties, getRemoteHostContext, getUserName, removeAllConnectionsToExternalServices, removeConnectionToExternalService, setEncryptedPassword, setEncryptionClassName, setInitialContextFactoryName, setLocalContextProperties, setPassword, setRemoteContextProperties, setShouldRemoveConnectionOnError, setUserName, shouldRemoveConnectionOnError
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_TOPIC

public static final java.lang.String DEFAULT_TOPIC
See Also:
Constant Field Values

DEFAULT_CONNECTION_FACTORY

public static final java.lang.String DEFAULT_CONNECTION_FACTORY
See Also:
Constant Field Values
Constructor Detail

JMSTopicTransportManager

public JMSTopicTransportManager(RemoteCommandManager rcm)
Method Detail

createExternalConnection

public void createExternalConnection()
INTERNAL: JMSTopicTransportManager has maximum one external connection. Verify there are no external connections, create a new external connection, add it to external connections' map.


createLocalConnection

public void createLocalConnection()
INTERNAL: JMSTopicTransportManager may have only two connections: one local and one external. In case the local connection doesn't exist, this method creates it.

Specified by:
createLocalConnection in class TransportManager

removeLocalConnection

public void removeLocalConnection()
INTERNAL: caches local connection, set localConnection to null, closes the cached connection in a new thread.

Specified by:
removeLocalConnection in class TransportManager

createConnections

public void createConnections()
INTERNAL: JMTopicTransportManager doesn't use DiscoveryManager, therefore this method is called during RCM initialization to create all the necessary connections.

Overrides:
createConnections in class BroadcastTransportManager

setTopicConnectionFactoryName

public void setTopicConnectionFactoryName(java.lang.String newTopicConnectionFactoryName)
PUBLIC: Configure the JMS Topic Connection Factory Name for the JMS Topic connections.


getTopicConnectionFactoryName

public java.lang.String getTopicConnectionFactoryName()
PUBLIC: Return the JMS Topic Connection Factory Name for the JMS Topic connections.


initialize

public void initialize()
INTERNAL: Initialize default properties.

Overrides:
initialize in class TransportManager

getTopicHostUrl

public java.lang.String getTopicHostUrl()
PUBLIC: Return the URL of the machine on the network that hosts the JMS Topic. This is a required property and must be configured.


setTopicHostUrl

public void setTopicHostUrl(java.lang.String jmsHostUrl)
PUBLIC: Configure the URL of the machine on the network that hosts the JMS Topic. This is a required property and must be configured.


setNamingServiceType

public void setNamingServiceType(int serviceType)
ADVANCED: This funcation is not supported for naming service other than JNDI or TransportManager.JNDI_NAMING_SERVICE.

Overrides:
setNamingServiceType in class TransportManager

getConnectionsToExternalServicesForCommandPropagation

public java.util.Hashtable getConnectionsToExternalServicesForCommandPropagation()
INTERNAL: In case there's no external connection attempts to create one, if that's successful then (in case there is no local connection, too) attempts to create local connection in a separate thread. Returns clone of the original map.

Overrides:
getConnectionsToExternalServicesForCommandPropagation in class TransportManager