![]() |
![]() |
|
Developing WebLogic Tuxedo Connector Service Applications
The following sections provide information on how to create WebLogic Tuxedo Connector service applications:
Basic Service Application Operation
A service application uses Java and JATMI primitives to provide the following tasks:
Use the TPServiceInformation class getServiceData() method to receive client messages.
Note: For more detailed information on the TPServiceInformation class, view the WebLogic Tuxedo Connector Javadoc by opening the index.html file in the doc directory of your WebLogic Tuxedo Connector installation.
Use the following buffer types when sending and receiving messages between your application and Tuxedo:
Use Java code to express the logic required to provide your service.
Use the TuxedoReply class setReplyBuffer() method to respond to client requests.
Note: For more detailed information on the TuxedoReply class, view the WebLogic Tuxedo Connector Javadoc by opening the index.html file in the doc directory of your WebLogic Tuxedo Connector installation.
The following provides an example of the TolowerBean service application 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 Application
.
.
.
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.
|