You must make the following configuration changes to the WebLogic Server 7.0 to drive the example MDB using TIBCO Enterprise Message Service instead of WebLogic Server.
CLASSPATH
of WebLogic Server.These steps are described below.
The WebLogic Server 7.0 environment setup and startup scripts check for the existence of the environment variable EXT_PRE_CLASSPATH
and a file named extEnv.cmd
. If the variable exists, WebLogic Server prepends its value to the CLASSPATH
. If the extEnv.cmd
file exists, it is called when WebLogic Server starts. To add TIBCO Enterprise Message Service to the WLS 7.0 CLASSPATH
:
The source files for the example MDB deployment descriptor are found in the example MDB source directory. Modify the file named weblogic-ejb-jar.xml
. The following lines must be inserted (in two separate places) inside the <message-driven-descriptor>
tag:
<initial-context-factory> com.tibco.tibjms.naming.TibjmsInitialContextFactory </initial-context-factory> <provider-url> tibjmsnaming://localhost:7222 </provider-url> <connection-factory-jndi-name> TopicConnectionFactory </connection-factory-jndi-name>
To use the JNDI provided by TIBCO Enterprise Message Service, the example MDB client program must be modified in three areas: the source code, the build script, and the runtime environment (that is, the CLASSPATH
).
The source file for the MDB client program is Client.java
. Find and replace the following strings in the source file:
Find:
|
Replace With:
|
---|---|
weblogic.jms.ConnectionFactory
|
TopicConnectionFactory
|
weblogic.jndi.WLInitialContextFactory
|
com.tibco.tibjms.naming.TibjmsInitialContextFactory
|
There should be one occurrence of each of the above strings. When you are finished, save your changes.
The client program is run by executing the ant
build script with a target of run
. The build script passes the JNDI provider URL to the client program, and therefore it must be modified to pass the provider URL of TIBCO Enterprise Message Service.
The file build.xml
in the example MDB source directory contains the build script. Near the bottom of that file is the following line:
Modify that line as follows:
You have already specified that tibjms.jar
should be added to the CLASSPATH
by creating a new command file in a previous section. To set the environment, perform the following:
Verify that tibjms.jar
is present when the script echoes the CLASSPATH
.
To create the example MDB destination objects, perform the following:
TIBCO Enterprise Message Service™ Application Integration Guide Software Release 4.3, February 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |