Working with thin Client for JMS with WebSphere Application Server and generating jms trace in stand-alone thin client applications -
Steps to setup Thin Client for JMS with WAS:
We can connect to Service Integration Bus from a stand-alone java client program by using the Thin Client for JMS with WebSphere Application Server. The Thin Client for JMS with WebSphere Application Server can be used to connect and work with default messaging provider messaging engines for WebSphere Application Server Version 6.0.2 or later. The Thin Client for JMS can be obtained from the WebSphere Application Server installation directory or the Application Client installation directory.
To use the Thin Client for JMS, copy the com.ibm.ws.sib.client.thin.jms_7.0.0.jar present at %WAS_HOME%/runtimes directory.
If your application requires JNDI support, then you have to use the thin client for EJB namely com.ibm.ws.ejb.thinclient_7.0.0.jar, which can be obtained from the %WAS_HOME%/runtimes directory or the application client’s runtimes directory.
If the application makes use of the Oracle/Sun JDK, then you will also need the “com.ibm.ws.orb_7.0.0.jar” as IBM libraries rely on IBM ORB implementation.
Place the above mentioned jars in the classpath of your application as per your requirement.
Steps to generate WebSphere JMS trace in stand-alone thin client application:
When stand-alone thin client applications have problems interacting with the WebSphere Application Server, it might be useful to enable tracing for the application. Enabling trace for client programs will cause the WebSphere Application Server classes used by those applications, such as naming-service client classes and other classes, to generate trace information.
There are two ways to generate the trace from stand-alone thin client applications -
1) Through eclipse IDE
2) Through command-line prompt
Steps to generate JMS trace in the eclipse IDE:
1) Create a sample java application (in a java project) as shown below
2) Add the required thin client jars in the build path
3)To enable trace for the WebSphere Application Server classes in a client application running in eclipse, place “MYTraceSettings.properties” file in src directory of your java application and add the following system property as VM argument while running the stand alone java application
Note: The file must be a properties file in the class path of the application client or stand-alone process. You must create a trace properties file by copying the %install_root\properties\TraceSettings.properties file and modify as per your requirement.
Generating JMS trace through command line:
Alternatively we can generate the trace through command line.
To enable trace for the WebSphere Application Server classes in a client application, add the following system property to the startup script or command of the client application:
java -cp C:\JMSSamples\lib\com.ibm.ws.ejb.thinclient_7.0.0.jar;