Configure Borland Enterprise Server to use TIBCO Enterprise Message Service


Administered JMS objects such as queues, topics, and their respective connection factories are defined in the jndi-definitions.xml file. This file defines objects that are loaded into the Borland file-based naming service. This file is pre-configured to load the SonicMQ objects. You must modify this file to specify TIBCO Enterprise Message Service objects instead.

The Borland Enterprise Server installation contains several copies of the jndi-definitions.xml file, and you should modify the file in the correct location. If Borland Enterprise Server was installed in the default location (C:\BorlandEnterpriseServer), then there is a subdirectory within the C:\BorlandEnterpriseServer\var\servers directory named for the server you have installed. The default name of the subdirectory is the name of the machine, but you can specify a different server name. The jndi-definitions.xml file you wish to edit should be located in the following directory:

 
C:\BorlandEnterpriseServer\var\servers\<server-name>\partitions\stand
ard 

Near the end of this file are several XML elements named <jndi-object> that define the SonicMQ JMS classes. These must be replaced with TIBCO Enterprise Message Service classes. The following illustrates the replacements to make in bold:

 
<jndi-object> 
   <jndi-name>serial://jms/qcf</jndi-name> 
   <class-name> 
com.tibco.tibjms.appserver.borland.TibjmsBorlandQueueConnectionFactory 
   </class-name> 
   <property> 
      <prop-name>serverUrl</prop-name> 
      <prop-type>String</prop-type> 
      <prop-value>tcp://localhost:7222</prop-value> 
   </property> 
</jndi-object> 
 
<jndi-object> 
   <jndi-name>serial://jms/tcf</jndi-name> 
   <class-name> 
com.tibco.tibjms.appserver.borland.TibjmsBorlandTopicConnectionFactory 
   </class-name> 
   <property> 
      <prop-name>serverUrl</prop-name> 
      <prop-type>String</prop-type> 
      <prop-value>tcp://localhost:7222</prop-value> 
   </property> 
</jndi-object> 
 
<jndi-object> 
   <jndi-name>serial://jms/q</jndi-name> 
   <class-name> 
      com.tibco.tibjms.appserver.borland.TibjmsBorlandQueue 
   </class-name> 
   <property> 
      <prop-name>address</prop-name> 
      <prop-type>String</prop-type> 
      <prop-value>SampleQ1</prop-value> 
   </property> 
</jndi-object> 
 
<jndi-object> 
   <jndi-name>serial://jms/t</jndi-name> 
   <class-name> 
      com.tibco.tibjms.appserver.borland.TibjmsBorlandTopic 
   </class-name> 
   <property> 
      <prop-name>address</prop-name> 
      <prop-type>String</prop-type> 
      <prop-value>SampleT1</prop-value> 
   </property> 
</jndi-object> 

If you are running the TIBCO Enterprise Message Service server in secure mode, you can specify default username and password attributes in the connection factories.

The default username and password are used by the connection factories for every connection created where a username and password is not explicitly provided by the application server. An example definition of these connection factory properties is shown below:

  
<property> 
   <prop-name>userName</prop-name> 
   <prop-type>String</prop-type> 
   <prop-value>user1</prop-value> 
</property> 
<property> 
   <prop-name>userPassword</prop-name> 
   <prop-type>String</prop-type> 
   <prop-value>secret</prop-value> 
</property> 

You must also place the TIBCO Enterprise Message Service JAR files where Borland Enterprise Server can locate them. There are various ways to accomplish this, but the simplest method is to create a directory named patches under C:\BorlandEnterpriseServer\lib and place the JAR files there. Borland Enterprise Server prepends any jar files in that location to its CLASSPATH automatically. The following jar files from the TIBCO Enterprise Message Service installation should be placed under C:\BorlandEnterpriseServer\lib\patches:

 
jms.jar 
jndi.jar 
tibjms.jar 
tibjmsapps.jar 

TIBCO Enterprise Message Service™ Application Integration Guide
Software Release 4.3, February 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com