DevPortal

How do I Configure JMS Adapters in J2EE Servers?


JMS Adapters are setup in a J2EE Server instance determining the connectivity to a Message Server (Embedded, Standalone, or HA-Message Server). JMS Adapters can be configured in resource-config.xml file of the J2EE Server (Standalone or cluster-node).

In case of non-embedded Message Server, that is, when the JMS is not running in the same VM as the EJBService, specify the com.pramati.naming.client.PramatiClientContextFactory for java.naming.factory.initial.

Also, specify the IP and port of the VM where the Message Server is running in resource-config.xml. In case of HA-Message Server, provide the comma-separated list of URLs of HA-Message Server nodes.

Sample Configuration for Local JMS Adapter

A sample configuration for the local JMS Adapter is shown below. The sample configuration is valid only for a Message Server running in an embedded mode:

<jms-adapters>
  <jms-adapter name="default" description="nodesc" interface-class="com.pramati.jms.client.JMSProviderImpl">
   <properties>
    <property name="java.naming.factory.initial" value="com.pramati.naming.PramatiLocalContextFactory"/>
    <property name="java.naming.provider.url" value="rmi://localhost:9191"/>
   </properties>
  </jms-adapter>
</jms-adapters>

Sample Configuration for External JMS Adapter (non-HA)

A sample configuration for the external JMS Adapter (non-HA) is shown below. The sample configuration is valid only for a Message Server not running in embedded mode. jmshost is the host where the standalone Message Server is running on Port 2099:

<jms-adapters>
  <jms-adapter name="default" description="nodesc" interface-class="com.pramati.jms.client.JMSProviderImpl">
   <properties>
    <property name="java.naming.factory.initial" value="com.pramati.naming.PramatiClientContextFactory"/>
    <property name="java.naming.provider.url" value="rmi://jmshost:2099"/>
   </properties>
  </jms-adapter>
</jms-adapters>

Sample Configuration for External JMS Adapter (HA)

A sample configuration for an external JMS Adapter (HA) is shown below. The sample configuration is valid only for an HA-Message Server cluster. jms2 and jms1 are part of HA-Message Server configuration.

<jms-adapters>
  <jms-adapter name="default" description="nodesc" interface-class="com.pramati.jms.client.JMSProviderImpl">
   <properties>
    <property name="java.naming.factory.initial" value="com.pramati.naming.PramatiClientContextFactory"/>
    <property name="java.naming.provider.url" value="rmi://jms2:9191,rmi://jms1:9191"/>
   </properties>
  </jms-adapter>
</jms-adapters>

Note: For HA-Message Server node or a standalone Message Server node, the resource-config.xml should not contain any JMS Adapters.


Related Topics:

© Pramati Technologies 2007 Runs on Pramati Server | Feedback | Legal