Index Changes

Using the JMS Binding Component

Contents

JMS WSDL Extensibility Elements

The JMS WSDL extensibility elements enable you to configure JMS connectivity and binding information for the JMS Binding Component.

  • JMS Connectivity Elements
    • JMS address Element
    • JMS jmsjcaOptions Element
  • JMS Binding Elements
    • JMS binding Element
    • JMS operation Element
    • JMS message Element
    • JMS properties and property Elements
    • JMS mapmessage and mappart Elements

JMS Connectivity Elements

JMS connectivity elements consist of the address element and the jmsjcaOptions element.

JMS address Element

The JMS address extensibility element specifies the JMS server connectivity information.

The connectionURL attribute is required. The other attributes are optional.

All of the attributes apply to both providers and consumers.

Attribute Description Example
connectionURL A URL that specifies the connectivity information to connect to the JMS server. mq://localhost:7676
username Specifies the username used for connecting to the JMS server.
password Specifies the password used for connecting to the JMS server.

The following example illustrates the JMS address extensibility element.

<port binding="y:binding" name="jmsOutOnlyTestEndpoint">
  <jms:address connectionURL="mq://localhost:7676" 
               username="admin" password="admin"/>
</port>

JMS jmsjcaOptions Element

The JMS jmsjcaOptions extensibility element can specify any option supported by JMSJCA.

Note - JMSJCA is a library that abstracts the differences between JMS servers and provides a single interface to the JMS servers. JMSJCA is shipped as part of the JMS Binding Component. For a list of supported JMS servers, go to https://jmsjca.dev.java.net.

The following example illustrates the JMS jmsjcaOptions extensibility element.

<port name="newWSDL_InPort" binding="tns:JMSInBinding">
  <jms:address connectionURL="jndi://">
    <jms:jmsjcaOptions>
      <![CDATA[JMSJCA.UnifiedCF=connectionfactories/xaconnectionfactory
      JMSJCA.TopicCF=connectionfactories/xatopicconnectionfactory
      JMSJCA.QueueCF=connectionfactories/xaqueueconnectionfactory
      java.naming.factory.initial=com.stc.jms.jndispi.InitialContextFactory
      java.naming.provider.url=stcms://localhost:18007
      java.naming.security.principal=Administrator
      java.naming.security.credentials=STC]]&gt;
    </jms:jmsjcaOptions>
  </jms:address>
</port>

JMS Binding Elements

The JMS extensibility elements for binding abstract WSDL messages to JMS messages fall into several sections.

JMS binding Element

The JMS binding extensibility element indicates a binding that is of interest to the JMS Binding Component. This element is an empty element that serves as a marker enabling the JMS Binding Component to gather JMS "binding" information described by the other JMS extensibility elements.

The JMS binding extensibility element must be specified in the WSDL to define a JMS protocol-based binding.

The following example illustrates the JMS binding extensibility element.

<binding name="bindingJMSOneWayOut"
         type="tns:portTypeOneWayOut">
  <jms:binding></jms:binding>
  ...
</binding>

JMS operation Element

The JMS operation extensibility element indicates an operation binding that is of interest to the JMS Binding Component. This element has attributes and child elements that are used to define JMS message delivery options for the JMS Binding Component.

The destination and destinationType attributes are required. The other attributes are optional.

The following attributes apply to both providers and consumers: destination, destinationType, and transaction.

The following attributes apply to providers only: deliveryMode, timeToLive, priority, disableMessageID, disableMessageTimeStamp, timeout, and clientID.

The following attributes apply to consumers only: messageSelector, subscriptionDurability, subscriptionName, batchSize, maxConcurrentConsumers, and redeliveryHandling.

Attribute Description Example
destination Defines the destination where messages are sent or received. InvoiceTopic
destinationType Specifies the destination type. The valid values are Queue and Topic. Topic
transaction Defines the transaction type for the JMS protocol based operation. The valid values are NoTransaction and XATransaction. XA in-out operations are supported with inbound message flows (when the JMS Binding Component acts as a consumer of messages). They are not supported with outbound message flows (when the JMS Binding Component acts as a provider of messages). The JMS Binding Component generates a deployment error, indicating that this type of operation is not supported, when the transaction attribute is set to XATransaction for in-out operations with a provisioning endpoint.
deliveryMode The message delivery mode to use when sending a message. The valid values are PERSISTENT and NON_PERSISTENT. The default value is NON_PERSISTENT.
timeToLive The time in milliseconds (from the dispatched time) that a produced message should be retained by the message system. 120000
priority Defines the message priority for a message producer. The valid values are 0 through 9, where 0 is lowest priority and 9 is highest priority. The default value is 4. 4
disableMessageID Indicates whether message IDs are disabled for a message producer. The valid values are true and false. The default value is false. Sun Java System Message Queue ignores the disableMessageID attribute when it is a provider of messages.
disableMessageTimeStamp Indicates whether message timestamps are disabled for a message producer. The valid values are true and false. The default value is false.
timeout The timeout in milliseconds on a message consumer receive for a reply message. This attribute applies only to the provider request reply. 120000
clientID Defines a unique client ID. The durableName will be used as the clientID if a durable subscriber is used but not set. ClientID123
messageSelector Enables you to filter messages. A message selector consists of a boolean expression, such as Age > 30. JMSCorrelationID='88888888' AND JMSType='SUN'
subscriptionDurability Determines the durability of the topic subscriber. The valid values are Durable and NonDurable. The default value is NonDurable.
subscriptionName The name that is used to denote the durable subscription. This attribute is used only with a durable subscriber (the destination is a topic and the subscriptionDurability attribute is set to Durable). SunStockSubscriptionName
batchSize If defined with a positive integer, this attribute specifies that the messages received will be in a batch. The number of messages in the batch could be less than or equal to the specified size. 20
maxConcurrentConsumers If defined with a positive integer and the destination type is Queue, this attribute specifies the maximum number of concurrent receivers that can process messages. The default value is 15 if the destination type is Queue. 15
concurrencyMode Specifies the concurrency mode. The valid values are sync and cc. There is no concurrent processing for topics in sync mode.
redeliveryHandling Specifies what actions to take if an error occurs in processing the JMS message received from the JMS destination. For more information, see Configuring Redelivery Handling. 5:1000; 10:5000

