Monday 30 September 2013

JMS

You can configure a stand-alone JMS client and JMS nodes to communicate with service integration bus (SIBus) in WebSphere® Application Server Version 6 and Version 7.
  1. Complete the following steps in WebSphere Application Server. For more information, see the WebSphere Application Server documentation.
    1. Create a messaging bus.
    2. Add a bus member.
    3. Restart the WebSphere Application Server server.
    4. Create a queue destination on the bus.
    5. Create a JMS queue on the default messaging provider.
    6. Create a Queue Connection Factory (QCF) on the default messaging provider.
      Ensure that the messaging provider URL is specified in the QCF definition, particularly if the JMS client and messaging bus are on different computers. The provider endpoint URL must have the following format:
      bus_member_host_name:7276:BootstrapBasicMessaging
      where 7276 is the default SIB endpoint address. Do not use 127.0.0.1 or localhost for the bus member host name.
  2. Test the WebSphere Application Server configuration by using a stand-alone JMS client and completing the following steps.
    1. Put the following two JAR files in your class path: com.ibm.ws.sib.client.thin.jms_7.0.0.jar and com.ibm.ws.ejb.thinclient_7.0.0.jar.
      Copy these JAR files from the WebSphere Application Server Version 7 installation directory under the runtimes subdirectory. If you are using a non-IBM JRE, you also need the com.ibm.ws.orb_7.0.0.jar file.
    2. Ensure that the provider URL is set to iiop://WAS_server_host_name:boot_strap_port.
    3. Ensure that you specify the correct boot strap port.
    4. Ensure that the Queue Connection Factory and JMS Queue properties are set to the values defined in the WebSphere Application Server configuration.
    5. Compile the JMS client code.
    6. Run the JMS client with the following IBM® ORB debug parameters turned on.
      java -Dcom.ibm.CORBA.Debug=true -Dcom.ibm.CORBA.CommTrace=true -Dcom.ibm.CORBA.D ebug.Output=client.logJMS_Client_Class
      This command produces CORBA debug output in the client.log file in the same directory.
  3. Complete the following steps in WebSphere Message Broker.
    1. Stop the broker.
    2. Create a directory (for example, c:\WebSphere_WAS_Client) and copy the following two JAR files from WebSphere Application Server Version 7 Thin Client for JMS.
      • com.ibm.ws.sib.client.thin.jms_7.0.0.jar
      • com.ibm.ws.ejb.thinclient_7.0.0.jar
      Alternatively, you can copy these files from the WebSphere Application Server installation directory WAS home/runtimes.
    3. Configure the JMS service in WebSphere Message Broker by using the mqsichangeproperties command. The JMS provider WebSphere_WAS_Client exists; therefore you can change the client JAR file path for that provider.
      mqsichangeproperties broker_name -c JMSProviders -o WebSphere_WAS_Client -n jarsURL -v WAS_thin_client_JAR_file_path
    4. Configure the JMSInput node as shown in the following example. For more information about these properties, see JMSInput node.
      • Specify the name of the JMS provider; for example, Client for WebSphere Application Server.
      • Specify the initial context factory; for example, com.ibm.websphere.naming.WsnInitialContextFactory.
      • Specify the location of the JNDI bindings in the format iiop://WAS_server_host_name:WAS_server_boot_strap_port.
      • Set the connection factory name to QCF.
    5. Ensure that the JMS connection has been established before the message flow starts by using the Windows Event Viewer.

1 comment:

  1. Similarly using WSO2 Application Server, you can configure to communicate either with a JMS endpoint or an HTTP/S endpoint using either a JMS client or a HTTP/S client. This article explains about the configurations - http://wso2.com/library/knowledge-base/2011/03/communicating-wso2-app-server-jms/

    ReplyDelete