System overview: xfNetLink Java
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.
1. Accessing Synergy from Java.