JBoss default messaging JMS Queue sender

The JMS sender caches a single connection starting with the primary queue.

If the message is not sent, the JMS sender retries to send the message a configurable number of times with a configurable delay between each attempt as defined for the Reconnect property in the following table. An exception is thrown if the configured number of retries are exhausted and there is no backup queue.

If a backup queue is set up, a connection is made to the backup queue. The backup queue becomes the current queue for the next attempt to send a message. The sender can be configured to reconnect to the primary queue. If the primary queue is working, a switch is made so that the primary queue becomes the current queue.

Configuration properties

The following are the configuration properties of these nodes:

Table 1. JBoss default messaging JMS Queue sender configuration properties
Property Description
Runtime Tab

Use the settings in this tab for the primary JMS queue server.

Destination Name Enter the name of the queue to which the message is sent.
Time To Live

(seconds)

Enter the time period after which you want the messages to be deleted from the queue.
  • If you enter a zero value, the messages are not deleted from the queue.
  • If you enter a non-zero value, the messages that are not consumed for the specified time interval are automatically deleted from the queue by the provider.
Note: If you do not enter any value, the system considers a zero value.
Provider URL Enter the provider URL of the JMS implementation to use for JNDI lookups.

For the JBoss Default Messaging JMS Queue, enter the URL as: jnp::<DNS Server Name or IP Address>:<bootstrapport>.

For clustered JMS configurations, use a comma-separated value comprising the host/IP and port of each node in the cluster. For example, for the JBoss Default Messaging JMS Queue, enter the URL as: <DNS Server Name or IP Address>:<bootstrapport>,<DNS Server Name or IP Address>:<bootstrapport>; for example, 10.11.23.40:1100,10.11.23.41:1200

Initial Context Factory The class name of the initial context factory. This is the starting point for the resolution of names for naming and directory operations.
If you are using the JBoss Default Messaging JMS Queue, select JBoss 6. The class name is set to org.jboss.naming.remote.client.InitialContextFactory.
Note: If you upgrade to Release 9.4, both JBoss and JBoss 6 versions are present. Ensure to select the appropriate JBoss version. If you select JBoss, the class name is set to org.jnp.interfaces.NamingContextFactory.
Connection Factory Enter the connection factory name. This is used to retrieve the connection factory from JNDI. A client uses a connection factory to create connections with a JMS provider. Enter any unique identifier for the connection factory. This name must be the same as the one configured in the JBoss administration console.
Delivery Mode This is not used for JBoss Messaging. Persistence is set for each queue. Do not allow the application to override the persistence.
Needs compression Optional. Check this box if the message needs to be compressed before dropping it into the queue.
Commit of this message depends on parent transaction Check this box if you want the message to be committed to the queue only after the service is completed.

Uncheck this box if you want the message to be committed to the queue immediately.

For example, if the ON_SUCCESS event of any standard Sterling Selling and Fulfillment Foundation API is attached to a service in which the message is transactionally written to the queue, the message is committed to the queue only upon successful completion of the ON_SUCCESS event. The message is later rolled back from the queue if an error is encountered in the ON_SUCCESS event after the message is staged. However, in the non-transactional mode, the message remains in the queue once it is staged and not rolled back.

Note: If you check this box, the system synchronizes the JMS commit along with the DB commit. However, it is not a two-phase commit. Therefore, it may cause some errors, thus resulting in duplicate messages.
Enable JMS Security Check this box if you want to enable the JMS Security. If you check this box, the JMS Security Properties tab is enabled for you to configure destination and/or JNDI based JMS security.
Header Tab
Header Name The name of the message header. For example, APINAME.
Note: The header name must be unique. Two headers cannot have the same header name.

Choose the Create New icon to add a new header name and value.

Choose the Details icon to modify an existing header name and value.

Choose the Delete icon to delete an existing header name and value.

Header Value The value associated with the Header Name. These name-value pairs are stored as message headers and can be queried by using message selectors.

This can be set to a static value. For example, ‘createOrder' results in the message having a header APINAME='createOrder'.

