The JMS WSDL extensibility elements allow the user to "define" JMS protocol based bindings in a WSDL.
This page describes the JMS extensibility elements for address, binding, operation, input, and output.
How to read the tables:
Each table describes the attribute(s) for a particular JMS extensibility element and any children elements the extensiblity element may have. For each attribute or element, its name, description, whether the attribute or element applies to both provider or consumer (Common), whether the attribute or element applies only to provider (Provider Only), whether the attribute or element applies only to consumer (Consumer Only), whether it is required, and an example of its usage are provided. Note that provider or consumer is from the perspective of the JMS Binding Component with respect to other components in the JBI environment. If other components "consume" the service(s) of the JMS Binding Component, then the JMS Binding Component is a provider. On the other hand, if the JMS Binding Component "consumes" the services of ther JBI components, then the JMS Binding Component is a consumer.
JMS address element attributes:
| Attribute/Element Name | Description | Common | Provider Only | Consumer Only | Required | Example |
|---|---|---|---|---|---|---|
| connectionURL | A URL which specifies the connectivity information to connect to the JMS server, even if that JMS server normally doesn't use a URL format | X | X | mq://myhost:7676 | ||
| username | Specifies the username used for connecting to the JMS server | X | guest | |||
| password | Specifies the password used for connecting to the JMS server | X | guest |
The following is a sample usage of the JMS address extensiblity element defined for a service port,
<port binding="y:binding" name="jmsOutOnlyTestEndpoint"> <jms:address connectionURL="mq://localhost:7676" username="admin" password="admin"/> </port>
Notes On connectionURL
The connectionURL specifies the connectivity information to connect to the JMS server, even if that JMS server normally doesn't use a URL format. The format is of the form
protocol://server:port?key1=value1&key2=value2
The query string is optional and is reserved for possible future use. It contains both properties for the JMS server as well as for the JMSJCA connector used by the JMS Binding Component.
Supported JMS Providers (most recently tested for the JMS Binding Component):
| URL Starts With | Provider |
|---|---|
| mq:// | Sun MQ |
The following is a sample usage of the JMS binding extensiblity element,
<binding name="bindingJMSOneWayOut"
type="tns:portTypeOneWayOut">
<jms:binding></jms:binding>
...
</binding>
JMS operation element attributes and children elements:
| Attribute/Element Name | Description | Common | Provider Only | Consumer Only | Required | Example | |
|---|---|---|---|---|---|---|---|
| destination | Defines the destination where messages are sent or received | X | X | InvoiceQueue | |||
| destinationType | Specifies the destination type, either Queue or Topic | X | X | Queue | |||
| transaction | Defines the transaction type for the JMS protocol based operation; valid values: NoTransaction, XATransaction | X | NoTransaction | ||||
| deliveryMode | The message delivery mode to use when sending a message, either NON_PERSISTENT or PERSISTENT; default is NON_PERSISTENT | X | NON_PERSISTENT | ||||
| timeToLive | Time in milliseconds from its dispatch time that a produced message, from the message producer, should be retained by the message system | X | 120000 | ||||
| priority | The message priority for a message producer; must be a value between 0 and 9; 0 is lowest, 9 is highest; default is 4 | X | 4 | ||||
| disableMessageID | Sets whether message IDs are disabled for a message producer, either true or false; default is false | X | false | ||||
| disableMessageTimeStamp | Sets whether message timestamps are disabled for a message producer, either true or false; default is false | X | false | ||||
| timeout | Sets the timeout in milliecons on a message consumer receive for a reply message; applies only to provider request reply | X | 120000 | ||||
| clientID | A unique client ID; if using a durable subscriber and this is not set then the durableName will be used as the clientID | X | ClientID123 | ||||
| messageSelector | JMS message selector to define message filtering | X | JMSCorrelationID='88888888' AND JMSType='SUN' | ||||
| subscriptionDurability | Determines the durability of the Topic subscriber, either NonDurable or Durable, default is NonDurable | X | NonDurable | ||||
| subscriptionName | The name used to denote the durable subscription; used only if using a durable subscriber (destination is a Topic and subscriptionDurability is set to Durable) | X | SunStockSubscriptionName | ||||
| batchSize | If defined with a positive integer, this element 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 | X | 20 | ||||
| maxConcurrentConsumers | If defined with a positive integer and the destination type is Queue, this element specifies the maximum number of concurrent receivers that can process messages; default is 15 if destinationType is Queue | X | 15 | ||||
| redeliveryHandling | If defined, this attribute specifies what actions to take in the event that an error occurred in processing the JMS message received from the JMS destination (for example, putting the "poisoned" message in a dead letter queue). See below for syntax of redeliveryHandling | X | 5:1000; 10:5000; 50:move(queue:mydlq) | ||||
| options | This a sub-element reserved for future use to define additional configuration options | X | -- |
The following shows the operation extensibility element in a JMS binding:
...
<operation name="Operation1">
<jms:operation destination="MyTopic"
destinationType="Topic"
messageSelector="JMSType='FOO.Type'"/>
...
</operation>
...
Specification of what actions to undertake when the message is repeatedly redelivered is done through a specially formatted string. The string has this format:
format := entry[; entry]*
entry := idx ":" action
idx := number (denotes the n-th time a msg was seen)
action := number (denotes delay in ms) | "delete" | "move"(args)
move := "queue"|"topic" | "same" ":" destname
destname := any string, may include "$" which will be replaced with the original
destination name.
Here are some examples.
Example:
5:1000; 10:5000; 50:move(queue:mydlq)
This causes no delay up to the 5th delivery; a 1000 ms delay is invoked when the message is seen the 5th, 6th, 7th, 8th, and 9th time. A 5 second delay is invoked when the msg is invoked the 10th, 11th, ..., 49th time. When the msg is seen the 50th time the msg is moved to a queue with the name "mydlq".
If the messages were received from "Queue1" and if the string was specified as
5:1000; 10:5000; 50:move(queue:dlq$oops)
the messages would be moved to the destination "dlqQueue1oops": the special character "$" denotes the original destination name. Instead of "queue" one can also specify "topic" or "same". The latter denotes a queue if the message was received from a queue, or can denote a topic if the message was received from a topic.
Another example:
5:1000; 10:5000
This causes no delay up to the 5th delivery; a 1000 ms delay is invoked when the message is seen the 5th, 6th, 7th, 8th, and 9th time. A 5 second delay is invoked for each time the message is seen thereafter.
JMS message element attributes and children elements:
| Attribute/Element Name | Description | Common | Provider Only | Consumer Only | Required | Example |
|---|---|---|---|---|---|---|
| properties | This sub-element defines the JMS message user properties to/from WSDL Message part(s) mappings; see the table for properties below for details | X | -- | |||
| mapmessage | This child element defines the JMS MapMessage to/from WSDL Message part(s) mappings; see the table for mapmessage for details | X | Required if messageType is MapMessage, no otherwise | -- | ||
| messageType | The type of JMS messages to be created and sent to the JMS destination; valid values: MapMessage, TextMessage | X | X | TextMessage | ||
| textPart | When messageType is TextMessage, this attribute defines the WSDL message part to/from JMS TextMessage text payload mapping | X | Required if messageType is TextMessage, no otherwise | msgPart1 | ||
| use | Specify encoder support; valid values: literal, encoded | X | X | TextMessage | ||
| encodingStyle | Specify the encoder used if use is set to encoded | X | Required if use is encoded | TextMessage | ||
| correlationIdPart | This attribute is used to reference the message part where the JMSCorrelationID header value will be retrieved or stored | X | partCorrelationID | |||
| deliveryModePart | This attribute is used to reference the message part where the JMSDeliveryMode header value will be retrieved or stored | X | partDeliveryMode | |||
| priorityPart | This attribute is used to reference the message part where the JMSPriority header value will be retrieved or stored | X | partPriority | |||
| typePart | This attribute is used to reference the message part where the JMSType header value will be retrieved or stored | X | partType | |||
| messageIDPart | This attribute is used to reference the message part where the JMSMessageID header value will be stored | X | partMessageID | |||
| redeliveredPart | This attribute is used to reference the message part where the JMSRedelivered header value will be stored | X | partRedelivered | |||
| timestampPart | This attribute is used to reference the message part where the JMSTimestamp header value will be stored | X | partTimestamp |
The following shows the message extensibility element in a JMS binding:
...
<jms:binding></jms:binding>
<operation name="operationOneWayOut">
<jms:operation destination="MyTopic"
destinationType="Topic"
messageSelector="JMSType='FOO.Type'"/>
<input name="input">
<!—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 property element attributes:
| Attribute Name | Description | Required | Example |
|---|---|---|---|
| name | The name of the JMS property to which the message part is mapped | X | JMSProp1 |
| part | The name of the message part to which the JMS property is mapped | X | msgPart1 |
| propertyType | The type of the JMS property, one of boolean,short,int,long,float,double, or string | X | string |
The following is a sample usage of the JMS properties and property extensiblity elements,
...
<jms:message messageType="TextMessage" textPart="partBody">
<jms:properties>
<jms:property part="partPropString" propertyType="string" name="AppStringProperty"></jms:property>
<jms:property part="partPropBoolean" propertyType="boolean" name="AppBooleanProperty"></jms:property>
<jms:property part="partPropShort" propertyType="short" name="AppShortProperty"></jms:property>
<jms:property part="partPropInt" propertyType="int" name="AppIntProperty"></jms:property>
<jms:property part="partPropLong" propertyType="long" name="AppLongProperty"></jms:property>
<jms:property part="partPropFloat" propertyType="float" name="AppFloatProperty"></jms:property>
</jms:properties>
</jms:message>
...
JMS mappart element attributes:
| Attribute Name | Description | Required | Example |
|---|---|---|---|
| name | The name of the MapMessage object to which the message part is mapped | X | JMSProp1 |
| part | The name of the message part to which the MapMessage object is mapped | X | msgPart1 |
| type | The Java type of the JMS MapMessage object | X | string |
The following is a sample usage of the JMS mapmessage and mappart extensiblity 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:mappart part="partDouble" type="double" name="DoubleMapEntry"></jms:mappart>
<jms:mappart part="partFloat" type="float" name="FloatMapEntry"></jms:mappart>
<jms:mappart part="partInt" type="int" name="IntMapEntry"></jms:mappart>
<jms:mappart part="partLong" type="long" name="LongMapEntry"></jms:mappart>
<jms:mappart part="partShort" type="short" name="ShortMapEntry"></jms:mappart>
<jms:mappart part="partString" type="string" name="StringMapEntry"></jms:mappart>
</jms:mapmessage>
</jms:message>
...
JMS option element attributes:
| Attribute Name | Description | Required | Example |
|---|---|---|---|
| name | The name of the JMSJCA option | X | -- |
| value | The valueof the JMSJCA option | X | -- |
Table of JMSJCA RA options currently supported by the JMS BC:
| Option Name | Description | Option Value Type | Example |
|---|---|---|---|
| JMSJCA.poolmaxsize | The maximum number of connections in the pool (32 is default if not specified) | integer | 35 |
| JMSJCA.poolminsize | The minimum number of connections in the pool (0 is default if not specified) | integer | 5 |
| JMSJCA.pooltimeout | When the application requests a connection and the number of in-use connections has reached the poolmaxsize, this is the maximum time in milliseconds the pool will block before it will throw an exception back to the application. A value of zero will wait indefinitely until a connection becomes available. A negative value will throw an exception immediately. A positive value will throw an exception after the specified value. Default is to throw an exception if a connection is not available (-1) | long | 60000 |
The following is a sample usage of the JMS options and option extensiblity elements,
...
<jms:operation destination="InTestDestination2"
destinationType="Queue"
transaction="NoTransaction">
<jms:options>
<jms:option name="JMSJCA.poolmaxsize" value="35"/>
<jms:option name="JMSJCA.pooltimeout" value="30000"/>
</jms:options>
</jms:operation>
</jms:operation>
...