@jc:jms Annotation

Specifies the configuration attributes of a JMS control.

Note: The @jc:jms annotation appears in JMS controls with the .jcx extension. JMS controls with the .ctrl extension, which were created in a previous version of WebLogic Workshop, use the @jws:jms annotation. Controls with the .ctrl extension continue to be supported in WebLogic Workshop.

Syntax

@jc:jms

[send-type="queue | topic"]

[send-jndi-name="JNDInameOfSendDestination"]

[receive-type="queue | topic"]

[receive-jndi-name="JNDInameOfReceiveDestination"]

[connection-factory-jndi-name="JNDInameOfConnectionFactory"]

[send-correlation-property="JMSheaderOrPropertyFieldName"]

[receive-correlation-property="JMSheaderOrPropertyFieldName"]

[receive-selector="selectorString"]

[topic-table-datasource="tableName"]

[auto-topic-subscribe="true | false"]

Attributes

send-type

Optional. Specifies the messaging style used to send a JMS message. Can be queue or topic.

send-jndi-name

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

receive-type

Optional. Specifies the messaging style used to send a JMS message. Can be queue or topic.

receive-jndi-name

Optional. Specifies the JNDI name of the JMS destination (queue or topic) from which messages will be received.

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 (weblogic.jws.jms.QueueConnectionFactoryy).

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.

topic-table-datasource

Optional. Specifies the data source for the JMS topic subscription table. The default value is specified in the jws-config.properties file for the server.

auto-topic-subscribe

Optional. Provides automatic subscription for a JMS control when the control is initialized. Initialization takes place on the first invocation of a method on the control.

Remarks

The following rules apply to this annotation'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

@jc:jms-headers Annotation

@jc:jms-property Annotation