You always have at least two ways to access an iSeries™ server resource when your Java™ program is running on the IBM® Developer Kit for Java (i5/OS™) Java virtual machine (JVM).
You can use either of the following interfaces:
When deciding which interface to use, consider the following factors:
If the program runs on both client and server (including an iSeries server as a client to a second iSeries server) and accesses only iSeries server resources, it may be best to use the IBM Toolbox for Java interfaces.
If the program must access data on many types of servers, it may be best to use Java native interfaces.
Writing to IBM Toolbox for Java interfaces makes your program less server portable, however.
If your program must run to an iSeries server as well as other servers, you may find it better to use the facilities that are built into Java.
You must decide whether it is more important to have better Java neutrality and write a program to access the resource, or to use the IBM Toolbox for Java interface, which is less portable.
You must decide whether portability is more important or whether you want to take advantage of the additional function.
This request may take more resource than a Java native interface that runs under the job of the Java program.
An example of this is Data Queue access. The Data Queue interfaces of the IBM Toolbox for Java licensed program provide easy access to the data queue resource.
Using the IBM Toolbox for Java also means your program works on both a client and server to access a data queue on an iSeries server. It also works when running on one iSeries server to access a data queue on another iSeries server.
The alternative is to write a separate program (in C, for example) that accesses the data queue. The Java program calls this program when it needs to access the data queue.
This method is more server-portable; you can have one Java program that handles data queue access and different versions of the program for each server you support.