TuxedoJavaServer is an abstract class, which should be inherited by all the user-defined classes that implement the services.
Table 3‑1 TuxedoJavaServer Interfaces 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.
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.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 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.
• 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.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.
Table 3‑5 Getter Functions for Reply Return the tpurcode returned from a serviceYou 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.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.