A Java Messaging Service (JMS) endpoint URL is used to access a Web service with the JMS transport. This URL specifies the JMS destination and connection factory, as well as the port component name for the Web service request. This is similar to the HTTP endpoint URL, which specifies the host and port, as well as the context root and port component name.
A JMS endpoint URL has the following general form:
jms:/[queue|topic]?<property>=<value>&<property=<value>&...The URL consists of the transport type, jms:, followed by either /queue or /topic to indicate the JMS destination type, followed by the query string containing a list of property and value pairs used to specify the JMS endpoint information.
The properties supported in the URL string are described as follows:
Destination-related properties (required)
Property name | Description |
destination | Specifies the Java Naming and Directory Interface (JNDI) name of the destination queue or topic. |
connectionFactory | Specifies the JNDI name of the connection factory. |
targetService | Specifies the name of the port component to which the request is dispatched. |
JNDI-related properties (optional)
Property name | Description |
initialContextFactory | Specifies the name of the initial context factory to use which is mapped to the java.naming.factory.initial property. |
jndiProviderURL | Specifies the JNDI provider URL which is mapped to the java.naming.provider.url property. |
JMS-related properties (optional)
Property name | Description |
deliveryMode | Indicates whether the request message should be persistent or not. The valid values are 1 for nonpersistent and 2 for persistent. The default value is 1. |
timeToLive | Specifies the lifetime, in milliseconds, of the request message. A value of 0 indicates an infinite lifetime. |
priority | Specifies the JMS priority associated with the request message. Valid values are between 0 to 9. The default value is 4. A priority of 0 is the lowest, and 9 is the highest. |
The required properties, destination, connectionFactory, and targetService, must appear in the JMS endpoint URL string. The rest of the properties are optional.
You can set any of the properties on the client Stub object. This means that the various properties can be specified by including them as part of the endpoint URL or they can be set programmatically by the client on the Stub object. Properties specified on the client Stub object take precedence over properties specified as part of a JMS endpoint URL string.
Review the Javadoc for a complete list of API's. You can also review several articles about the development of Web services at Web services: Resources for learning.