Table of Contents Previous Next PDF


ATMI Java Server User Interfaces

ATMI Java Server User Interfaces
This topic includes the following sections:
TuxedoJavaServer
TuxedoJavaServer is an abstract class, which should be inherited by all the user-defined classes that implement the services.
 
Oracle Tuxedo Java Context
To access the TJATMI primitives provided by Oracle Tuxedo Java server, you need to get a TuxAppContext object that implements all the TJATMI primitives.
Because the service class inherits from TuxedoJavaServer, you can call getTuxAppContext() in the service to get the context object. However, you cannot get TuxAppContext in tpsvrinit() because the TuxAppContext is not ready at this time. If you try to get the TuxAppContext object in tpsvrinit(), tpsvrinit() will fail and throw an exception.
TJATMI Primitives for Tuxedo Java Applications
TJATMI is a set of primitives that provides communication between clients and servers, such as calling the services, starting and ending transactions, getting the connection to DataSource, logging, and etc.
For more information, please refer to Jave Server Javadoc.
 
Table 3‑2 TJATMI Primitives
Note:
The service continues running after tpreturn ends execution. It is recommended put tpreturn() as the last executive statement in the service.
TypedBuffers for Tuxedo Java Applications
ATMI Java server reuses the Oracle WebLogic Tuxedo Connector TypedBuffers that corresponds to Oracle Tuxedo typed buffers. Messages are passed to servers in typed buffers. The ATMI Java server provides the following buffer types in Table 3‑3:
 
Table 3‑3 TypedBuffers
For more information about TypedBuffers, please see the Package of "weblogic.wtc.jatmi".
Additionally, "Using FML with Oracle Tuxedo Java Server" and "Using VIEW with Oracle Tuxedo Java Server" in Reference are useful for you to use TypedFML/TypedFML32 and/or TypedView/TypedView32 in Java server class.
Limitations for Typedbuffer Support
Fldid()/Fname() for the TypedFML32 which is embedded in another TypedFML32 cannot work. To work around this issue, you can use the fieldtable class instead for name/id transferring.
The weblogic.wtc.gwt.XmlViewCnv/XmlFmlCnv class is not available for the present.
Get/Set Service Information
Use the TPSVCINFO class to get/set service information sent by the Oracle Tuxedo client.
 
Table 3‑4 Getter Functions
Use TuxATMIReply to get the reply data and meta-data from a service invocation.
 
Return the tpurcode returned from a service
Exception
You need to catch the exception thrown by JATMI primitives in the service, such as tpcall(). There are two types of exceptions that JATMI can throw:
TuxATMITPException: Exception thrown that represents a TJATMI failure.
TuxATMITPReplyException: Exception thrown if there was a service failure (TPESVCFAIL or TPSVCERROR) and user data may be associated with the exception.
For more information, please refer to Jave Server Javadoc.
Trace
You also need to export TMTRACE=atmi:ulog as you have done for traditional Tuxedo ATMI. The TJATMI API traces are written into ULOG as other ATMI traces.

Copyright © 1994, 2017, Oracle and/or its affiliates. All rights reserved.