NonStop Server for Java Programmer's Reference (NSJ 4.2+)
The POSIX threads calls in T1248 have changed to conform to the standard; therefore, any
native code for NonStop Server for Java 3.1.x applications that makes POSIX threads calls
might have to change to use the standard pthread routine. For more information, see
Appendix D in the Open System Services Porting Guide, which contains a list of differences
between the POSIX thread routines in T5819 and the routines in T1248.
Additionally, you must change any JNI code that made calls to routines beginning with cma… to
use the Wrapper or Development Toolkit routines (spt….) supplied with T1248.
NOTE: Any user-developed code that makes such POSIX threads calls must
change.
Directories of Binary Files Moved
If your NonStop Server for Java programs have references to bin/oss/posix_threads in
Pathway configuration files or elsewhere, you must change them to use the NonStop Server for
Java 4 installation bin directory.
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.
Compiling C++ Native Code with the
-Wversion3 Option
If the code is written in C++, user native code that is to be linked into the java executable must
be compiled using the -Wversion3 option. C++ has three C++ runtime libraries, one library
for each version: version 1, version 2, and version 3. These versions are incompatible with each
other. Version 1 of the NonStop Server for Java 4 uses C++ version 2. Version 2 of the
NonStop Server for Java 4 uses C++ version 3 (version 3 makes C++ more standard than
version 2).
The VERSION3 directive specifies the use of the Standard C++ Library ISO/IEC version 3 and
the C++ Standard headers. VERSION3 enforces the ISO/IEC IS 14882:1998 standard for C++.
The ISO C++ standard is identical to the ANSI C++ standard.
Whether your native code needs source-code changes depends on whether the code uses C++
features that have changed in version 3. To identify needed source-code changes, run a
migration check on your source code by invoking the version 2 compiler and using the pragma