Re: informix universal server java api
Posted in 1997
Topics: Performance & Tuning, Connectivity: ESQL/C, 4GL & Embedded SQL, Java & JDBC Development
In article <5rkujt$fi9$1@news.fas.harvard.edu>, Matthew Tepel <mtepel@hcs.harvard.edu> wrote: >The consensus seems to suggest that the best way to take advantage of >informix universal server's object-oriented features and extendablilty is >with the Informix Java API. Just to clarify, we've renamed this API. It's now the Informix Java Object Interface (JOI). "JavaAPI" was a really bad choice for a name. > >Now I have another question. Keep in mind that I am new to Java. We want >to write some java applets that people will launch from their web browser. >The web browser could be on any computer under any operating system. >However the applets need to connect to the database in order to view the >data we have. We are building an open and searchable database for >neuroscience data. > >When I ran an example java applet (with appletviewer) from the informix >java api programmer's guide, I was required to add something to my >LD_LIBRARY_PATH. The applet would not run unless it could find a >particular informix shared object library. Now, random users on random >computers will certainly not have this library. So can the applet still >work? Is the library (libIfmxLibmiNatives.so) only necessary on the >server side? > >Thanks. > >-MT JOI is actually a single API with two different implementations. The one you are apparently using is the "direct" API, which is built atop the Informix C API (libdmi and ESQL/C). That's why you need to add something to your LD_LIBRARY_PATH. If you need a Java-only solution (as in the case of applets), you'll want to use the "remoted" implementation of JOI. The remoted implementation uses RMI to communicate from the client to a dedicated middle tier running the direct implementation. Note that while the simple "1-for-1" mapping between the two implementations is useful, in some applications you'll be able to achieve better performance by performing all data access in the middle tier, and exposing higher-level remote interfaces to the client. Informix Data Director for Java 1.1 creates applets which can run against either the direct or remote implementations of the JOI API. The 2.0 version will add higher levels of abstraction specifically tuned for 3-tier application architectures. -- Eric -------------- Eric McDermid Principal Software Engineer, Java Development Tools Informix Software, Inc. (posting from a personal account)