System overview: xfNetLink Java
xfNetLink Java is a Java client for xfServerPlus that works in conjunction with the Java programming language. Java is an interpreted language and is supported on a wide variety of platforms, including Windows, Unix, and OpenVMS. Using xfNetLink Java, Synergy business logic can be accessed from any Java-capable environment, including Java applications, JavaServer Pages, and Java applets in web pages. (We discuss two of these options below.) Together, xfNetLink Java and xfServerPlus handle the creation of a connection between the client machine and your Synergy machine, as well as the translation of data from Java to Synergy and back to Java.
- Java application: Using a Java application, you can create a two-tiered solution that consists of a Java application running on the client and accessing Synergy logic on a remote Synergy server. The Java runtime must be deployed on the client.
- JSP: JavaServer Pages are a combination of HTML and programming code written in JavaScript and Java. When a user’s browser requests a JSP page, the web server executes the embedded program and returns a pure HTML page to the browser. Using JSP provides you with a three-tier distributed system, which includes an end-user machine running a web browser, a web server where xfNetLink and your JSP pages are located, and a Synergy server. JSP works with many Windows and Unix web servers. A servlet container for the web server is required.
The xfNetLink Java tools enable you to create a Java JAR file that references your Synergy methods in the SMC. If you’re developing on Windows, you can create a JAR file from within Workbench. The JAR file presents a familiar interface for Java developers and can be used in a Java application, JSP application, or any other Java environment.
Figure 1 shows the primary components of a distributed application that accesses Synergy code from a Java client. This diagram describes two machines:
- A client machine running xfNetLink Java, the Java Runtime Environment (JRE), and an application that uses a JAR file built from Synergy methods. On a two-tier system with a Java client application, the client is the end-user’s machine. On a three-tier system with a web client application using JavaServer Pages, the client is the web server machine, which is the also the location of the HTML and JSP pages and the JSP/servlet container.
- A Synergy server running xfServerPlus, which handles the remote execution of Synergy routines. The routines are made available for remote execution by including them in an ELB or shared image and defining them in the Synergy Method Catalog (SMC), also located on the server machine. You can populate the SMC with routine information by entering it manually through the Method Definition Utility or by attributing your code, running dbl2xml to create an XML file, and then loading that file into the SMC. You may use multiple servers; each machine requires an xfServerPlus license.
xfNetLink Java enables you to use your existing Synergy code without rewriting it, provided that the code is already written in the form of an external subroutine or function. If the routine requires input from or sends messages to the user, or if it might generate untrapped errors, it must be adjusted to work as server-level logic.
|