NonStop Server for Java 7.0 Programmer's Reference

Figure 5 Creating a java.nio.SocketChannel
Application Start
Application obtains a Socket
channel by invoking
SocketChannel.open ()
Make the SocketChannel
exhibit NonStop IPC
instead of TCP
Enable TCP
SocketChannel operation
No
Yes
JI library checks
if there is a
client_socket entry in JI
mapping file for the
IP address and
port number?
JI library return JI’s
implementation of
java.nio.SocketChannel
Application invokes
SocketChannel.connect()
Selector
The Selector implementation provided by JI library can act as a multiplexer of not only TCP
channels, but also of NonStop IPC channels.
NOTE: The programmer does not have to contend with any new API or change in the way the
API is used. This functionality remains transparent to the programmers.
Enabling JI
JI comprises ji.jar and libji.so. The files are present in $JAVA_HOME/jre/lib and
$JAVA_HOME/jre/lib/oss folders.
If the environment variable JI_ENABLE is set to true, the JI functionality is enabled and the ji.jar
file is loaded by the bootclassloader. For example, > export JI_ENABLE=true code
helps you to enable JI at the OSS prompt.
By default, the JI functionality is disabled. Enabling JI does not make sockets or the channels ready
to use NonStop IPC for communication. The mapping file defines the enabling of socket or a
channel to use NonStop IPC.
Architecture 75