Network Deployment (Distributed operating systems), v8.0 > Applications > Messaging resources > Default messaging


Client access to JMS resources

How WAS v5.1 application clients can access JMS resources provided by the default messaging provider.

Both Java EE application clients and thin application clients can access JMS resources provided by the default messaging provider:

In addition to both types of current WAS application clients, WAS v5.1 Java EE application clients can use their existing v5.1-style JMS resources to access service integration bus destinations for the default messaging provider. The link between Java EE application clients developed for WAS v5.1, and later versions of the application server, is defined by a WebSphere MQ client link object. One or more WAS v5.1 clients can use the same WebSphere MQ client link.

As for other types of resources, a Java EE application client can use resource environment references and resource references to use logical names to lookup JMS resources.

Figure 1. Message flows between WAS v5.1 Java EE application clients and a v6 or later application server application clients and a v6 or later application server" />

Here is an example of how a WAS thin application running in a J2SE environment can perform a JNDI lookup:

 import javax.naming.*;
...   Properties env = new Properties();
env.put(Context.PROVIDER_URL,"iiop://9.20.241.23:2809");
env.put(Context.INITIAL_CONTEXT_FACTORY,"com.ibm.websphere.naming.WsnInitialContextFactory");

InitialContext jndi = new InitialContext(env);

TopicConnectionFactory topicConnectionFactory = (TopicConnectionFactory)jndi.lookup("tcfIBM");
The Context.PROVIDER_URL must be set to point to a WAS and the port server BOOTSTRAP_ADDRESS.
Enable WAS v5.1 JMS usage of messaging resources in later versions of the product
Use a v5.1 JMS client Concept topic

+

Search Tips   |   Advanced Search