This can also be set to be dynamically extracted from the message using the syntax, xml://<full path of the element from root>/@<attribute name>, which results in the message with a header APINAME='<value of attribute name in the XML>'.

Reconnect Tab

Use the settings in this tab for the backup JMS queue server.

Retry Interval (milliseconds) In the event that the connection to the primary JMS queue server is lost, enter the time required to reestablish contact with the primary JMS queue server. This parameter is used in conjunction with the Number of Retries parameter. The default value is 0 (zero), which means no time delay between retry attempts.
Number of Retries In the event that the connection to the primary JMS queue server is lost, enter the number of attempts to reestablish contact with the primary JMS queue server before failing over to the backup JMS queue server, if enabled, or an exception is thrown. This parameter is used in conjunction with the Retry Interval parameter. The default value is 0 (zero), which means there are no retries if the connection is lost and failover occurs, if enabled, or an exception is thrown.
Use Backup JMS Check this box if you want to enable a backup JMS queue.

When you check this box, other controls in this tab are enabled.

Provider URL Enter the backup JMS queue server provider URL of the JMS implementation used. This is the URL to use for JNDI lookups.

For the JBoss Default Messaging JMS Queue, enter the URL as: jnp::<DNS Server Name or IP Address>:<bootstrapport>.

For clustered JMS configurations, use a comma-separated value comprising the host/IP and port of each node in the cluster. For example, for the JBoss Default Messaging JMS Queue, enter the URL as: <DNS Server Name or IP Address>:<bootstrapport>,<DNS Server Name or IP Address>:<bootstrapport>; for example, 10.11.23.40:1100,10.11.23.41:1200

Initial Context Factory The class name of the initial context factory. This is the starting point for the resolution of names for naming and directory operations.
If you are using the JBoss Default Messaging JMS Queue, select JBoss 6. The class name is set to org.jboss.naming.remote.client.InitialContextFactory.
Note: If you upgrade to Release 9.4, both JBoss and JBoss 6 versions are present. Ensure to select the appropriate JBoss version. If you select JBoss, the class name is set to org.jnp.interfaces.NamingContextFactory.
Destination Name Enter the name of the backup queue to which the message is sent.
Connection Factory Enter the backup queue of the JMS server connection factory name. This is used to retrieve the connection factory from JNDI. A client uses a connection factory to create connections with a JMS provider. Enter any unique identifier for the connection factory. This name must be the same as the one configured in the JBoss administration console.
Reconnect to Primary JMS Server Check this box if you want to reconnect to the primary JMS server after a failover to the backup JMS server has occurred. Once this box is selected, enter the wait time before it reconnects.
Time Before Reconnect (seconds) Enter the maximum time required to reestablish contact with the primary JMS queue server after a failover to the backup JMS queue server. If a contact is reestablished, the primary JMS queue server is used. Otherwise, the backup JMS queue server is used. The default value is 600 seconds.
JMS Security Properties Tab

This tab is enabled when you select Enable JMS Security option in the runtime tab.

Note: You can override the JMS security properties specified here by defining the agent and flow authorization parameters in the <INSTALL_DIR>/properties/customer_overrides.properties file.
Destination based security Check this box, if you want to provide destination based security for JMS service.
JNDI based security Check this box, if you want to provide JNDI based security for JMS service.
Note: This checkbox is not applicable for JBoss as it does not support JNDI based JMS security.
JMS Security Parameters

For more information about application server-specific JMS security parameters, see "Setting up the JMS Security Properties" section.

Parameter Name Enter the name of the security parameter.
Parameter Value Enter the value of the security parameter.
Note: The JMS session objects can be pooled based on the service being executed. Hence, whenever the JMS sender requires a session object, the Sterling Application Platform framework tries to get a free session object from the pool. If there are no free sessions available, a new session object is created to send the message and then added to the pool. Any session object that is idle for a certain configurable period of time is closed by the framework. The yfs.jms.session.reaptime property in the yfs.properties file is used to set the JMS session reaptime. To modify this property, add an entry for it in the <INSTALL_DIR>/properties/customer_overrides.properties file.