The following example illustrates the JMS operation extensibility element.

...
<operation name="Operation1">
  <jms:operation destination="MyTopic" 
                 destinationType="Topic" 
                 messageSelector="JMSType='FOO.Type'"/>
  ...
</operation>
...

JMS message Element

The messageType and use attributes are required. The other attributes are optional.

Attribute Description Example
messageType Defines the type of JMS messages being created and sent to the JMS destination. The valid values are TextMessage and MapMessage.
parts If the messageTypeattribute is set to TextMessage, then this attribute defines the parts from the WSDL message that comprise the text payload. Each part in the list is delimited by a space. msgPart1,msgPart2
use Defines the use type that affects how the message is interpreted. This attribute is currently supported as a string literal. literal
encodingStyle This attribute is reserved for future use.  
correlationIdPart References the message part that contains the value for the JMSCorrelationID header. partCorrelationID
deliveryMode Defines the static value for the JMSDeliveryMode header. NON_PERSISTENT
deliveryModePart References the message part that contains the value for the JMSDeliveryMode header. partDeliveryMode
priority Defines the static value for the JMSPriority header. 5
priorityPart References the message part that contains the value for the JMSPriority header. partPriority
type Defines the static value for the JMSType header. MyMessageType
typePart References the message part that contains the value for the JMSType header. partType

The following example illustrates the JMS message extensibility element.

...
<jms:binding></jms:binding>
  <operation name="operationOneWayOut">
    <jms:operation destination="MyTopic"
                   destinationType="Topic"
                   messageSelector="JMSType='FOO.Type'"/>
      <input name="input">
        <!&mdash;jms:message defines the WSDL message to/from jms message mappings -->
        <jms:message messageType="MapMessage"
                     use="literal"
                     correlationIdPart="msgPart1"
                     deliveryModePart="msgPart2"
                     priorityPart="msgPart3"
                     typePart="msgPart4"
                     messageIDPart="msgPart5"
                     timestampPart="msgPart6">
          <jms:mapmessage>
            <jms:mappart part="partBoolean" 
                         type="boolean" 
                         name="BooleanMapEntry">
            </jms:mappart>
            <jms:mappart part="partChar" 
                         type="char" 
                         name="CharMapEntry">
            </jms:mappart>
          </jms:mapmessage >
        </jms:message>
      </input>
    </jms:operation>
  </operation>
</jms:binding>
...

JMS properties and property Elements

The JMS properties extensibility element is a collection of property elements. It is an optional child element of the JMS message extensibility element.

Each property element defines a mapping of a JMS message user property, either to or from a WSDL message part.

The JMS property element includes the following attributes, all of which are required.

Attribute Description Example
name The name of the JMS property that is mapped to the message part. JMSProp1
part The name of the message part to which the JMS property is mapped. msgPart1
propertyType The type of the JMS property. The valid values are boolean, short, int, long, float, double, or string. string

The following example illustrates the JMS properties and property extensibility elements.

...
<jms:message messageType="TextMessage" textPart="partBody">
  <jms:properties>
    <jms:property part="partPropString" 
                  propertyType="string" 
                  name="AppStringProperty">
    </jms:property>
  </jms:properties>
</jms:message>
...

JMS mapmessage and mappart Elements

When the exchange involves a JMS MapMessage type, the JMS mapmessage extensibility element is used to define the mapping of the JMS MapMessage to the WSDL message parts and vice versa.

This element is a child element the JMS message extensibility element. The mapmessage element is a collection of one or more mappart elements.

The JMS mappart element contains the following attributes, all of which are required.

Element Name Description Example
name The name of the mapmessage property that is mapped to the message part. JMSProp1
part The name of the message part that is mapped to the mapmessage property. msgPart1
type The Java type of the JMS mapmessage property. string

The following example illustrates the JMS mapmessage and mappart extensibility elements.

...
<jms:message messageType="MapMessage">
  <jms:mapmessage>
    <jms:mappart part="partBoolean" 
                 type="boolean" 
                 name="BooleanMapEntry">
    </jms:mappart>
    <jms:mappart part="partChar" 
                 type="char" 
                 name="CharMapEntry">
    </jms:mappart>
  </jms:mapmessage>
</jms:message>
...

Previous Next

JSPWiki v2.4.100
[RSS]
« Home Index Changes Prefs
This page (revision-14) was last changed on 03-Jun-09 18:57 PM, -0700 by CarolT