• The ATMI Java server TMJAVASVR, is a new Oracle Tuxedo system server acting as a bridge between the Tuxedo system and Java-implemented services. As a multithread server, Tuxedo Java server mainly performs the following tasks:Table 18‑1 lists available properties in a Java server configuration file. Please see the corresponding Java Server Configuration File Schema, which checks the validation of the configuration XML file for more precise information.
A comma-separated list of fully qualified FML classes. Any of FML16 field table classes should be defined here or else the Fldid()/ Fname() of the FML will not work. A comma-separated list of fully qualified FML classes. All the FML32 field table classes should be defined here or else the Fldid()/ Fname() of the FML32 will not work. Following <ClassPath> element settings are supported in Tuxedo Java configuration file:<ClassPath>customer_lib_path/*.jar</ClassPath> or <ClassPath>customer_lib_path/*.zip</ClassPath><ClassPath>customer_lib_path/lib1.jar</ClassPath> or <ClassPath>customer_lib_path/lib2.zip</ClassPath>
• All the file searches in customer_lib_path are non-recursive.
•
• The $APPDIR is added into classpath by default.To use the View/View32, you need to specify the View class in <Resources></Resources> element. To use the Fldid()/Fname() properly, you need to specify the FML/FML32 field table class in <Resources></Resources> element.
• Only <TuxedoServerClasses> is mandatory in Java server configuration file, and at least one TuxedoServerClass should be configured.
• Currently, only one <DataSource> element is allowed to be configured in <DataSources> in configuration file. The name property for <DataSource> does not take effect for the present.
• Only <ClassPath>, <fieldTable16Class>, <fieldTable32class>, <viewFile16Class>, <viewFile32Class>, and <Service> element can have multiple entities.
• In <Resources> section, you should configure <fieldTable16Class> first and then <fieldTable32class>, <viewFile16Class>, and <viewFile32Class> in sequence.
Note: The configuration file (e.g. TJSconfig.xml) will be checked against the Schema file TJSconfig.xsd which is located in $TUXDIR/udataobj/tuxj/TJSconfig.xsd (Unix) or $TUXDIR\udataobj\tuxj/TJSconfig.xsd (Windows). Oracle recommends you refer to TJSconfig.xsd for more information about configuration rules.Each Tuxedo Java server class that implements services must implement a set of methods, of which input argument parameter is the TPSVCINFO interface. The methods that are advertised as services must be the public method and have the return type set to void.Tuxedo Java server advertises all of public methods as services into bulletin board. If Services is specified in configuration file, Tuxedo Java server uses the value of name property as the service name, otherwise, the method name is used as the service name.Listing 18‑1 shows a Tuxedo Java server configuration file example.Suppose the MyTuxedoServerClass1 Java class defines JAVASTRINGSVC, JAVAFML32SVC, and svc3 methods, and the MyTuxedoServerClass2 Java class defines svc4 method, this example initiates the connection to Oracle database with JDBC connection and exports the services: svc1, svc2, svc3, and svc4.Note that the method name svc3 and svc4 are exported as the service name because there is no <Service> property specified for them in the configuration file.Listing 18‑1 Tuxedo Java Server Configuration ExampleThe Tuxedo Java-based transaction is implemented based on the existing Tuxedo transaction management framework. As before, the configuration you need to make in the UBB configuration file for transaction is, define the attributes of transaction manager servers (TMSs) and resource managers (RMs) for a particular group. The Tuxedo Java Server (TMJAVASVR) should belong to this group.Listing 18‑2 UBB Configurations for Java-Based TransactionFor more information about how to configure the transaction in UBB config file, see Configuring Your ATMI Application to Use Transactions.In this release, the Java-implemented services can only connect the database with JDBC connection, so you need to specify JDBC parameters in Tuxedo Java server configuration file using ConnectionUrl property.Because the Java server retrieves user name and password from OPENINFO, you should provide the user name and password in OPENINFO in UBB configuration file. This way encrypts the password and ensures the high security.Listing 18‑3 is a configuration example of Oracle database.Listing 18‑3 Oracle Database Configuration ExampleThe AUTOTRAN can also be configured on the services advertised by Tuxedo Java server. When the Tuxedo Java server service is configured in *SERVICES section and its AUTOTRAN attribute is specified as Y, the service starts a transaction automatically.Before running TMJAVASVR, you must make sure the libjvm.so (Unix) or jvm.dll (Windows) is located in the library loading path of your platform.
• On Oracle Enterprise Linux (64 bit) and Java SE, make sure $JRE_HOME/lib/amd64/server is included in $LD_LIBRARY_PATH.
• On Oracle Enterprise Linux (64 bit) and Oracle JRockit JVM, make sure $JRE_HOME/lib/amd64/jrockit and $JRE_HOME/lib/amd64 are included in $LD_LIBRARY_PATH.
• On AIX PPC64, we suggest that you include both $JRE_HOME/lib/ppc64/classic and $JRE_HOME/lib/ppc64 in $LIBPATH.
•
•
•
Note: The $JRE_HOME points to the JRE home directory. You can also refer to $TUXDIR/tux.env for the setting.Listing 18‑4 shows the XML schema of the Java server configuration file:Listing 18‑4 Java Server Configuration Schema File