With the additional classes provided by IBM® i, Java™ programs running on the Java virtual machine for IBM i experience improved performance. Performance is improved in some cases because less communication function is used, and in other cases, an 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 IBM i 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 IBM i server, you can use the JDBC driver for IBM i 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 IBM i 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 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 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 system:
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.