|
WebLogic Server 7.0 Code Examples, BEA Systems, Inc. | |||||
The following sections provide information to configure the tBridge to communicate with JMS and Tuxedo using two simple routines provided with WebLogic Tuxedo Connector:
tBsend2jms url [target queue] - reads from the terminal and send a JMS message to the
designated queue.
tBfrom2jms url [target queue]- reads from a JMS queue and sends to the terminal.
url: the URL passed to your administration server.
target queue: Optional. Specifies a target queue. Default values are:
tBsend2jms
tBfrom2jms
weblogic.jms.Jms2TuxQueue - the tBridge is a message consumer associated
with this queue. When a message is written to this queue, as described in
the configuration, tBridge will read the message and call the desired
Tuxedo service.
weblogic.jms.Tux2JmsQueue - the tBridge will return the Tuxedo service
response to this JMS queue.
weblogic.jms.weblogic.jms.tBerrorQueue - location used to store JMS messages when
a message cannot be redirected.
Configure the JMS server and queues using the WebLogic Server console or by editing the WebLogic Server
CONFIG.XML file as follows:
<JMSServer
Name="TestJMSServer"
Targets="examplesServer">
<JMSQueue
JNDIName="weblogic.jms.Jms2TuxQueue"
Name="Jms2TuxQueue"/>
<JMSQueue
JNDIName="weblogic.jms.Tux2JmsQueue"
Name="Tux2JmsQueue"/>
<JMSQueue
JNDIName="weblogic.jms.tBerrorQueue"
Name="tBerrorQueue"/>
</JMSServer>
Use the following steps to interface tBridge with a Tuxedo Service:
simpapp examplesimpapp example.
Successful execution demonstrates that the TOUPPER EJB is working correctly.
simpapp WTCServer Mbean is not targeted to the examplesServer.
TuxS file located in the tBridge directory to your simpapp directory.
TuxS.cmd file. Unix users copy the TuxS.sh file.TuxS file with information specific to your installation.
TuxS.cmd file. Unix users verify the TuxS.sh file.url, user and passwd for your environment.TuxS file to configure your installation.
TuxS.cmd file.TuxS.sh file.tBfrom2jms routine by using
the following command:
java weblogic.wtc.tbridge.tBfrom2jms t3://localhost:7001The routine indicates that it is waiting for a JMS message.
tBsend2jms routine using the following command:
java weblogic.wtc.tbridge.tBsend2jms t3://localhost:7001The routine indicates that it is waiting for terminal input.
tBsend2jms window, type in a text string such as "Hello"
tBfrom2jms window responds with "HELLO"
weblogic.jms.Jms2TuxQueue and sends messages to
the Tuxedo /Q QSPACE named STRING with the reply queue set to RPLYQ.
weblogic.jms.Tux2JmsQueue.Use the following steps to interface with Tuxedo /Q:
qsample exampleqsample example.
Successful execution demonstrates that the EJB is working correctly.
qsample WTCServer Mbean is not targeted to the examplesServer.
TuxQ file located in the tBridge directory to your qsample directory.
TuxQ.cmd file. Unix users copy the TuxQ.sh file.TuxQ file with information specific to your installation.
TuxQ.cmd file. Unix users verify the TuxQ.sh file.url, user and passwd for your environment.TuxQ file to configure your installation.
TuxQ.cmd file.TuxQ.sh file.
tBfrom2jms routine by using the following command:
java weblogic.wtc.tbridge.tBfrom2jms t3://localhost:7001The routine should respond indicating that it is waiting for a JMS message.
tBsend2jms routine using the following command:
java weblogic.wtc.tbridge.tBsend2jms t3://localhost:7001The routine indicates that it is waiting for terminal input.
tBsend2jms window, type in a text string such as "Hello"
tBfrom2jms window responds with "HELLO"
simpfml32 examplesimpfml32 example.
Successful execution demonstrates that the EJB is working correctly.
simpfml32 WTCServer Mbean is not targeted to the examplesServer.
XMLtoFML file located in the tBridge directory to your simpfml32 directory.
XMLtoFML.cmd file. Unix users copy the XMLtoFML.sh file.XMLtoFML file with information specific to your installation.
XMLtoFML.cmd file. Unix users verify the XMLtoFML.sh file.url, user and passwd for your environment.XMLtoFML file to configure your installation.
XMLtoFML.cmd file.XMLtoFML.sh file.
tBfrom2jms routine by using the following command:
java weblogic.wtc.tbridge.tBfrom2jms t3://localhost:7001The routine should respond indicating that it is waiting for a JMS message.
tBsend2jms routine using the following command:
java weblogic.wtc.tbridge.tBsend2jms t3://localhost:7001The routine indicates that it is waiting for terminal input.
tBsend2jms window, type the following simple XML message:
<XML><STRING>Hello</STRING></XML>
tBfrom2jms window displays the
returned FML message:
<FML32><STRING>olleH</STRING></FML32>
For more information about WebLogic Server WebLogic Tuxedo Connector, see:
|
Documentation is available at http://e-docs.bea.com/wls/docs70/ |
|||||