WebSphere WebSphere Application Server Version 6.1.x Feature Pack for Web Services Operating Systems: AIX, HP-UX, i5/OS, Linux, Solaris, Windows, z/OS

Client access to JMS resources

This topic describes access by Version 5 and Version 6 application clients to Java Message Service (JMS) resources provided by the default messaging provider.

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

In addition to both types of WebSphere Application Server Version 6 application clients, WebSphere Version 5 J2EE application clients can use their existing Version 5-style JMS resources to access service integration bus destinations for the default messaging provider. The link between Version 5 J2EE application clients and a Version 6 application server is defined by a WebSphere MQ client link object. One or more Version 5 clients can use the same WebSphere MQ client link.

As for other types of resources, a J2EE application client can use resource environment references and resource references to use logical names to lookup JMS resources.
Figure 1. Message flows between Version 5 and Version 6 J2EE application clients and a Version 6 application serverMessage flows between Version 5 and Version 6 J2EE application clients and a Version 6 application server
Here is an example of how a WebSphere Application Server 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 WebSphere Application Server and the port server BOOTSTRAP_ADDRESS.
Related tasks
Managing WebSphere Application Server Version 5 JMS use of messaging resources in later versions of the product
Using a Version 5 JMS client

Concept topic

Terms of use | Feedback


Timestamp icon Last updated: 27 November 2008
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/com.ibm.websphere.pmc.wsfep.multiplatform.doc/concepts/cjq0000_.html

Copyright IBM Corporation 2004, 2008. All Rights Reserved.
This information center is powered by Eclipse technology. (http://www.eclipse.org)