The goal of the multiple-tier, proxy scenario is to make the downloaded jar file as small as possible so that downloading this file from an applet takes less time. When you use the proxy classes, the entire AS/400 Toolbox for Java does not need to be installed on the client. To make the smallest jar file possible, use AS400JarMaker on the proxy jar file to choose only those components you need to make the jt400Proxy.jar file as small as possible. The chart below compares the size of the proxy jar files with the traditional jar files:
An additional benefit is that fewer ports have to be open through a firewall to do proxy support. With traditional AS/400 Toolbox for Java, multiple ports must be open. This is because command call uses a different port than JDBC, which uses a different port than print, and so on. Each of these ports must be allowed through the firewall. With proxy support, all the data flows through the same port. The default port is 3470. You can choose to call the setPort() method to change the port setting or use the -port option when starting the proxy server:
java com.ibm.as400.access.ProxyServer -port 1234
The jt400Proxy.jar ships with the rest of the traditional AS/400 Toolbox for Java and, like the rest of the AS/400 Toolbox for Java, the proxy classes are pure Java so they can run on any machine with a Java virtual machine. The proxy classes dispatch all method calls to a server application, or proxy server. The full AS/400 Toolbox for Java classes are on the proxy server. When a client uses a proxy class, the request is transferred to the proxy server which creates and administers the real AS/400 Toolbox for Java objects.
The following picture shows how the traditional and proxy client connect to the AS/400. The proxy server can be the AS/400 that the data resides on.
An application using proxy support will perform slower that the same application using traditional AS/400 Toolbox for Java classes. This is due to the extra communication needed to support the smaller proxy classes. Applications that make fewer method calls will see the least performance degradation."
If you want to work with both the proxy classes and classes not in jt400Proxy.jar, you can refer to jt400.jar instead of jt400Proxy.jar. jt400Proxy.jar is a subset of the jt400.jar and, therefore, all of the Proxy classes are contained in the jt400.jar file.
We have provided two specific examples for using a proxy server with the steps listed above. The first shows how to run a Java application using proxy support and the second shows how to run an applet using proxy support:
Other classes are not supported at this time by jt400Proxy.
Also, integrated file system permissions are not functional under
the proxy jar file. However, you can use the
JarMaker class to include these classes from the jt400.jar
file.
[ Information Center Home Page | Feedback ] | [ Legal | AS/400 Glossary ] |