With the additional classes provided by i5/OS™, Java™ programs running on the Java virtual machine for iSeries™ experience improved performance. Performance is improved in some cases because less communication function is used, and in other cases, an iSeries API is used instead of calling the server program.
In order to download the minimum number of IBM® Toolbox for Java class files, use the proxy server in combination with the AS400ToolboxJarMaker tool.
For all IBM Toolbox for Java functions except JDBC and integrated file system access, Java programs running on the Java virtual machine for iSeries will run faster. The programs run faster because less communication code is used when communicating between the Java program and the server program on the server that does the request.
JDBC and integrated file system access were not optimized because facilities already exist that make these functions run faster. When running on the iSeries, you can use the JDBC driver for iSeries instead of the JDBC driver that comes with the IBM Toolbox for Java. To access files on the server, you can use java.io instead of the integrated file system access classes that come with the IBM Toolbox for Java.
Performance of the following classes of the IBM Toolbox for Java is improved because these classes directly call i5/OS APIs instead of calling a server program to carry out the request:
APIs are directly called only if the user ID and password match the user ID and password of the job running the Java program. To get the performance improvement, the user ID and password must match the user ID and password of the job that starts the Java program. For best results, use "localhost" for system name, "*current" for user ID, and "*current" for password.
The port mapping system has been changed, which makes accessing a port faster. Before this change, a request for a port would be sent to the port mapper. From there, the iSeries server would determine which port was available and return that port to the user to be accepted. Now, you can either tell the server which port to use or specify that the default ports be used. This option eliminates the wasted time of the server determining the port for you. Use the WRKSRVTBLE command to view or change the list of ports for the server.
For the port mapping improvement, a few methods have been added to AS400 class:
Language-specific string files are now shipped within the IBM Toolbox for Java program as class files instead of property files. The iSeries server finds messages in class files faster than in property files. ResourceBundle.getString() now runs faster because the files are stored in the first place that the computer searches. Another advantage of changing to class files is that the server can find the translated version of a string faster.
Two classes allow faster, more efficient conversion between Java and the iSeries:
Also, the IBM Toolbox for Java now incorporates its own conversion tables for over 100 commonly used CCSIDs. Previously, the IBM Toolbox for Java either deferred to Java for nearly all text conversion. If Java did not possess the correct conversion table, IBM Toolbox for Java downloaded the conversion table from the server.
The IBM Toolbox for Java performs all text conversion for any CCSID of which it is aware. When it encounters an unknown CCSID, it attempts to let Java handle the conversion. At no point does the IBM Toolbox for Java attempt to download a conversion table from the server. This technique greatly reduces the amount of time it takes for an IBM Toolbox for Java application to perform text conversion. No action is required by the user to take advantage of this new text conversion; the performance gains all occur in the underlying converter tables.
If your Java application runs on the iSeries Java virtual machine (JVM), you can significantly improve performance if you create a Java program from an IBM Toolbox for Java .zip file or .jar file. Enter the CRTJVAPGM command on an iSeries command line to create the program. (See the online help information for the CRTJVAPGM command for more information.) By using the CRTJVAPGM command, you save the Java program that is created (and that contains the IBM Toolbox for Java classes) when your Java application starts. Saving the Java program that is created allows you to save startup processing time. You save startup processing time because the Java program on the server does not have to be re-created each time your Java application is started.
If you are using the V4R2 or V4R3 version of IBM Toolbox for Java, you cannot run the CRTJVAPGM command against the jt400.zip or jt400.jar file because it is too big; however, you may be able to run it against the jt400Access.zip file. At V4R3, IBM Toolbox for Java licensed program includes an additional file, jt400Access.zip. jt400Access.zip contains only the access classes, not the visual classes.
When you run Java applications on a V4R5 (or earlier) system, use jt400Access.zip. When you run Java applications on a V5R1 system, use jt400Native.jar. The CRTJVAPGM command has already been run against jt400Native.jar.