Java/JDBC beginner question
Posted in 2000
Topics: Installation, Setup & Upgrades, Connectivity: ODBC / JDBC / .NET, Platform-Specific Issues, Java & JDBC Development
Hi - I need some initial help after failing to find any hints in the IDS.2000 documentation. We have IDS.2000 up and running on HP-UX 11.0. To start a new project, we need to access this engine with a Java application (JBuilder 4) using JDBC. Question: Do I have to install addiational software on the HP-UX system? Or on the Windows-System? Sorry, this might be a FAQ ... Jens
Informix has a JDBC driver (type 4: pure Java) that is available for free. Getting this will allow you to avoid using ODBC if you choose (JDBC is faster without going through the ODBC layer). Since you are using a Java application (rather than an applet) you can place a copy of the Informix JDBC .jar file on the local machine. A better choice, is to use a network drive for all the .jar files your project uses, and point the client command line invocation of the JVM to that networked drive. The most sophisticated approach is to store your classes in the database itself and write your own class loader to download the classes from the database. Since the Informix JDBC driver uses the native wire protocol called for by the Informix engine, there should be nothing you need load on the HP boxes to communicate to the engine from a Java application. Jens Ebert <j.ebert@hhpv.de> wrote in article <3a2e53f8.25764497@proxy>... > Hi - I need some initial help after failing to find any hints in the > IDS.2000 documentation. > > We have IDS.2000 up and running on HP-UX 11.0. > > To start a new project, we need to access this engine with a Java > application (JBuilder 4) using JDBC. > > Question: Do I have to install addiational software on the HP-UX > system? Or on the Windows-System? > > Sorry, this might be a FAQ ... > > Jens >
Thank you, this helps a lot! Is there anything more you could tell me about the approach to store the classes in the database itself? Do I need the Foundation.2000 for this or is IDS.2000 possible too? Jens On Wed, 06 Dec 2000 19:49:49 -0000, charles.johnson@news.accessllc.net wrote: >Informix has a JDBC driver (type 4: pure Java) that is available for free. >Getting this will allow you to avoid using ODBC if you choose (JDBC is >faster without going through the ODBC layer). Since you are using a Java >application (rather than an applet) you can place a copy of the Informix >JDBC .jar file on the local machine. A better choice, is to use a network >drive for all the .jar files your project uses, and point the client >command line invocation of the JVM to that networked drive. > >The most sophisticated approach is to store your classes in the database >itself and write your own class loader to download the classes from the >database. > >Since the Informix JDBC driver uses the native wire protocol called for by >the Informix engine, there should be nothing you need load on the HP boxes >to communicate to the engine from a Java application. > >Jens Ebert <j.ebert@hhpv.de> wrote in article <3a2e53f8.25764497@proxy>... >> Hi - I need some initial help after failing to find any hints in the >> IDS.2000 documentation. >> >> We have IDS.2000 up and running on HP-UX 11.0. >> >> To start a new project, we need to access this engine with a Java >> application (JBuilder 4) using JDBC. >> >> Question: Do I have to install addiational software on the HP-UX >> system? Or on the Windows-System? >> >> Sorry, this might be a FAQ ... >> >> Jens >>
Writing a custom class loader to retrieve classes from a database is not for the faint of heart, though it is pretty straightforward. There are any number of books that show how to write a custom loader, and you will discover that most of your issues are related to what happens when a networked connection dies while a class is being loaded. Converting a blob, i.e., a byte array, to a class turns out to be straightforward, too. We use 7.3.x of the Informix engine to do this stuff. We are upgrading this month to Informix 2000 (9.2.x, I think), and 4.3.3 of AIX. I don't know if 2000 has special facilities for class loading or not. My personal suggestion, for what it is worth, is to delay such approaches until you have a completely working application. Then at that point add the class loader trickery. The real reason to do this at all is to keep all the code in a single location, and to allow dynamic re-loading of newer versions of your classes. If your applications will be using a single networked drive, or if all the client boxes are close in physical proximity to each other, then there is much less need for this sort of "foolishness." If, for example, the client boxes are in a single room or building, you just walk to each box and load the new jar file. If they use a single drive you need load the jar file in a single location. Simplicity rules! HTH Cheers-- Charles Jens Ebert <j.ebert@hhpv.de> wrote in article <3a2f42c3.1143476@proxy>... > Thank you, this helps a lot! Is there anything more you could tell me > about the approach to store the classes in the database itself? Do I > need the Foundation.2000 for this or is IDS.2000 possible too? > > Jens > > On Wed, 06 Dec 2000 19:49:49 -0000, charles.johnson@news.accessllc.net > wrote: > > >Informix has a JDBC driver (type 4: pure Java) that is available for free. > >Getting this will allow you to avoid using ODBC if you choose (JDBC is > >faster without going through the ODBC layer). Since you are using a Java > >application (rather than an applet) you can place a copy of the Informix > >JDBC .jar file on the local machine. A better choice, is to use a network > >drive for all the .jar files your project uses, and point the client > >command line invocation of the JVM to that networked drive. > > > >The most sophisticated approach is to store your classes in the database > >itself and write your own class loader to download the classes from the > >database. > > > >Since the Informix JDBC driver uses the native wire protocol called for by > >the Informix engine, there should be nothing you need load on the HP boxes > >to communicate to the engine from a Java application. > > > >Jens Ebert <j.ebert@hhpv.de> wrote in article <3a2e53f8.25764497@proxy>... > >> Hi - I need some initial help after failing to find any hints in the > >> IDS.2000 documentation. > >> > >> We have IDS.2000 up and running on HP-UX 11.0. > >> > >> To start a new project, we need to access this engine with a Java > >> application (JBuilder 4) using JDBC. > >> > >> Question: Do I have to install addiational software on the HP-UX > >> system? Or on the Windows-System? > >> > >> Sorry, this might be a FAQ ... > >> > >> Jens > >> > >