![]() |
![]() |
|
|
| |
Developing WebLogic Tuxedo Connector Service EJBs
The following sections provide information on how to create WebLogic Tuxedo Connector service EJBs:
Basic Service EJB Operation
A service application uses Java and JATMI primitives to provide the following tasks:
Access Service Information
Note: For more detailed information on the TPServiceInformation class, view the Javadocs for WebLogic Server Classes. The WebLogic Tuxedo Connector classes are located in the weblogic.wtc.jatmi package.
Use the TPServiceInformation class to access service information sent by the Tuxedo client to run the service.do:
Buffer Messages
Use the following buffer types when sending and receiving messages between your application and Tuxedo:
Perform the Requested Service
Use Java code to express the logic required to provide your service.
Return Client Messages for Request/Response Communication
Note: For more detailed information on the TuxedoReply class, view the Javadocs for WebLogic Server Classes. The WebLogic Tuxedo Connector classes are located in the weblogic.wtc.jatmi package.
Use the TuxedoReply class setReplyBuffer() method to respond to client requests.
Use tpsend and tprecv for Conversational Communication
Note: For more information on Conversational Communication, see WebLogic Tuxedo Connector JATMI Conversations.
Use the following JATMI primitives when creating conversational servers that communicate with Tuxedo clients:
Example Service EJB
The following provides an example of the TolowerBean.java service EJB which receives a string argument, converts the string to all lower case, and returns the converted string to the client.
Listing 3-1 Example Service EJB
. . . public Reply service(TPServiceInformation mydata) throws TPException { TypedString data; String lowered; TypedString return_data; log("service tolower called"); data = (TypedString) mydata.getServiceData(); lowered = data.toString().toLowerCase(); return_data = new TypedString(lowered); mydata.setReplyBuffer(return_data); return (mydata); } . . .
![]() |
![]() |
![]() |
|
Copyright © 2001 BEA Systems, Inc. All rights reserved.
|