|
WebLogic Server 6.1 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 simpapp. 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 directoryqsample directory%TUXDIR%\bin setEnv.cmd located at %TUXDIR%. Unix users modify the tux.env file located at $TUXDIR.nmake /f qsample.ntmakefile to build the client and server and then run crque to create the queue.ubbdomain and dom3config files from the WTC qsample directory to your Tuxedo qsample directoryubbdomain 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/simpapp"dom3config for your Tuxedo environment. This includes creating log devices and updating the network addresses.DMTLOGDEV="d:\my_apps\tlog"TDOM3 NWADDR="//TuxedoMachine:1234"ubbdomain file tmloadcf -y ubbdomaindom3config file set BDMCONFIG=d:\mydomain\simpapp\bdmconfigdmloadcf -y dom3configcrlog to create the transaction log.tmboot -ytmadmin psc command.The following domain processes should have booted: DMADM, GWADM, and GWTDOMAINqsample directoryapplications 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. antbdmconfig.xml file with information specific to your installation: bdmconfig.xml file using the WTCValidateCF utility:java weblogic.wtc.gwt.WTCValidateCF bdmconfig.xmlwtc_qsample.jar is deployed. Use the WLS console or check the config.xml file. Manually deploy the EJB if needed.bdmconfig.xml file you are using for the example. weblogic.wtc.gwt.WTCStartupBDMCONFIG=path_name_of_your_bdmconfig.xml_fileweblogic.wtc.gwt.WTCShutdownqsample directoryrun.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 parameter to the StartUp Class Argument list. BDMCONFIG=path_to_my_bdmconfig.xml_file,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/docs61 |
|||||