|
WebLogic Server 7.0 Code Examples, BEA Systems, Inc. | |||||
See:
Description
| Interface Summary | |
| Qsample | The methods in this interface are the public face of the qsample client. |
| QsampleHome | This interface is the home interface for the TraderBean.java, which in WebLogic is implemented by the code-generated container class TraderBeanC. |
| Class Summary | |
| Client | This class illustrates calling a stateful SessionBean and performing the following exercises: Create a Qsample Buy some shares using the Qsample Sell some shares using the Qsample Remove the Qsample |
| QsampleBean | QsampleBean is a stateful SessionBean. |
This example demonstrates the ability to use WTC to allow Tuxedo or WLS clients to enqueue to the STRING queue in Tuxedo /Q.
This example uses two domains:
In order to enqueue messages across domains, the name of the Queue Space (QSPACE) is advertised as an imported service. The QSPACE service is offered by the TMQUEUE server in the Tuxedo domain.
The sample /Q application is very similar to the application in qsample. It consists of a single server offering a single service, STRING, which converts a string from lower case to upper case. The service is called STRING. The client enqueues a request for this service. The request is placed on the request queue, STRING, by the TMQUEUE server. The request is handled by the TMQFORWARD server. This server removes the request from the request queue, sends it to the server for processing, and places the results on the reply queue, RPLYQ.
set PATH to check the status and add the path if necessary.
qsample example from your Tuxedo installation and create a working
Tuxedo qsample directory
qsample directory
%TUXDIR%\bin
setEnv.cmd located at %TUXDIR%. Unix users modify the tux.env file located at $TUXDIR.
makefile, ubb.sample and dom3config files from the WTC qsample
directory to your Tuxedo qsample directory
ubb.sample for your Tuxedo environment. This includes setting the pathnames for APPDIR, TUXCONFIG, and TUXDIR and setting the machine name.
Replace all <bracked> items with information for your environment.
APPDIR="/home/me/qsample"dom3config for your Tuxedo environment. This includes creating log devices and updating the network addresses.
DMTLOGDEV="d:\my_apps\tlog"TDOM3 NWADDR="//TuxedoMachine:1234"nmake /f qsample.nt
ubb.sample file
tmloadcf -y ubb.samplemakefile to build the client and server
crque to create the queue
crlog to create the transaction log
dom3config file
set BDMCONFIG=d:\mydomain\qsample\bdmconfigdmloadcf -y dom3configtmboot -ytmadmin psc command.The following domain processes should have booted:
DMADM, GWADM, and GWTDOMAINqsample directory
applications directory in your WLS domain
build
setExamplesEnv.cmd. Unix users copy ./config/examples/setExamplesEnv.sh script to your
WTC qsample directory, then modify and run the setExamplesEnv.sh script.
wtc_qsample.jar file using ant.
antsetWTCMbeans file with information specific to your installation.
setWTCMbeans.cmd file. Unix users modify the setWTCMbeans.sh file.user and passwd for your environmentsetWTCMbeans file to configure your installation.
setWTCMbeans.cmd file.setWTCMbeans.sh file.wtc_qsample.jar is deployed. Use the WLS console or
check the config.xml file. Manually deploy the EJB if needed.
qsample directory
run.cmd allcapsrun.sh allcapsThe service returns the following:
Beginning statefulSession.Client...
- Creating trader
- converting allcaps
- converted to: ALLCAPS
- End statefulSession.Client...
qsample example, use the WTC tracing feature. Add the TraceLevel attribute to your startWebLogic script.
-Dweblogic.wtc.TraceLevel=20000A TraceLevel of 20000 traces all of the calls to the Tuxedo object in the client.
For more information about WebLogic Server WebLogic Tuxedo Connector, see:
|
Documentation is available at http://e-docs.bea.com/wls/docs70 |
|||||