Setting a local WebSphere test environment or server to use Embedded Messaging
Embedded Messaging allows you to fully test and publish your applications within a JMS runtime environment on the same physical machine as the development environment
Important: This task is only necessary if you install Embedded Messaging with the WebSphere Application Server installer. If you have installed Embedded Messaging with the product's installer you do not need to perform this task.To configure Embedded Messaging locally:
- Install Embedded Messaging and Publish and Subscribe support on the same machine as the development environment.
- Install a Queue Manager with the same node and server name as the local test environment or server. The default values arelocalhost and server1, i.e. WAS_localhost_server1.
For example, using default locations, from the WebSphere bin directory execute the following command to create the required QueueManager:
c:\Program Files\WebSphere\AppServer\bin>createmq c:\Program Files\WebSphere\AppServer localhost server1 server1 c:\Program Files\IBM\WebSphere MQ c:\Program Files\IBM\WebSphere MQ\WEMPSThe createmq batch file exists on a standalone WebSphere Application Server machine in the same directory relative to the WebSphere Application Server install root.- Create a batch file to launch this product with the path to the MQ directories. This makes the WebSphere binaries and the MQ binaries available on the system paths. Below is an example batch file assuming default installation locations:
set path=C:\Program Files\IBM\RSDP\6.0\runtimes\base_v5\bin; C:\Program Files\IBM\WebSphere MQ\bin;C:\Program Files\IBM\WebSphere MQ\java\bin; C:\Program Files\IBM\WebSphere MQ\WEMPS\bin;%path% rationalsdp.exeexport PATH=$PATH:/opt/mqm/bin:/opt/mqm/java/bin:/opt/wemps/bin export LD_LIBRARY_PATH=/opt/mqm/lib:/opt/mqm/java/lib:/opt/wemps/lib:$LD_LIBRARY_PATH export WEMPS_REGISTRY=/var/wemps/registry rationalsdp
From a command prompt, type the following:
chmod a+x rationalsdpmq.sh(where rationalsdpmq.sh is the name of your batch file).- Use the script to launch this product instead of using rationalsdp.
- Create a WebSphere v5.x server, selecting WebSphere Test Environment or WebSphere Server as the server type.
- In the Servers view, double-click the server to open the server editor.
- Click the JMS tab at the bottom of the editor to open the JMS page.
- In the JMS provider section, select the Embedded Messaging radio button. By default, the MQ Simulator for Java Developers is selected. This changes the implementation factories from the default MQ Simulator for Java Developers implementation to the embedded implementation.
- Click the Environment tab.
- In the ws.ext.dirs section, click the Add External Folder button and add the directory containing the embedded messaging Java implementation classes. The default value is
C:\Program Files\IBM\WebSphere MQ\java\lib.
/opt/mqm/java/lib.
- Click the Variables tab.
- In the Defined variables table of the Node settings section, select the MQ_INSTALL_ROOT variable and click the Edit button. The Edit a Variable dialog box opens.
- In the Value field, type the location of the embedded messaging installation path and click OK. The default value is
C:\Program Files\IBM\WebSphere MQ
/opt/mqm.
- Edit the WAS_PUB_SUB_ROOT variable and type the location of the WebSphere Embedded Messaging Publish and Subscribe installation path. The default value is
C:\Program Files\IBM\WebSphere MQ\WEMPS
/opt/wemps.
- Save the server and close the editor.