JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Java CAPS JMS Binding Component User's Guide     Java CAPS Documentation
search filter icon
search icon

Document Information

Using the JMS Binding Component

JMS Binding Component Overview

JMS Binding Component Features

JMS Binding Component Scenarios

Outbound Scenario

Inbound Scenario

XA Scenario

Outbound InOut Exchange Scenario

Inbound InOut Exchange Scenario

On Demand Receive Scenario

Creating JMS-Based Concrete WSDL Documents

To Create a JMS-Based Concrete WSDL Document from the New WSDL Document Wizard

To Create a JMS-Based Concrete WSDL Document from the New File Wizard

Request Connection Configuration

Request Consumer Configuration

Request Publisher Configuration

Response Destination Configuration

Response Consumer Configuration

Response Publisher Configuration

Advanced Configuration

Connecting to the JMS Server

Specifying the Protocol, Server, and Port

Connecting to the JMS Server Using JNDI

Using the lookup Approach

Using the JNDI Approach

Configuring Redelivery Handling

Configuring Redelivery Handling from the Wizard

Configuring Redelivery Handling by Editing the WSDL Document

Using the Normalized Message Properties

Inbound Normalized Message Properties

Connection URL Property (org.glassfish.openesb.jms.inbound.connectionurl)

User Name Property (org.glassfish.openesb.jms.inbound.username)

Message Selector Property (org.glassfish.openesb.jms.inbound.messageselector)

Destination Property (org.glassfish.openesb.jms.inbound.destination)

Destination Type Property (org.glassfish.openesb.jms.inbound.destinationtype)

Forward As Attachment Property (org.glassfish.openesb.jms.inbound.forwardasattachment)

Outbound Normalized Message Properties

Connection URL Property (org.glassfish.openesb.jms.outbound.connectionurl)

User Name Property (org.glassfish.openesb.jms.outbound.username)

Password Property (org.glassfish.openesb.jms.outbound.password)

Destination Property (org.glassfish.openesb.jms.outbound.destination)

Destination Type Property (org.glassfish.openesb.jms.outbound.destinationtype)

XA Transaction Property (org.glassfish.openesb.jms.outbound.xatransaction)

Delivery Mode Property (org.glassfish.openesb.jms.outbound.deliverymode)

Timeout Property (org.glassfish.openesb.jms.outbound.timeOut)

Client ID (org.glassfish.openesb.jms.outbound.clientid)

Message Selector Property (org.glassfish.openesb.jms.outbound.messageselector)

Subscription Durability Property (org.glassfish.openesb.jms.outbound.subscriptiondurability)

Subscription Name Property (org.glassfish.openesb.jms.outbound.subscriptionname)

Forward As Attachment Property (org.glassfish.openesb.jms.outbound.forwardasattachment)

General Normalized Message Properties

Time To Live Property (org.glassfish.openesb.jms.timetolive)

Priority Property (org.glassfish.openesb.jms.priority)

Message ID Property (org.glassfish.openesb.jms.messagetype)

Message Type Property (org.glassfish.openesb.jms.messagetype)

Correlation ID Property (org.glassfish.openesb.jms.correlationid)

Reply To Destination Property (org.glassfish.openesb.jms.replytodestination)

Reply To Destination Type Property (org.glassfish.openesb.jms.replytodestinationtype)

User Properties Property (org.glassfish.openesb.jms.userproperties)

JMS WSDL Extensibility Elements

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 Binding Component Clustering

JMS High Availability

JMS Load Balancing

JMS Performance

Publishing and Subscribing to Multiple WebSphere Queues

Connecting to the JMS Server

You use a connection URL to specify the information for connecting to the JMS server.

For any JMS server that is supported by JMSJCA, you can specify the protocol, server, and port in the connection URL. The JMS Binding Component uses the information in the connection URL to create a new JMS connection factory.


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.


You can connect to any JMS server by using the Java Naming and Directory Interface (JNDI) to locate an existing JMS connection factory.

A connection factory is a Java class supplied by the JMS provider. For example:

com.stc.jmsjca.core.JConnectionFactoryXA

Specifying the Protocol, Server, and Port

For any JMS server that is supported by JMSJCA, you can specify the protocol, server, and port in the connection URL. The JMS Binding Component uses the information in the connection URL to create a new JMS connection factory.

The following connection URL includes a protocol, server, and port for Java System Message Queue:

mq://localhost:7676

