NonStop Server for Java 5.1 Programmer's Reference
Additional Environment Variable
NonStop Server for Java 5.1 has an implementation-specific environment variable that you can use to control the
runtime environment. The JAVA_PTHREAD_MAX_TRANSACTIONS environment variable specifies the
maximum number of TMF transactions allowed per process. The default number allowed is 1000. For detailed
information, see Controlling Maximum Concurrent Transactions.
Java Native Interface (JNI)
The Sun Microsystems Java Native Interface (JNI) standard defines both the C-language APIs that enable Java
methods to call C and C++ methods and the way that C and C++ methods can start and interact with a Java virtual
machine (JVM). The NonStop Server for Java 5.1 supports JNI and the Invocation API with the following
modifications:
Set the _RLD_LIB_PATH environment variable to point the location of the user DLLs.
export _RLD_LIB_PATH=dll-path[:dll_pathn]...
where: dll-path and dll-pathn are the directories where the user DLLs reside.
For example, if the user DLLs are in the directory /home/mydll
export _RLD_LIB_PATH=/home/mydll
●
Multithreaded native C or C++ routines must use the same Pthread library that the JVM uses, but HP
recommends that any multithreaded code be written in Java.
●
If native C or C++ routines must invoke Transaction Management Facility (TMF) calls, you must use TMF
transaction jacket routines as described in the Open System Services Programmer's Guide in the
"Application Programming With Standard POSIX Threads" section under the topic "TMF Transaction
Jacket Routines." The calls are:
SPT_ABORTTRANSACTION()
❍
SPT_BEGINTRANSACTION()❍
SPT_ENDTRANSACTION()❍
SPT_RESUMETRANSACTION()
Note: The Open System Services Programmer's Guide says that the maximum concurrent
transactions allowed in a process is 100; however, the JVM is an exception where the
maximum allowed is 1000 as described under Controlling Maximum Concurrent
Transactions.
❍
●
When calling a C or C++ routine, where the function passes or returns parameters of type float or
double, NonStop Server for Java 5.1 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.
●
When using the JNI_OnLoad function, use the following format:
JNI_OnLoad
●