@jws:jms Tag

Specifies the configuration attributes of a JMS control.

Syntax

@jws:jms
	type="queue | topic"
	[send-jndi-name="JNDInameOfSendDestination"]
	[receive-jndi-name="JNDInameOfReceiveDestination"]
	[connection-factory-jndi-name="JNDInameOfConnectionFactory"]
	[send-correlation-property="JMSheaderOrPropertyFieldName"]
	[receive-correlation-property="JMSheaderOrPropertyFieldName"]
	[receive-selector="selectorString"]

Attributes

type

Required. Specifies the type of the destination: can be “queue” or “topic”.

send-jndi-name

Required. Specifies the JNDI name of the JMS destination (queue or topic) to which messages will be sent.

No default.

receive-jndi-name

Optional. Specifies the JNDI name of the JMS destination (queue or topic) from which messages will be received. Note that subscription to a topic also requires a call to the JMS control's subscribe method.

connection-factory-jndi-name

Optional. Specifies the JNDI name of the connection factory used to obtain JMS connections. If not specified the default WebLogic Workshop connection factory is used (cg.jms.QueueConnectionFactory).

send-correlation-property

Optional. Specifies the name of the JMS header or property field to which the WebLogic Workshop conversation ID is written in outgoing messages. If not specified, the default is JmsControl.HEADER_CORRELATIONID. See remarks below.

receive-correlation-property

Optional. Specifies the name of the JMS header or property field from which the WebLogic Workshop conversation ID is read in incoming messages. If not specified, the default is JmsControl.HEADER_CORRELATIONID. See remarks below.

receive-selector

Optional. Specifies a selector string used to select messages. This syntax is based on a subset of the SQL92 conditional expression syntax. To learn more about how to specify message selector strings, please consult the Filtering Messages section of Programming WebLogic JMS in the WebLogic Server documentation.

Remarks

The following rules apply to this tag's use:

The send-correlation-property and receive-correlation-property attributes are set to default values that will provide proper operation in most cases. If the application with which the JMS control is communicating already uses the default property name ("CorrelationId") for other purposes, another property name should be used.

Since many web service instances can use JMS controls that listen on the same queue, the underlying dispatching mechanism needs to correlate each message received by the JMS control to the correct web service instance. The conversation ID is used as the correlation ID.

For this to work the application on the other end (the “foreign” application) has to participate in a simple correlation protocol. The JMS control will place the conversation ID in the JMS header identified by the send-correlation-property attribute on every message the JMS control publishes. The foreign application must place the conversation ID into a JMS header that is identified by the receive-correlation-property attribute in all messages that constitute responses.

A web service may not send messages via a JMS control from within a method with a conversation phase of "none". These methods have no conversation ID and therefore cannot participate in the protocol described above.

Note that conversational correlation is not supported for JMS topics. All current conversational instances that subscribe to a topic will receive a callback when a message arrives on the topic.

Related Topics

JMS Control: Using Java Message Service Queues and Topics from Your Web Service

@jws:jms-header Tag

@jws:jms-message Tag

@jws:jms-property Tag