Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Configuring a JMS Coordinated Cache (ELUG)"

m (New page: <div style="float:right;border:1px solid #000000;padding:5px">__TOC__ Related Topics</div> This section describes the ...)
 
m (How to Configure a Topic Name Using Java)
 
(15 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
<div style="float:right;border:1px solid #000000;padding:5px">__TOC__
 
<div style="float:right;border:1px solid #000000;padding:5px">__TOC__
 
[[Special:Whatlinkshere/Configuring a JMS Coordinated Cache (ELUG)|Related Topics]]</div>
 
[[Special:Whatlinkshere/Configuring a JMS Coordinated Cache (ELUG)|Related Topics]]</div>
 
This section describes the various components that you must configure in order to use a JMS coordinated cache.
 
 
[[#Table 100-1|Configurable Options for a JMS Coordinated Cache]] lists the configurable options for a JMS coordinated cache.
 
 
 
 
==Introduction to JMS Coordinated Cache Configuration==
 
 
This table lists the configurable options for a JMS coordinated cache.
 
 
  
 
<span id="Table 100-1"></span>
 
<span id="Table 100-1"></span>
Line 23: Line 12:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r2c1-t2" headers="r1c1-t2" align="left" |
 
| id="r2c1-t2" headers="r1c1-t2" align="left" |
Cache coordination change propagation at the descriptor level (see [[Configuring%20a%20Descriptor%20(ELUG)#Configuring Cache Coordination Change Propagation at the Descriptor Level|Configuring Cache Coordination Change Propagation at the Descriptor Level]])
+
[[Configuring%20a%20Descriptor%20(ELUG)#Configuring Cache Coordination Change Propagation at the Descriptor Level|Cache coordination change propagation at the descriptor level]]
 
| headers="r2c1-t2 r1c2-t2" align="left" |
 
| headers="r2c1-t2 r1c2-t2" align="left" |
 
[[Image:support.gif|Supported]]<br>
 
[[Image:support.gif|Supported]]<br>
Line 30: Line 19:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r3c1-t2" headers="r1c1-t2" align="left" |
 
| id="r3c1-t2" headers="r1c1-t2" align="left" |
Synchronous change propagation mode (see [[Configuring%20a%20Coordinated%20Cache%20(ELUG)#Configuring the Synchronous Change Propagation Mode|Configuring the Synchronous Change Propagation Mode]])
+
[[Configuring%20a%20Coordinated%20Cache%20(ELUG)#Configuring the Synchronous Change Propagation Mode|Synchronous change propagation mode]]
 
| headers="r3c1-t2 r1c2-t2" align="left" |
 
| headers="r3c1-t2 r1c2-t2" align="left" |
 
[[Image:support.gif|Supported]]<br>
 
[[Image:support.gif|Supported]]<br>
Line 37: Line 26:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r4c1-t2" headers="r1c1-t2" align="left" |
 
| id="r4c1-t2" headers="r1c1-t2" align="left" |
JNDI naming service (see [[Configuring%20a%20Coordinated%20Cache%20(ELUG)#Configuring JNDI Naming Service Information|Configuring JNDI Naming Service Information]])
+
[[Configuring%20a%20Coordinated%20Cache%20(ELUG)#Configuring JNDI Naming Service Information|JNDI naming service information]]
 
| headers="r4c1-t2 r1c2-t2" align="left" |
 
| headers="r4c1-t2 r1c2-t2" align="left" |
 
[[Image:support.gif|Supported]]<br>
 
[[Image:support.gif|Supported]]<br>
Line 44: Line 33:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r5c1-t2" headers="r1c1-t2" align="left" |
 
| id="r5c1-t2" headers="r1c1-t2" align="left" |
Topic name (see [[#Configuring a Topic Name|Configuring a Topic Name]])
+
[[#Configuring a Topic Name|Topic name]]
 
| headers="r5c1-t2 r1c2-t2" align="left" |
 
| headers="r5c1-t2 r1c2-t2" align="left" |
 
[[Image:support.gif|Supported]]<br>
 
[[Image:support.gif|Supported]]<br>
Line 51: Line 40:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r6c1-t2" headers="r1c1-t2" align="left" |
 
| id="r6c1-t2" headers="r1c1-t2" align="left" |
Topic connection factory name (see [[#Configuring a Topic Connection Factory Name|Configuring a Topic Connection Factory Name]])
+
[[#Configuring a Topic Connection Factory Name|Topic connection factory name]]
 
| headers="r6c1-t2 r1c2-t2" align="left" |
 
| headers="r6c1-t2 r1c2-t2" align="left" |
 
[[Image:support.gif|Supported]]<br>
 
[[Image:support.gif|Supported]]<br>
Line 58: Line 47:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r7c1-t2" headers="r1c1-t2" align="left" |
 
| id="r7c1-t2" headers="r1c1-t2" align="left" |
Topic host URSL (see [[#Configuring a Topic Host URL]])
+
[[#Configuring a Topic Host URL|Topic host URL]]
 
| headers="r7c1-t2 r1c2-t2" align="left" |
 
| headers="r7c1-t2 r1c2-t2" align="left" |
 
[[Image:support.gif|Supported]]<br>
 
[[Image:support.gif|Supported]]<br>
Line 65: Line 54:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r8c1-t2" headers="r1c1-t2" align="left" |
 
| id="r8c1-t2" headers="r1c1-t2" align="left" |
Connection handling (see [[#Configuring Connection Handling]])
+
[[#Configuring Connection Handling|Connection handling ]]
 
| headers="r8c1-t2 r1c2-t2" align="left" |
 
| headers="r8c1-t2 r1c2-t2" align="left" |
 
[[Image:support.gif|Supported]]<br>
 
[[Image:support.gif|Supported]]<br>
Line 72: Line 61:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r9c1-t2" headers="r1c1-t2" align="left" |
 
| id="r9c1-t2" headers="r1c1-t2" align="left" |
Context properties (see [[Configuring%20a%20Coordinated%20Cache%20(ELUG)#Configuring Context Properties|Configuring Context Properties]])
+
[[Configuring%20a%20Coordinated%20Cache%20(ELUG)#Configuring Context Properties|Context properties]]
 
| headers="r9c1-t2 r1c2-t2" align="left" |
 
| headers="r9c1-t2 r1c2-t2" align="left" |
 
[[Image:support.gif|Supported]]<br>
 
[[Image:support.gif|Supported]]<br>
Line 79: Line 68:
 
|- align="left" valign="top"
 
|- align="left" valign="top"
 
| id="r10c1-t2" headers="r1c1-t2" align="left" |
 
| id="r10c1-t2" headers="r1c1-t2" align="left" |
Packet time-to-live (see [[Configuring%20a%20Coordinated%20Cache%20(ELUG)#Configuring a Packet Time-to-Live|Configuring a Packet Time-to-Live]])
+
[[Configuring%20a%20Coordinated%20Cache%20(ELUG)#Configuring a Packet Time-to-Live|Packet time-to-live]]
 
| headers="r10c1-t2 r1c2-t2" align="left" |
 
| headers="r10c1-t2 r1c2-t2" align="left" |
 
[[Image:unsupport.gif|Unsupported.]]<br>
 
[[Image:unsupport.gif|Unsupported.]]<br>
Line 86: Line 75:
 
|}
 
|}
  
<br>
 
  
==Configuring a Topic Name==
 
  
 +
 +
==Configuring a Topic Name==
 
A JMS topic identifies a publish/subscribe destination for a JMS server. JMS users who wish to share messages subscribe to the same JMS topic.
 
A JMS topic identifies a publish/subscribe destination for a JMS server. JMS users who wish to share messages subscribe to the same JMS topic.
  
Line 99: Line 88:
  
 
===How to Configure a Topic Name Using Workbench===
 
===How to Configure a Topic Name Using Workbench===
 
 
To specify the topic name for JMS cache coordination, use this procedure:
 
To specify the topic name for JMS cache coordination, use this procedure:
 
 
# Select a server session in the '''Navigator'''. Its properties appear in the Editor.
 
# Select a server session in the '''Navigator'''. Its properties appear in the Editor.
 
# Click the '''Cache Coordination''' tab. The Cache Coordination tab appears.
 
# Click the '''Cache Coordination''' tab. The Cache Coordination tab appears.
Line 109: Line 96:
 
Enter the topic name to use with the JMS coordinated cache for this session. This must be a fully qualified JNDI name, such as <tt>jms/</tt>''<tt><topic_name></tt>''.
 
Enter the topic name to use with the JMS coordinated cache for this session. This must be a fully qualified JNDI name, such as <tt>jms/</tt>''<tt><topic_name></tt>''.
  
'''See Also'''
 
  
: [[#Configuring a Topic Name|Configuring a Topic Name]]
+
 
 +
===How to Configure a Topic Name Using Java===
 +
Use the <tt>org.eclipse.persistence.sessions.coordination.broadcast.BroadcastTransportManager</tt> method <tt>setTopicName</tt> to configure the Topic name for the Topic to which this transport manager will be connecting.
 +
 
 +
You obtain the <tt>BroadcastTransportManager</tt> using the following <tt>Session</tt> API:
 +
Session.getCommandManager().getTransportManager()
  
 
==Configuring a Topic Connection Factory Name==
 
==Configuring a Topic Connection Factory Name==
 
 
A JMS topic connection factory creates connections with the JMS provider for a specific JMS destination. Each connection factory contains the specific configuration information to create a connection to a JMS destination.
 
A JMS topic connection factory creates connections with the JMS provider for a specific JMS destination. Each connection factory contains the specific configuration information to create a connection to a JMS destination.
  
Line 122: Line 112:
  
 
===How to Configure a Topic Connection Factory Name Using Workbench===
 
===How to Configure a Topic Connection Factory Name Using Workbench===
 
 
To specify the topic connection factory for a JMS coordinated cache, use this procedure:
 
To specify the topic connection factory for a JMS coordinated cache, use this procedure:
 
 
# Select a server session in the '''Navigator'''. Its properties appear in the Editor.
 
# Select a server session in the '''Navigator'''. Its properties appear in the Editor.
 
# Click the '''Cache Coordination''' tab. The Cache Coordination tab appears.
 
# Click the '''Cache Coordination''' tab. The Cache Coordination tab appears.
Line 132: Line 120:
 
Enter the topic connection factory name to use with the JMS coordinated cache for this session. This must be a fully qualified JNDI name, such as <tt>jms/</tt>''<tt><resource_name></tt>''.
 
Enter the topic connection factory name to use with the JMS coordinated cache for this session. This must be a fully qualified JNDI name, such as <tt>jms/</tt>''<tt><resource_name></tt>''.
  
'''See Also'''
 
  
: [[#Configuring a Topic Connection Factory Name|Configuring a Topic Connection Factory Name]]
 
  
==Configuring a Topic Host URL==
+
===How to Configure a Topic Connection Factory Name Using Java===
 +
Use the <tt>org.eclipse.persistence.sessions.coordination.jms.JMSTopicTransportManager</tt> method <tt>setTopicConnectionFactoryName</tt> to configure the the JMS Topic connection factory name for the JMS Topic connections.
 +
 
 +
You obtain the <tt>JMSTopicTransportManager</tt> using the following <tt>Session</tt> API:
 +
Session.getCommandManager().getTransportManager()
  
 +
==Configuring a Topic Host URL==
 
The JMS topic host URL is the URL of the machine on the network that hosts the JMS topic (see [[#Configuring a Topic Name|Configuring a Topic Name]]).
 
The JMS topic host URL is the URL of the machine on the network that hosts the JMS topic (see [[#Configuring a Topic Name|Configuring a Topic Name]]).
  
Line 143: Line 134:
  
 
===How to Configure a Topic Host URL Using Workbench===
 
===How to Configure a Topic Host URL Using Workbench===
 
 
To specify the topic host URL for a JMS coordinated cache, use this procedure:
 
To specify the topic host URL for a JMS coordinated cache, use this procedure:
 
 
# Select a server session in the '''Navigator'''. Its properties appear in the Editor.
 
# Select a server session in the '''Navigator'''. Its properties appear in the Editor.
 
# Click the '''Cache Coordination''' tab. The Cache Coordination tab appears.
 
# Click the '''Cache Coordination''' tab. The Cache Coordination tab appears.
Line 152: Line 141:
 
Enter the URL of the machine on the network that hosts the JMS topic (see [[#Configuring a Topic Name|Configuring a Topic Name]]) to use with the JMS coordinated cache for this session.
 
Enter the URL of the machine on the network that hosts the JMS topic (see [[#Configuring a Topic Name|Configuring a Topic Name]]) to use with the JMS coordinated cache for this session.
  
'''See Also'''
 
  
: [[#Configuring a Topic Host URL|Configuring a Topic Host URL]]
+
 
 +
===How to Configure a Topic Host URL Using Java===
 +
Use the <tt>org.eclipse.persistence.sessions.coordination.jms.JMSTopicTransportManager</tt> method <tt>setTopicHostUrl</tt> to configure the URL of the computer on the network that hosts the JMS Topic.
 +
 
 +
You obtain the <tt>JMSTopicTransportManager</tt> using the following <tt>Session</tt> API:
 +
Session.getCommandManager().getTransportManager()
  
 
==Configuring Connection Handling==
 
==Configuring Connection Handling==
 
 
The session's transport manager creates connections to the various members of the coordinated cache. If a communication error occurs on one of these connections, you can configure the session to either ignore the error or remove the connection.
 
The session's transport manager creates connections to the various members of the coordinated cache. If a communication error occurs on one of these connections, you can configure the session to either ignore the error or remove the connection.
  
 
If you configure the session to remove the connection on error, the next time the session tries to communicate with that coordinated cache member, it will construct a new connection. If an error occurs during the connection creation phase, EclipseLink will either throw a <tt>RemoteCommandManagerException.ERROR_CREATING_JMS_CONNECTION</tt> (if the error occurred while sending a message) or a <tt>RemoteCommandManagerException.ERROR_CREATING_LOCAL_JMS_CONNECTION</tt> (if the error occurred while receiving a message). If you want to recover from this failure, consider the following options:
 
If you configure the session to remove the connection on error, the next time the session tries to communicate with that coordinated cache member, it will construct a new connection. If an error occurs during the connection creation phase, EclipseLink will either throw a <tt>RemoteCommandManagerException.ERROR_CREATING_JMS_CONNECTION</tt> (if the error occurred while sending a message) or a <tt>RemoteCommandManagerException.ERROR_CREATING_LOCAL_JMS_CONNECTION</tt> (if the error occurred while receiving a message). If you want to recover from this failure, consider the following options:
 
 
* You may choose to take no action: messages will not be sent or received.
 
* You may choose to take no action: messages will not be sent or received.
 
* You may choose to handle the exception. You may do so by changing some of the <tt>org.eclipse.persistence.sessions.coordination.jms.JMSTopicTransportManager</tt> settings and calling the <tt>createExternalConnection</tt> or <tt>createInternalConnection</tt> method of the <tt>JMSTopicTransportManager</tt>.
 
* You may choose to handle the exception. You may do so by changing some of the <tt>org.eclipse.persistence.sessions.coordination.jms.JMSTopicTransportManager</tt> settings and calling the <tt>createExternalConnection</tt> or <tt>createInternalConnection</tt> method of the <tt>JMSTopicTransportManager</tt>.
  
 
If you configure the session to ignore the error, the next time the session tries to communicate with that coordinated cache member, it will continue to use the same connection. In this case, if the listening (local) connection gets a <tt>RemoteCommandManagerException.ERROR_RECEIVING_JMS_MESSAGE</tt> exception, the coordinated cache waits for 10 seconds before resuming listening. If you want to recover from this failure, consider the following options:
 
If you configure the session to ignore the error, the next time the session tries to communicate with that coordinated cache member, it will continue to use the same connection. In this case, if the listening (local) connection gets a <tt>RemoteCommandManagerException.ERROR_RECEIVING_JMS_MESSAGE</tt> exception, the coordinated cache waits for 10 seconds before resuming listening. If you want to recover from this failure, consider the following options:
 
 
* You may choose to take no action (wait for the connection recovery).
 
* You may choose to take no action (wait for the connection recovery).
 
* You may choose to handle the <tt>RemoteCommandManagerException.ERROR_PROPAGATING_COMMAND</tt> or <tt>RemoteCommandManagerException.ERROR_RECEIVING_JMS_MESSAGE</tt> exception. You may do so by shutting down the remote command manager.
 
* You may choose to handle the <tt>RemoteCommandManagerException.ERROR_PROPAGATING_COMMAND</tt> or <tt>RemoteCommandManagerException.ERROR_RECEIVING_JMS_MESSAGE</tt> exception. You may do so by shutting down the remote command manager.
Line 175: Line 165:
  
 
===How to Configure Connection Handling Using Workbench===
 
===How to Configure Connection Handling Using Workbench===
 
 
To specify how EclipseLink handles session connections in the event of an error, use this procedure:
 
To specify how EclipseLink handles session connections in the event of an error, use this procedure:
 
 
# Select a session or session broker in the '''Navigator'''. Its properties appear in the Editor.
 
# Select a session or session broker in the '''Navigator'''. Its properties appear in the Editor.
 
# Click the '''Cache Coordination''' tab. The Cache Coordination tab appears.
 
# Click the '''Cache Coordination''' tab. The Cache Coordination tab appears.
Line 183: Line 171:
 
# Select the '''Remove Connection on Error''' option to configure the session to remove the data source connection in the event of an error.
 
# Select the '''Remove Connection on Error''' option to configure the session to remove the data source connection in the event of an error.
  
Select the '''Remove Connection on Error''' option to configure the session to remove the data source connection in the event of an error.
 
  
'''See Also'''
 
  
: [[#Configuring Connection Handling|Configuring Connection Handling]]
+
===How to Configure Connection Handling Using Java===
 +
Use the <tt>org.eclipse.persistence.sessions.coordination.TransportManager</tt>
 +
method <tt>setShouldRemoveConnectionOnError</tt> to define whether connections to remote services should be disconnected when an error occurs.
  
 +
You obtain the <tt>TransportManager</tt> using the following <tt>Session</tt> API:
 +
Session.getCommandManager().getTransportManager()
  
  
Line 196: Line 186:
  
 
[[Category: EclipseLink User's Guide]]
 
[[Category: EclipseLink User's Guide]]
[[Category: Draft]]
+
[[Category: Release 1]]
 
[[Category: Task]]
 
[[Category: Task]]

Latest revision as of 10:13, 23 April 2009

Configurable Options for a JMS Coordinated Cache

Option to Configure EclipseLink Workbench Java

Cache coordination change propagation at the descriptor level

Supported

Supported

Synchronous change propagation mode

Supported

Supported

JNDI naming service information

Supported

Supported

Topic name

Supported

Supported

Topic connection factory name

Supported

Supported

Topic host URL

Supported

Supported

Connection handling

Supported

Supported

Context properties

Supported

Supported

Packet time-to-live

Unsupported.

Supported



Configuring a Topic Name

A JMS topic identifies a publish/subscribe destination for a JMS server. JMS users who wish to share messages subscribe to the same JMS topic.

The topic name you configure is the name that EclipseLink uses to look up the javax.jms.Topic instance from the JNDI service. You must provide a fully qualified JNDI name, such as jms/<topic_name>.

All the members of the same JMS coordinated cache must use the same JMS topic.


How to Configure a Topic Name Using Workbench

To specify the topic name for JMS cache coordination, use this procedure:

  1. Select a server session in the Navigator. Its properties appear in the Editor.
  2. Click the Cache Coordination tab. The Cache Coordination tab appears.
  3. Ensure Enable Cache Coordination is selected and the Type is JMS (see Cache Coordination for more information).
    Cache Coordination Tab, Topic Name Field, JMS
    Cache Coordination Tab, Topic Name Field, JMS

  4. Enter the topic name to use with the JMS coordinated cache for this session. This must be a fully qualified JNDI name, such as jms/<topic_name>.

Enter the topic name to use with the JMS coordinated cache for this session. This must be a fully qualified JNDI name, such as jms/<topic_name>.


How to Configure a Topic Name Using Java

Use the org.eclipse.persistence.sessions.coordination.broadcast.BroadcastTransportManager method setTopicName to configure the Topic name for the Topic to which this transport manager will be connecting.

You obtain the BroadcastTransportManager using the following Session API:

Session.getCommandManager().getTransportManager()

Configuring a Topic Connection Factory Name

A JMS topic connection factory creates connections with the JMS provider for a specific JMS destination. Each connection factory contains the specific configuration information to create a connection to a JMS destination.

The topic connection factory name you configure is the name that EclipseLink uses to look up the javax.jms.TopicConnectionFactory instance from the JNDI service. This must be a fully qualified JNDI name, such as jms/<resource_name>.


How to Configure a Topic Connection Factory Name Using Workbench

To specify the topic connection factory for a JMS coordinated cache, use this procedure:

  1. Select a server session in the Navigator. Its properties appear in the Editor.
  2. Click the Cache Coordination tab. The Cache Coordination tab appears.
  3. Ensure Enable Cache Coordination is selected and the Type is JMS (see Cache Coordination for more information).
    Cache Coordination Tab, Topic Connection Factory Name Field
    Cache Coordination Tab, Topic Connection Factory Name Field

  4. Enter the topic connection factory name to use with the JMS coordinated cache for this session. This must be a fully qualified JNDI name, such as jms/<resource_name>.

Enter the topic connection factory name to use with the JMS coordinated cache for this session. This must be a fully qualified JNDI name, such as jms/<resource_name>.


How to Configure a Topic Connection Factory Name Using Java

Use the org.eclipse.persistence.sessions.coordination.jms.JMSTopicTransportManager method setTopicConnectionFactoryName to configure the the JMS Topic connection factory name for the JMS Topic connections.

You obtain the JMSTopicTransportManager using the following Session API:

Session.getCommandManager().getTransportManager()

Configuring a Topic Host URL

The JMS topic host URL is the URL of the machine on the network that hosts the JMS topic (see Configuring a Topic Name).


How to Configure a Topic Host URL Using Workbench

To specify the topic host URL for a JMS coordinated cache, use this procedure:

  1. Select a server session in the Navigator. Its properties appear in the Editor.
  2. Click the Cache Coordination tab. The Cache Coordination tab appears.
  3. Ensure Enable Cache Coordination is selected and the Type is JMS (see Cache Coordination for more information).
    Cache Coordination Tab, Topic Host URL Field
    Cache Coordination Tab, Topic Host URL Field

Enter the URL of the machine on the network that hosts the JMS topic (see Configuring a Topic Name) to use with the JMS coordinated cache for this session.


How to Configure a Topic Host URL Using Java

Use the org.eclipse.persistence.sessions.coordination.jms.JMSTopicTransportManager method setTopicHostUrl to configure the URL of the computer on the network that hosts the JMS Topic.

You obtain the JMSTopicTransportManager using the following Session API:

Session.getCommandManager().getTransportManager()

Configuring Connection Handling

The session's transport manager creates connections to the various members of the coordinated cache. If a communication error occurs on one of these connections, you can configure the session to either ignore the error or remove the connection.

If you configure the session to remove the connection on error, the next time the session tries to communicate with that coordinated cache member, it will construct a new connection. If an error occurs during the connection creation phase, EclipseLink will either throw a RemoteCommandManagerException.ERROR_CREATING_JMS_CONNECTION (if the error occurred while sending a message) or a RemoteCommandManagerException.ERROR_CREATING_LOCAL_JMS_CONNECTION (if the error occurred while receiving a message). If you want to recover from this failure, consider the following options:

  • You may choose to take no action: messages will not be sent or received.
  • You may choose to handle the exception. You may do so by changing some of the org.eclipse.persistence.sessions.coordination.jms.JMSTopicTransportManager settings and calling the createExternalConnection or createInternalConnection method of the JMSTopicTransportManager.

If you configure the session to ignore the error, the next time the session tries to communicate with that coordinated cache member, it will continue to use the same connection. In this case, if the listening (local) connection gets a RemoteCommandManagerException.ERROR_RECEIVING_JMS_MESSAGE exception, the coordinated cache waits for 10 seconds before resuming listening. If you want to recover from this failure, consider the following options:

  • You may choose to take no action (wait for the connection recovery).
  • You may choose to handle the RemoteCommandManagerException.ERROR_PROPAGATING_COMMAND or RemoteCommandManagerException.ERROR_RECEIVING_JMS_MESSAGE exception. You may do so by shutting down the remote command manager.

In either case, if the coordinated cache receives a null JMS message, it will throw a RemoteCommandManagerException.ERROR_RECEIVED_JMS_MESSAGE_IS_NULL exception.


How to Configure Connection Handling Using Workbench

To specify how EclipseLink handles session connections in the event of an error, use this procedure:

  1. Select a session or session broker in the Navigator. Its properties appear in the Editor.
  2. Click the Cache Coordination tab. The Cache Coordination tab appears.
  3. Ensure the Enable Cache Coordination option is selected, then select the appropriate coordinated cache Type (JMS). The cache coordination options appear on the tab.
    Cache Coordination Tab, Remove Connection on Error Option
    Cache Coordination Tab, Remove Connection on Error Option

  4. Select the Remove Connection on Error option to configure the session to remove the data source connection in the event of an error.


How to Configure Connection Handling Using Java

Use the org.eclipse.persistence.sessions.coordination.TransportManager method setShouldRemoveConnectionOnError to define whether connections to remote services should be disconnected when an error occurs.

You obtain the TransportManager using the following Session API:

Session.getCommandManager().getTransportManager()



Copyright Statement

Back to the top