The following connection URL includes a protocol, server, and port for JMS IQ Manager:

stcms://localhost:18007

When you use a wizard to create a JMS-based concrete WSDL document, you set the connection URL in the Request Connection Configuration step of the wizard. For more information, see Creating JMS-Based Concrete WSDL Documents.

When you finish the wizard, the appropriate WSDL code is generated. The connection URL appears in the address element. For example:

<port name="newWSDL_InPort" binding="tns:JMSInBinding">
  <jms:address connectionURL="mq://localhost:7676" username="admin" password="admin">
    <jms:jmsjcaOptions><![CDATA[]]></jms:jmsjcaOptions>
  </jms:address>
</port>

Connecting to the JMS Server Using JNDI

You can connect to any JMS server by using the Java Naming and Directory Interface (JNDI) to locate an existing JMS connection factory.

Depending on where the connection factory is bound, the connection URL can begin with the string lookup or the string jndi.

The appropriate JNDI provider jar files must be in the runtime classpath. With the GlassFish application server, you copy these jar files to the lib directory. In addition, JMS provider client jar files are needed in the runtime classpath.

Using the lookup Approach

To access a connection factory that is bound in the JNDI space of the GlassFish application server itself, use the lookup approach.

This scenario can occur when a managed connection factory has been created. Managed connection factories provide additional services on top of a connection factory. The additional services include connection pooling. The managed connection factory creates a connection factory wrapper.

Set the connection URL to lookup://JNDI-name, where JNDI-name is the JNDI name to which the connection factory is bound. For example:

lookup://jms/tx/default

When you use a wizard to create a JMS-based concrete WSDL document, you set the connection URL in the Request Connection Configuration step of the wizard. For more information, see Creating JMS-Based Concrete WSDL Documents.

When you finish the wizard, the appropriate WSDL code is generated. The connection URL appears in the address element. For example:

<port name="newWSDL_InPort" binding="tns:JMSInBinding">
  <jms:address connectionURL="lookup://jms/tx/default">
    <jms:jmsjcaOptions><![CDATA[]]></jms:jmsjcaOptions>
  </jms:address>
</port>

At runtime, the JMS Binding Component uses the JNDI name to obtain the connection factory.

Using the JNDI Approach

Use the JNDI approach for either of the following scenarios:

Set the connection URL to jndi:// and specify the JNDI options.

When you use a wizard to create a JMS-based concrete WSDL document, you set the connection URL in the Request Connection Configuration step of the wizard. You then specify the JNDI options in the Advanced Configuration step of the wizard. For more information, see Creating JMS-Based Concrete WSDL Documents.

The following table describes the available JNDI options.

JNDI Option
Description
JMSJCA.UnifiedCF
The JNDI name of the connection factory. Use this option only in outbound scenarios.
JMSJCA.TopicCF
The JNDI name of topic connection factory. You can use this option in inbound or outbound scenarios.
JMSJCA.QueueCF
The JNDI name of queue connection factory. You can use this option in inbound or outbound scenarios.
java.naming.factory.initial
The fully qualified class name of the factory class that will create the initial context. An initial context is the starting point for naming operations. For more information, see the Java API documentation for javax.naming.Context.INITIAL_CONTEXT_FACTORY.
java.naming.provider.url
The configuration information for the service provider to use. The value should contain a URL string. For more information, see the Java API documentation for javax.naming.Context.PROVIDER_URL.
java.naming.security.principal
The identity of the principal for authenticating the caller to the service. For more information, see the Java API documentation for javax.naming.Context.SECURITY_PRINCIPAL.
java.naming.security.credentials
The credentials of the principal for authenticating the caller to the service. For more information, see the Java API documentation for javax.naming.Context.SECURITY_CREDENTIALS.

The destinationType and transaction attributes in the WSDL document determine what type of connection factory is being looked up. For example, if the destinationType attribute is Queue and the transaction attribute is XATransaction, then the connection factory must be of type javax.jms.XAQueueConnectionFactory.

The following code shows an example of specifying the JNDI options. In this scenario, the connection factory is bound in the JMS server itself.

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

When you finish the wizard, the appropriate WSDL code is generated. The connection URL appears in the address element. The JNDI options appear in the jmsjcaOptions element. For example:

<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]]>
    </jms:jmsjcaOptions>
  </jms:address>
</port>

At runtime, the JMS Binding Component uses the JNDI options to obtain the connection factory.