NonStop Server for Java Programmer's Reference Abstract This document describes the HP NonStop™ Server for Java™, based on Java 2 Platform, Standard Edition, SDK 1.4.1, a Java environment that supports compact, concurrent, dynamic, and portable programs for the enterprise server. The NonStop Server for Java uses the HP NonStop Kernel operating system to add scalability and program persistence to the Java environment. Product Version NonStop Server for Java (based on J2SE SDK 1.4.1) 1.
Ordering Information For manual ordering information: domestic U.S. customers, call 1-800-243-6886; international customers, contact your local sales representative. Legal Notices Copyright 2003 Hewlett-Packard Development Company L.P.
Inc. © 1989, 1990, 1991 Transarc Corporation. OSF software and documentation are based in part on the Fourth Berkeley Software Distribution under license from The Regents of the University of California. OSF acknowledges the following individuals and institutions for their role in its development: Kenneth C.R.C. Arnold, Gregory S. Couch, Conrad C. Huang, Ed James, Symmetric Computer Systems, Robert Elz. © 1980, 1981, 1982, 1983, 1985, 1986, 1987, 1988, 1989 Regents of the University of California.
NonStop Server for Java Programmer's Reference ● About This Document ❍ ● ● New and Changed Information ■ SDK 1.4.
■ ● ❍ Floating Point Support ❍ Using AWT Classes ❍ POSIX Threads ❍ Additional Features that Affect Migrating Programs Installation and Configuration ❍ Installation Requirements ❍ Configuration Requirements ❍ ● User-Provided Jar Files ■ Creating Larger or Additional Swap Files ■ Setting Environment Variables ■ Symbolic Link ■ Binding Libraries into the JVM ■ Using the Makefile to Link in Native Libraries ■ Configuring TCP/IP and DNS for RMI NonStop Server for Java 4 Directory Str
■ How to Call TNS Floating-Point Functions from JNI Code Java Print Service (JPS) ❍ JavaBeans ❍ Debugging Java Programs ❍ ● Double-Precision Values ❍ ❍ ● ■ ■ Debugging Overview ■ Transports ■ java Command-Line Options to Run a Debuggee ■ Starting the Java Debugger (jdb) Tool ■ Debugging JNI Code ■ Debugging Java and JNI Code Deviations in Java VM Specification Options ■ java: Java Application Launcher Command-line Option Deviations ■ jdb: Java Debugger Command-Line Option Deviat
❍ ● Java Transaction API (JTA) ■ javax.transaction Interfaces ■ javax.
Java Docs Home Page | Contents | Index | Glossary | Prev | Next About This Document This section explains these subjects: ● New and Changed Information ● Is This Document for You? ● Document Structure ● Printing This Document ● Related Reading ● Notation Conventions ● Abbreviations New and Changed Information This edition of the NonStop Server for Java Programmer's Reference describes how it differs from the previous edition (part number 426947-005) for NonStop Server for Java release version u
● ● ● (http://java.sun.com/j2se/1.4.1/docs/relnotes/features.html) Summary of documentation changes (http://java.sun.com/j2se/1.4.1/docchanges.html) since version 1.4 was first released Another Sun document that describes the compatibility of SDK 1.4.1 with previous releases (http://java.sun.com/j2se/1.4.1/compatibility.html) Release notes for the Sun SDK 1.4.1 release (http://java.sun.com/j2se/1.4.1/relnotes.html) NonStop Server for Java 4 Feature Changes In addition to the SDK 1.4.
● ● ● ● ● ● Use of a new version of POSIX threads that requires changes in any JNI code that invokes pthreads routines Support for the Internet Protocol version 6 (IPv6) through the NonStop TCP/IPv6 subsystem Switched from using HP Guardian Sockets to using HP NonStop Open System Services (OSS) Sockets Implementation of the Print API, Java Print Service (JPS) An additional environment variable, JAVA_PTHREAD_MAX_TRANSACTION, used to specify the maximum number of TMF transactions allowed per process Impl
jndi.jar Removed as an implement-specific file. This file contains the Sun Microsystems Java classes that implement the Java Naming and Directory Interface (JNDI). JNDI is supported and included in the rt.jar file. Documentation Organization Changes This manual had several sections added and several sections removed.
Is This Document for You? This NonStop Server for Java Programmer's Reference is for all Java programmers who want to use Java on HP NonStop systems. For programmers new to Java, this document refers to documentation from Sun Microsystems, Inc., which explains what the J2SE Software Development Kit (SDK) contains and where to learn more about the language in general. This NonStop Server for Java Programmer's Reference does not teach Java or provide detailed information about the J2SE SDK.
Introduction to NonStop Server for Java 4 Explains NonStop software fundamentals as they apply to NonStop Server for Java 4 and J2SE SDK highlights. Migrating to NonStop Server for Java 4 Explains how to change your applications that run with earlier versions of NonStop Server for Java, or how to use tools, to compile and run these applications with NonStop Server for Java 4.
Printing This Document Although reading this document on paper sacrifices the HTML links to other documentation that you can use when viewing this document on your computer screen, you can print this document, one file at a time, from either the NonStop Technical Library or your web browser. For a list of the sections that compose this document, see the table under Document Structure. Note: Some browsers require that you reduce the print size to print all the text displayed on the screen.
❍ JDBC Driver for SQL/MX Programmer's Reference ❍ This document describes how to use the JDBC Driver for SQL/MX (JDBC/MX) on NonStop servers. JDBC/MX gives Java applications JDBC access to NonStop SQL databases through SQL/MX. JDBC/MX conforms to the JDBC API from Sun Microsystems, Inc. JToolkit for NonStop Servers Programmer's Reference This documentation describes the JToolkit for NonStop Servers, a set of additional features that work in conjunction with NonStop Server for Java.
you use the Java Native Interface (JNI) to communicate between Java and C. ● Inspect Manual Documents the Inspect interactive symbolic debugger for HP NonStop systems . You can use Inspect to debug JNI code running in a Java virtual machine (VM). (To debug Java code, you use the jdb tool.) ● Installation Documents ❍ G06.20 Software Installation and Upgrade Guide ❍ Provides detailed procedures for upgrading a NonStop S-series server to the G06.20 release version update (RVU) from any G03.
● database access on NonStop servers. Open System Services Porting Guide ● Includes information on differences in pthreads routines that is useful for migrating NonStop Server for Java applications to NonStop Server for Java, based on Java 2 Platform, Standard Edition, SDK 1.4.1. Open System Services Programmer's Guide ● Describes how to write applications in C for the OSS environment and includes information on using standard POSIX threads and TMF transaction jacket routines.
❍ SQL/MP Version Management Guide ❍ Explains the rules governing version management for the NonStop SQL software, catalogs, objects, messages, programs, and data structures. SQL/MP Messages Manual Explains NonStop SQL/MP messages for the conversational interface, the application programming interface (API), and the utilities. ❍ SQL/MP Programming Manual for C Describes the SQL/MP programmatic interface for ANSI C. Also describes embedded SQL statements used in C applications.
● ❍ Describes SQL/MX language elements (such as expressions, predicates, and functions) and the SQL statements that can be run in MXCI or in embedded programs. Also describes MXCI commands and utilities. SQL/MX Messages Manual ❍ Describes SQL/MX messages. SQL/MX Programming Manual for C and COBOL ❍ Describes the SQL/MX programmatic interface for ANSI C and COBOL. SQL/MX Data Mining Guide ❍ Describes the SQL/MX data structures and operations needed for the knowledge-discovery process.
● TS/MP System Management Manual Provides information about Pathway applications. You must be familiar with Pathway applications in order to configure Scalable TCP/IP (SIP) applications. Sun Microsystems Documents Note: Sun Microsystems Java 2 SDK, Standard Edition Documentation Version 1.4.1 is provided on the NonStop Server for Java 4 product distribution CD in a .zip file for your convenience in case you cannot get Java documentation from the Sun Microsystems Web sites.
Notation Conventions Bold Type Bold type within text indicates terms defined in the Glossary. For example: abstract class Computer Type Computer type letters within text indicate keywords, reserved words, command names, class names, and method names; enter these items exactly as shown. For example: myfile.c Italic Computer Type Italic computer type letters in syntax descriptions or text indicate variable items that you supply. For example: pathname [ ] Brackets Brackets enclose optional syntax items.
-D propertyName=newValue Item Spacing Spaces shown between items are required unless one of the items is a punctuation symbol such as a parenthesis or comma. If there is no space between two items, spaces are not permitted. In the following example, spaces are not permitted before or after the period: subvolume-name.
HTTP. Hypertext Transfer Protocol IDL. Interface Definition Language IEC. International Electrotechnical Committee IEEE. Institute for Electrical and Electronic Engineers IETF. Internet Engineering Task Force ISO. International Organization for Standardization JAR. Java Archive JCK. Java Conformance Kit JFC. Java Foundation Classes JDBC. Java Database Connectivity JDBC/MP. JDBC Driver for SQL/MP JDBC/MX. JDBC Driver for SQL/MX JNDI. Java Naming and Directory Interface JNI. Java Native Interface JPS.
Pthread. POSIX thread RDF. Remote Duplicate Database Facility RISC. reduced instruction set computing RMI. Remote Method Invocation RVU. Release Version Update SDK. Software Development Kit SIP. Scalable TCP/IP SPI. service provider interface SPJ. stored procedure in Java SQLJ. embedded SQL in Java programs SQL/MP. Structured Query Language/MP SQL/MX. Structured Query Language/MX TACL. Tandem Advanced Command Language TCP/IP. Transmission Control Protocol/Internet Protocol TIM.
Contents | Index | Glossary | Prev | Next Introduction to NonStop Server for Java 4 The HP NonStop Server for Java 4 is a Java environment that supports compact, concurrent, dynamic, portable programs for the enterprise server. The NonStop Server for Java 4 requires the HP NonStop Kernel Open System Services (OSS) environment. The NonStop Server for Java 4 uses the HP NonStop Kernel operating system to add the NonStop system fundamentals of scalability and program persistence to the Java environment.
● IPv6 Support ● Accessing SQL Databases Java Software Development Kit (SDK) Highlights The NonStop Server for Java 4 consists of the following standard Java components (and the HP extensions described elsewhere in this document): ● Java virtual machine (VM) based on version 1.4.1 ● Core Packages of the Java 2 Platform, Standard Edition, SDK 1.4.1 ● Tools of the SDK, version 1.4.1 except AppletViewer and policy tool. NonStop Server for Java 4 supports the SDK 1.4.
Java Naming and Directory Interface (JNDI) Highlights The Java Naming and Directory Interface (JNDI) provides naming and directory functionality to Java programs. It is independent of any specific directory service implementation; therefore, it allows a variety of directories to be accessed in a common way. The JNDI architecture consists of an Application Programming Interface (API) and a Service Provider Interface (SPI). Java programs use the JNDI API to access a variety of naming and directory services.
Accessing SQL Databases The NonStop Server for Java distribution CD includes the JDBC type 2 drivers to access both SQL/MX and SQL/MP. These drivers are ● JDBC Driver for SQL/MX (JDBC/MX), which provides support for the current version of NonStop SQL/MX. ● JDBC Driver for SQL/MP (JDBC/MP), which provides support for all of the released versions of NonStop SQL/MP.
Contents | Index | Glossary | Prev | Next Migrating to NonStop Server for Java 4 This section describes changes you need to make to migrate applications that use earlier versions of NonStop Server for Java to NonStop Server for Java 4. For information on product changes, see New and Changed Information.
When the PAX file is extracted, a symbolic link is created at the standard location: /usr/tandem/java. If you want to install NonStop Server for Java 4 in a nonstandard location, you can do so as with earlier releases. To do that kind of installation, use the File Transfer Protocol (FTP) to transfer the file from the CD to the NonStop Kernel system. Then follow the directions in the product SOFTDOC for a nonstandard installation.
Floating Point Support By default, previous versions of NonStop Server for Java converted any floating-point value that crossed the Java Native Interface (JNI) boundary to a TNS float. This default could be overridden by supplying a line in the file TandemVMClassFP.properties. If a particular class needed IEEE floating-point values passed to its JNI code instead of TNS float values; users added a property (with the name of the class being the name of the property) to this file.
Windowing Toolkit (AWT) classes and methods that did not require a display, keyboard, sound, or mouse operation. Any class or method that required such an operation threw an UnsupportedClassException. NonStop Server for Java 4 supports the Sun Microsystems enhancement to AWT called "headless support" that allows a Java VM to indicate whether a display, keyboard, sound, or mouse operation can be supported in a graphics environment.
In previous versions of NonStop Server for Java, the bin and jre/bin directories contained a shell script that ran the real executable that was located in bin/oss/posix_threads. In the NonStop Server for Java 4 version, the bin directory contains the real executable, no shell script wrapper, and no bin/oss/posix_threads directory. The jre/bin directory contains symbolic links to the executables in the bin directory.
Contents | Index | Glossary | Prev | Next Installation and Configuration This section explains these subjects: ● Installation Requirements ● Configuration Requirements ● NonStop Server for Java Directory Structure ● Running Java Tools ● Verifying the NonStop Server for Java Installation Installation Requirements Hardware and software requirements for the NonStop Server for Java 4 are described in the README file on the product CD. Read that document before installing the product.
Creating Larger or Additional Swap Files To have enough memory to execute the Java virtual machine (Java VM), you need one additional swap file managed by the NonStop Kernel operating system for each processor in which you plan to run the Java VM. Each of these swap files must be at least 510 MB (1024 Extents, 255 MaxExtents). Since the G06 software release, the operating system creates one swap file per processor, but the default swap file size is 256 MB.
Documentation provided by Sun Microsystems (http://java.sun.com/j2se/1.4.1/docs/tooldocs/solaris/classpath.html) describes the use of CLASSPATH. When applying that documentation to the NonStop Server for Java 4, you should follow the instructions given for sh and ksh instead of those for csh and tcsh. Instructions for setenv and unsetenv do not apply to the NonStop Server for Java 4.
You can also reset the symbolic link yourself by using the ln command with the -s option. For example, if you install a PVU based on version 1.3 of the JDK, but still want version 1.4.1 to be the one referred to by /usr/tandem/java, you can reset the symbolic link instead of unpaxing version 1.4.
The rules in the Makefile for tasks that you might want to perform are: make Invokes the default "install" rule that relinks a new java executable file. The Makefile searches the directories listed in the variable CUSTLIB_DIRS for custom libraries to link in. The JDBC drivers for NonStop SQL are linked in as follows: ❍ If the JDBC Driver for SQL/MX is installed, this driver is linked in only if the NonStop SQL/MX product is installed on the system.
CUSTLIB_DIRS Contains a space-separated list of absolute directory names in which to search for custom library files to link into the java executable. Custom library files can be archive library files (*.a) or relinkable library files (*.lib). By default, the make operation looks for custom libraries in /usr/tandem/java_public_lib.
CD /h/testdir make -f /usr/tandem/java/install/Makefile TARGET_JAVA_DIR=. \ CUSTLIB_DIRS=/h/testdir In this example, CUSTLIB_DIRS must contain an absolute directory name even though the current working directory is /h/testdir. The backslash (\) character is a continuation character and is not required if you type the command on one line. Example 3 sets CUSTLIB_DIRS to more than one directory and uses a wildcard in one directory.
NonStop Server for Java 4 Directory Structure This subsection explains: ● Directory Contents ● Demonstration Programs Directory Contents The /usr/tandem/java directory contains release documents and subdirectories. The following table lists the subdirectories and describes their contents.
Demonstration Program Illustrates invocation_api How to properly build an executable that can create its own Java virtual machine (Java VM) javahjni How to create a native library and statically link it with a java executable and how to convert IEEE floating point to TNS floating point jdbcTrace How to use JDBC trace facility (for more information on using the facility, see JDBC Trace Facility, and the JDBC Driver for SQL/MX Programmer's Reference.
NonStop Server for Java 4 can be installed in other locations, and often several installations will be used on a system. When verifying the installation, check that you are verifying the correct installation directory. To verify the version of the NonStop Server for Java 4 product, issue this vproc command at the OSS prompt: vproc /installation_directory/java/bin/java Or, if you have set the JREHOME environment variable, issue this command: vproc $JREHOME/..
Contents | Index | Glossary | Prev | Next Implementation Specifics This section explains these subjects regarding HP implementations of NonStop Server for Java, based on Java 2 Platform, Standard Edition, SDK 1.4.
Additional Files In addition to the standard Java packages, the NonStop Server for Java 4 provides these files: jtatmf.jar File containing classes for the version of the NonStop Java Transaction Agent that uses TMF javachk The Java Checker program, which determines whether a problem with the Java VM is caused by an incorrect TCP/IP configuration BaseLibList File used to create JavaLibList, which you can use at run time to determine whether an UnsatisfiedLinkError will be thrown during a call to System.
Maximum Concurrent Transactions. ● When calling a C or C++ routine, where the function passes or returns and parameters of type float or double, NonStop Server for Java 4 performs no conversion. All float and double values remain in IEEE floating-point format when crossing the JNI boundary. For more information, see IEEE Floating-Point Implementation.
6. Relink the Java virtual machine (Java VM) by using the /usr/tandem/install/Makefile. For more information about the Makefile, see the /usr/tandem/install/README file. The javahjni demo shows an example of how to create a library file and link it in with a java executable. It also shows using IEEE floating point. The remainder of this subsection explains how to use sockets. Sockets Use only the NonStop Server for Java 4 socket implementation in java.net (the standard Java socket).
not been linked into the Java VM, instead of catching the error when the native method is called: 1. Execute java and set the compaq.liblist system property to refer to the JavaLibList file generated during the make operation. For example: java -Dcompaq.liblist=\ /usr/tandem/java/bin/JavaLibList class-name 2. When make is invoked to link native libraries into the java executable the, Makefile creates a special file called JavaLibList in the same directory as the java executable.
POSIX Threads NonStop Server for Java 4 uses Standard POSIX Threads (product number T1248), which conforms to IEEE POSIX Standard 1003.lc. NonStop Server for Java 4 does not use the POSIX threads SRL; instead, NonStop Server for Java 4 contains its own version of POSIX threads. The header files for this version of POSIX threads can be found in the directory: [install-dir]/java/include/oss where install-dir is the NonStop Server for Java 4 installation directory.
Floating-Point Representation Minimum Positive Decimal Value Maximum Decimal Value TNS 1.7272337110188889e-77 1.15792089237316192e77 IEEE 4.94065645841246544e-324 1.79769313486231570e+308 How to Call TNS Floating-Point Functions from JNI Code This topic describes how to call a TNS floating-point function from an IEEE floating-point function.
Java Print Service (JPS) The Java Print Service is implemented into NonStop Server for Java 4. The Java Print Service allows you to print on printers directly to NonStop systems and to network printers attached to local a area network (LAN) or wide area network (WAN). For information on configuring network printers, see the Spooler FASTP Network Print Processes Manual. For information on the Spooler subsystem, see the Spooler Utilities Reference Manual.
Debugging Java Programs This subsection discusses the debugger architecture and how to run the programs involved in debugging Java applications. The topics are: ● Debugging Overview ● Transports ● java Command-Line Options to Run a Debuggee ● Starting the Java Debugger (jdb) Tool ● Debugging JNI Code ● Debugging Java and JNI Code Debugging Overview NonStop Server for Java 4 supports Java Platform Debugger Architecture (JPDA) that provides debugging support for the Java platform.
For more details, see the Sun Microsystems Java Platform Debugger Architecture Documentation (http://java.sun.com/products/jpda/doc/). JDI specification does not provide in-process debugging. Hence, a Java based tool called a debugger is used to debug another Java VM running the Java application. This Java VM, called the debuggee, also contains the back-end of the debugger that is responsible to accept the request from the front-end of the debugger and to respond to these requests.
Transports A JPDA transport is a form of inter-process communication used by a debugger application and the debuggee. NonStop Server for Java 4 provides a socket transport that uses the standard TCP/IP sockets to communicate between debugger and the debuggee. NonStop Server for Java 4 defaults to socket transport. NonStop Server for Java 4 does not support shared memory transport.
● If you are using JDB on a different NonStop Kernel system from where the debuggee runs, use jdb -attach host-name:portnum ● If you are using JDB from Microsoft Windows or any other platform, use jdb -connect com.sun.jdi.SocketAttach:hostname=hostname,port=portnum Further Information If you are using a GUI debugger, refer to the vendors' documentation to configure the debugger to communicate with the debuggee.
Deviations in Java VM Specification Options The compiler specification options for both the java and jdb tools deviate from standard Java because NonStop Server for Java 4 implements only the HotSpot server VM and does not implement a client VM. Accordingly, the options that specify running the client VM are not valid. java: Java Application Launcher Command-Line Option Deviations -client Selects the Java HotSpot Client virtual machine (VM).
Garbage Collection (GC) This topic discusses implementation-specific information about garbage collection for NonStop Server for Java 4.
Managing Generation Size Several java command options allow you to manage the initial size and maximum size of the combined young and tenured generations. -Xms Sets the initial size for the combined young and tenured generation. The default initial size is 3058 kilobyte (K). -Xmx Sets the maximum size for the combined young and tenured generation. The default maximum size is 64 megabytes (MB). -XX:MaxPermSize Sets the maximum size for the permanent generation. The default value for MaxPermSize is 32 MB.
NonStop system. A summary of garbage collector implementations appears in the table below. Paragraphs that follow discuss various implementations to help you understand performance issues.
collection technique does not perform well as the default collector when the phases of the collection cannot run concurrently with the application thread. This garbage collector, therefore, is disabled in NonStop Server for Java 4. The following java command options that specify a concurrent low-pause collector are not valid for NonStop Server for Java 4: -XX:+UseConcMarkSweepGC Specifies using the concurrent mark-sweep garbage collector.
Contents | Index | Glossary | Prev | Next JDBC Trace Facility The JDBC trace facility is designed to trace the entry point of all the JDBC methods called from the Java applications. To make this facility generic, it is implemented as wrapper JDBC driver; it can therefore be used with the JDBC Driver for SQL/MP (JDBC/MP), the JDBC Driver for NonStop SQL/MX (JDBC/MX), or the HP NonStop JDBC Server (a Type 3 JDBC driver).
jdbc:sqlmp: JDBC/MP driver jdbc:sqlmptx: JDBC/MP driver jdbc:sqlmx: JDBC/MX driver t3jdbc:sqlrmi: Type 3 JDBC Driver Java applications should turn on tracing using the DriverManager.setLogWriter method, for example by using the following JDBC API call in your application: DriverManager.setLogWriter(new PrintWriter(new FileWriter("FileName"))); Tracing Using the DataSource Implementation This is preferred way to establish a JDBC connection and to enable the JDBC trace facility.
Tracing Using the java Command This method applies only to JDBC Driver for SQL/MX. Enable tracing by specifying the tracing system property by using the following arguments when starting your Java program: java -DtraceFile=logFile -DtraceFlag=n The logFile is the file name that is to contain the tracing information. The n value for the traceFlag can be the following values: Value for n Description 0 No tracing. 1 Traces connection and statement pooling calls only.
Tracing by Loading the Trace Driver Within the Program Enable tracing by loading the JDBC trace driver within the program by using the Class.forName("com.tandem.jdbc.TDriver") method. This method also requires that you set the DriverManager.setLogWriter method. Tracing Using a Wrapper Data Source Enable tracing by creating a wrapper data source around the data source to be traced. The wrapper data source contains the TraceDataSource property that you can set to the data source to be traced.
JDBC Trace Facility Demonstration Programs The JDBC Driver for NonStop SQL products (JDBC/MX driver and JDBC/MP driver) provide demonstration programs in their installation directories. These programs are described in readme files in the directories. By default, the locations are: JDBC/MX driver /usr/tandem/jdbcMx/T1225V30/demo/jdbcTrace JDBC/MP driver /usr/tandem/jdbcMp/T1227V30/demo/jdbcTrace These programs demonstrate tracing by creating a wrapper around the driver-specific data source to be traced.
Contents | Index | Glossary | Prev | Next Transactions The NonStop Server for Java 4 lets you work with transactions in several ways. You can: ● Use the Current class methods to define transactions across transaction services, such as transactions that include JDBC calls. ● Use the Java Transaction API (JTA).
Current Class Methods The Current class is based on version 0.5 of the Java Transaction Services (JTS) specification. The following table describes the Current class methods. Method Description begin Starts a new transaction and associates it with the calling thread. commit Commits the transaction associated with the calling thread. get_control Gets a Control object representing the transaction associated with the calling thread.
// start a new transaction in the current thread tx.begin(); // ... access Pathway server // commit current transaction (JDBC and Pathway) tx.commit(true); For more information on the Current class, see the com.tandem.tmf.Current documentation. Java Transaction API (JTA) NonStop Server for Java 4 supports transactions by means of the NonStop Server for Java Transaction API, which is an implementation of the Sun Microsystems JTA Version 1.0.
javax.transaction Interfaces The Sun Microsystems JTA package, javax.transaction, defines the following interfaces: ● Status ● Synchronization ● Transaction ● TransactionManager ● UserTransaction NonStop Server for Java Transaction API supports all of the preceding interfaces, but only UserTransaction is available to client programs. UserTransaction allows the client to control transaction boundaries programmatically.
NonStop Server for Java Transaction API-TMF by Default The following code gets a reference to UserTransaction based on TMF (by default). It then starts and ends a transaction. import javax.transaction.UserTransaction; import com.tandem.jta.JTAFactory; // Get a reference to UserTransaction based on TMF (by default). UserTransaction utx = JTAFactory.getUserTransaction(); // Start transaction utx.begin(); // Do work ... // Commit transaction utx.
import javax.transaction.UserTransaction; import com.tandem.jta.JTAFactory; // Get a reference to UserTransaction based on JTS. UserTransaction utx = JTAFactory.getUserTransaction(JTAFactory.JTS); // Start transaction utx.begin(); // Do work ... // Commit transaction utx.commit(); Note: NonStop Server for Java Transaction API-TMF is intended for applications other than CORBA applications. NonStop Server for Java Transaction API-JTA is intended for CORBA applications.
Contents | Index | Glossary | Prev | Next Application Profiling With a profiling tool, you can get information about your Java program's CPU usage, heap allocation, and threads. Using this information, you can tune an application. The tools supported by NonStop Server for Java 4 include: ● Java Virtual Machine Profiler Interface (JVMPI) provides a profiler interface that tool vendors can use to develop GUI tools for profiling Java programs.
Using the HPROF Profiler Agent You can use the HPROF Profiler Agent for profiling your application. In the NonStop Kernel Open System Services (OSS) environment, HPROF is statically linked. HPROF writes out profiling information either to a file or to a socket in ASCII or binary format. By using HPROF, you can get information about your application's CPU usage, heap allocation, and threads.
Running the HPROF Java Profiler To run the HPROF Java profiler, use the -Xrunhprof option on the java command. The format is: java -Xrunhprof:[help]|[option=value, ...] Use the following java command to get a listing of HPROF help, which displays option-value pairs you can use with NonStop Server for Java 4.
Example 2: cpu=times CPU TIME (ms) BEGIN (total rank self accum count 1 6.89% 6.89% 22920 2 3.14% 10.03% 2638848 3 1.70% 11.74% 2639051 ........ CPU TIMES END = 2801506) Mon Jan 7 10:41:41 2002 trace method 6668 WorkClass.doSomeThing 10198 java/util/HashMap.access$2 16945 java/lang/String.equals Example 3 (heap=sites) SITES BEGIN (ordered by live bytes) Wed DEC 19 11:26:18 2001 percent live alloc'ed stack class rank self accum bytes objs bytes objs trace name 1 34.27% 34.
toexit=full-method-name Specifies to stop and generate a dump when this method exits. Example The following command shows using the fexit, upto, and only special options. java -Xrunhprof:fexit=Test1.init,upto=Queue.cleanup,only=MyThread Test1 For more information, see the HPROF Profiler Agent described under Java Virtual Machine Profiler Interface Machine Profiler Interface (JVMPI) (http://java.sun.com/j2se/1.4.1/docs/guide/jvmpi/jvmpi.html).
● To determine whether the program uses a complex multithreaded scheme, use the monitor option monitor=y An empty result list is good. Using HPjmeter You can use the HPjmeter for profiling your application. On the NonStop server platform, HPjmeter allows you to view profiler data graphically. You can obtain HPjmeter without charge from HP. To use HPjmeter, the dump file must be an ASCII text file and must be produced by NonStop Server for Java 4 after a normal termination or exception termination.
Contents | Index | Prev | Next Glossary ABCDEFGHIJKLMNOPQRSTUVWXYZ A abstract class In Java, a class designed only as a parent from which subclasses can be derived, which is not itself suitable for instantiation. An abstract class is often used to "abstract out" incomplete sets of features, which can then be shared by a group of sibling subclasses that add different variations of the missing pieces. Abstract Window Toolkit (AWT) The package that implements graphical user interfaces for Java.
A set of functions or procedures that are called by an application program to communicate with other software components. ASCII See American Standard Code for Information Interchange (ASCII). AWT See Abstract Window Toolkit (AWT). B BDK See JavaBeans Development Kit (BDK). branded A Java virtual machine that Sun Microsystems, Inc. has certified as conformant. browser A program that allows you to read hypertext.
You can set the class path explicitly or with the CLASSPATH environment variable. client A software process, hardware device, or combination of the two that requests services from a server. Often, the client is a process residing on a programmable workstation and is the part of a program that provides the user interface. The workstation client might also perform other portions of the program logic. Also called a requester.
D Data Control Language (DCL) The set of data control statements within the SQL/MP language. Data Definition Language (DDL) A language that defines all attributes and properties of a database, especially record layouts, field definitions, key fields, field locations, file locations, and storage strategy. DCL See Data Control Language (DCL). DDL See Data Definition Language (DDL). debuggee A process being debugged.
E Enscribe HP database management software that provides a record-at-a-time interface between servers and a database. As an integral part of the operating system distributed across two or more processors, Enscribe helps ensure data integrity if a processor module, I/O channel, or disk drive fails. Files on a NonStop system can be Enscribe files, SQL/MP tables, or SQL/MX tables. Enscribe files can be either structured or unstructured.
as their API. Interactive users of the Guardian environment use the TACL or another HP product's command interpreter. Compare to OSS. GUI See graphical user interface (GUI). H Hotspot virtual machine See Java Hotspot virtual machine. HP JDBC Driver for SQL/MP (JDBC/MP) The product that provides access to SQL/MP and conforms to the JDBC API. HP JDBC Driver for SQL/MX (JDBC/MX) The product that provides access to SQL/MX and conforms to the JDBC API.
HP NonStop Technical Library The browser-based interface to NonStop computing technical information. NonStop Technical Library replaces HP Total Information Manager (TIM). HP NonStop Transaction Management Facility (TMF) An HP product that provides transaction protection, database consistency, and database recovery. The NonStop Server for Java's NonStop SQL/MP drivers call procedures in the TMF subsystem.
Institute for Electrical and Electronic Engineers (IEEE). inlining Replacing a method call with the code for the called method, eliminating the call. interactive Question-and-answer exchange between a user and a computer system. interface In general, the point of communication or interconnection between one person, program, or device and another, or a set of rules for that interaction. See also API. International Electrotechnical Commission (IEC) A standardization body at the same level as ISO.
Invocation API is a subset of the JNI. Internet Protocol version 6 (IPv6) IP specifies the format of packets and the addressing scheme. The current version of IP is IPv4. IPv6 is a new version of IP designed to allow the Internet to grow steadily, both in terms of number of hosts connected and the total amount of data traffic transmitted. (IP is pronounced eye-pea.) IPv6 See Internet Protocol version 6 (IPv6). ISO See International Organization for Standardization (ISO).
Java Database Connectivity (JDBC) An industry standard for database-independent connectivity between the Java platform and relational databases such as SQL/MP or SQL/MX. JDBC provides a call-level API for SQL-based database access. Java HotSpot virtual machine The Java virtual machine implementation designed to produce maximum program-execution speed for applications running in a server environment.
A platform-neutral component architecture supported by Java, intended for developing or assembling software for multiple hardware and operating system environments. For more information, see the Sun Microsystems JavaBeans document (http://java.sun.com/j2se/1.4.1/docs/guide/beans/index.html). JavaBeans Development Kit (BDK) A set of tools for creating JavaBeans that is included with the NonStop Server for Java 4. javac The Java compiler, which compiles Java source code into bytecode.
JNI See Java Native Interface (JNI). jre The Java run-time environment, which executes Java bytecode. Also, the command to run the Java run-time environment. JTA See Java Transaction API (JTA). JTS See Java Transaction Service (JTS). jts.Current A JTS interface that lets you define transaction boundaries. The NonStop Server for Java 4 includes an implementation of jts.Current. K key One of the following: ❍ A value used to identify a record in a database, derived by applying a fixed function to the record.
M macro A sequence of commands that can contain dummy arguments. When the macro runs, actual parameters are substituted for the dummy arguments. N native In the context of Java programming, something written in a language other than Java (such as C or C++) for a specific platform. native method A non-Java routine (written in a language such as C or C++) that is called by a Java class.
O Object Management Group (OMG) The standards body that defined CORBA. Object Serialization A Sun Microsystems procedure that extends the core Java Input/Output classes with support for objects by supporting the following: ❍ The encoding of objects, and the objects reachable from them, into a stream of bytes ❍ The complementary reconstruction of the object graph from the stream Object Serialization is used for lightweight persistence and for communication by means of sockets or RMI.
See Open System Services (OSS). OTS See Object Transaction Service (OTS). P package A collection of related classes; for example, JDBC. Pathsend API The application program interface to a Pathway system that enables a Pathsend process to communicate with a server process. Pathsend process A client (requester) process that uses the Pathsend interface to communicate with a server process.
A family of interrelated interface standards defined by ANSI and IEEE. Each POSIX interface is separately defined in a numbered ANSI/IEEE standard or draft standard. The standards deal with issues of portability, interoperability, and uniformity of user interfaces. POSIX See Portable Operating System Interface X (POSIX). private key An encryption key that is not known to all parties. protocol A set of formal rules for transmitting data, especially across a network.
See client. RISC See reduced instruction set computing (RISC). RMI See Remote Method Invocation (RMI). rmic The Java RMI stub compiler, which generates stubs and skeletons for remote objects. rmicregistry The Java Remote Object Registry, which starts a remote object registry on the specified port on the current host.
system servers provide transaction processing, database access, and other services. ❍ A process or program that provides services to a client. Servers are designed to receive request messages from clients; perform the desired operations, such as database inquiries or updates, security verifications, numerical calculations, or data routing to other computer systems; and return reply messages to the clients. servlet A server-side Java program that any World Wide Web browser can access.
published an API standard. Some of the Standard Extensions might migrate into the Core Packages. Examples of standard extensions are servlets and JTS. stored procedure A procedure registered with SQL/MX and invoked by SQL/MX during execution of a CALL statement. Stored procedures are especially important for client/server database systems because storing the procedure on the server side means that it is available to all clients.
See HP NonStop Transaction Management Facility (TMF) Total Information Manager (TIM) An HP product that provides powerful, integrated access to product and support information within document collections on local CD-ROM discs and online through Internet-accessible servers. TIM integrates technologies from Verity (search engine), Netscape (Navigator HTML browser), Microsoft (Internet Explorer HTML browser), and Adobe (Acrobat Exchange PDF viewer). Formerly called Tandem Information Manager.
V virtual machine (VM) A self-contained operating environment that behaves as if it is a separate computer. See also Java virtual machine and Java Hotspot virtual machine. VM See virtual machine (VM). W World Wide Web (WWW) An Internet client-server hypertext distributed information retrieval system that originated from the CERN High-Energy Physics laboratories in Geneva, Switzerland. On the WWW everything (documents, menus, indexes) is represented to the user as a hypertext object in HTML format.
Contents | Index | Glossary | Prev | Next List of Examples Section Title Example Title(s) Installation and Configuration Transactions Profiling Applications ● Examples of Usint the Customer Makefile ● Verifying the NonStop Server for Java 4 Installation ● NonStop Server for Java Transaction API-TMF by Default ● NonStop Server for Java Transaction API-TMF by Request ● NonStop Server for Java Transaction API-JTS ● HPROF Output File Example 1: CPU=samples ● HPROF Output File Example 2: CPU=t
Contents | Index | Glossary | Prev | Next List of Figures Section Title Implementation Specifics Application Profiling Figure Title(s) ● The Java Platform Debugger Architecture Structure ● Layout for Generations ● Profiling Environment NonStop Server for Java Programmer's Reference (526238-001) © 2003 Hewlett-Packard Development Company L.P. All rights reserved.
Contents | Index | Glossary | Prev | Next List of Tables Section Title Table Title(s) About This Manual ● Document Organization Changes ● Document Sections Introduction to the NonStop Server for Java ● Headless Support for Visual Feature Packages Installation and Configuration ● Subdirectories of the /usr/tandem/java Directory ● Demonstration Programs ● Floating-Point Ranges ● Double-Precision Ranges ● Summary of Garbage Collector Implementations ● JDBC Driver Selection ● DataSource
Java Docs Home Page | Contents | Glossary | Prev Index ABCDEFGHIJKLMNOPQRSTUVWXYZ A Abbreviations used in this document Abstract Window Toolkit (AWT) Additional files in NonStop Server for Java 4 Audience for this document AWT classes headless support for migrating B Beans See JavaBeans Binding libraries into the Java VM C C/C++ methods, calling from Java C++ compiler options CLASSPATH environment variable Compiling, SQL/MP Compiler C++ Java HotSpot Compliance See also Deviations Concurrent low-pause co
Conventions, notation Current class methods D Data conversion for double-precision values for floating-point values IEEE floating-point representation and DataSource implementation, enabling tracing Databases, accessing Directory, NonStop Server for Java contents of structure of Debugging java command-line options to run the debuggee Java and JNI code JNI code overview starting the Java Debugger (jdb) tool transports Demonstration programs of JDBC trace facility of NonStop Server for Java 4 Deviations Java
F Features of J2SE SDK 1.4.
changes in verifying Installing NonStop Server for Java IPv6 support J JAR file locations Java 2 Platform, Standard Edition (J2SE), SDK Java Abstract Window Toolkit (AWT) Java Checker (javachk) java command-line options deviations enabling tracing running a debuggee Java Database Connectivity Java Debugger (jdb) tool starting jdb jdb, command-line option deviations Java Development Kit (JDK) See Features of J2SE SDK 1.4.
JDBC trace facility demonstration programs output format tracing by loading the trace driver within the program tracing using a wrapper data source tracing using the DataSource implementation tracing using the DriverManager class tracing using the java command tracing using the system.setProperty method JDK (Java Development Kit) See Features of J2SE SDK 1.4.
POSIX threads Multithreaded routines N NonStop Java Transaction API NonStop Server for Java Directory contents of structure of NonStop Server for Java document set NonStop SQL databases, accessing NonStop Technical Library Notation conventions P Parallel collector PATH environment variable Print service Profiling using HPjmeter using the HPROF profiler agent POSIX threads implementation migrating use with multithreaded native C or C++ routines Pthreads See POSIX threads R Related reading NonStop Server f
See Execution S Sockets C or C++ methods Java Checker (javachk) RMI TCP/IP configuration SQL databases, accessing Structure of NonStop Server for Java directory of this document Swap files Symbolic link T TCP/IP, configuration for RMI Total Information Manager (TIM) See NonStop Technical Library TMF (Transaction Management Facility) and JTA transaction jacket routines TNS floating point range in value calling functions Tools, Java, executing Tracing See JDBC trace facility Transaction Management Facility
JAVA_PTHREAD_MAX_TRANSACTION environment variable Verifying installation Virtual Machine See Java virtual machine (Java VM) W Wrappers NonStop Server for Java 4 installation data source for tracing ABCDEFGHIJKLMNOPQRSTUVWXYZ Java Docs Home Page | Contents | Glossary | Prev NonStop Server for Java Programmer's Reference (526238-001) © 2003 Hewlett-Packard Development Company L.P. All rights reserved.