TITLE
    WebObjects 4: JDBC Adaptor
Article ID:
Created:
Modified:
70108
9/29/99
11/3/99

TOPIC

    This document contains an unsupported database adaptor that allows WebObjects 4 users on Mac OS X Server and Windows NT to connect their WebObjects applications to JDBC databases. This package is not supported by Apple Computer and should be used at your own risk. The adaptor posted here is version 0.7; newer versions will be posted as they become available.


DISCUSSION

    About the JDBC Adaptor

    The JDBC Adaptor provided here was designed to allow WebObjects users to use JDBC data sources during application development. This adaptor is not a supported product of Apple Computer; use it at your own risk. This adaptor has not been optimized for performance; therefore, for performance reasons, Apple strongly discourages using this adaptor for application deployment.

    Before You Install

    Because of the immature nature of this release, it is important to keep Apple informed about your usage. It is strongly recommended that you send email to JDBCEOAdaptor@group.apple.com and include:

      • Your name, company name and contact information
      • Your WebObjects platform
      • Your database and JDBC driver vendor and version

    The JDBC EOAdaptor is a little complicated to install. The adaptor itself is only one piece, you will still need to install software from your database vendor, as well as some setting up a bundle to fix EOModeler's JVM initialization. Please read the installation instructions (both ours and your database vendors) in detail.

    Installing the JDBC Adaptor on Mac OS X Server

    1. Download version 0.7 of the Mac OS X Server version of the JDBC Adaptor from Apple's FTP servers.

    2. At a shell prompt, type:

    gnutar -xzf JDBCEOAdaptorOSX.tgz

    This will create a folder called "JDBCEOAdaptor.framework".

    3. Move this folder into /Local/Library/Frameworks

    4. Launch EOModeler. In the EOModeler preferences, add:

    /Local/Library/Frameworks/JDBCEOAdaptor.framework/Resources

    to your list of "EOModeler Bundle Search Paths". This will make sure that a helper bundle which turns off fast JVM loading is loaded into EOModeler during startup This is needed to get the JDBC login panel to work.

    NOTE: The JDBC-EOModelerFix.EOMbundle located in JDBCEOAdaptor.framework/Resources can also be used to fix ProjectBuilder so that the wizard's create new model will work. The trick here is that you might have a hard time with PB's bundle chooser since it wants to use bundles with '.bundle' extension and the fix is in a ".EOMbundle". In the worst case, you can either create your EOModels first using EOModeler and then run the wizard, or you can copy the bundle to the same name with a ".bundle" extension for PB.

    5. Quit EOModeler and launch it again.

    6. Go to the Workspace and bring up the console from the Tools menu. You should see a message telling you that "JDBCJVMFix" has initialized. If it has not, there is a problem with your installation.

    7. Quit EOModeler.

    Installing the JDBC Adaptor on Windows NT

    1. Download version 0.7 of the Windows NT version of the JDBC Adaptor from Apple's FTP servers.

    2. At a Bourne shell, type the following commands:

    gunzip JDBCEOAdaptorNT.tgz

    gnutar xf JDBCEOAdaptor.framework.NT.tar

    This will create a folder called "JDBCEOAdaptor.framework".

    3. Move this folder into ($NEXT_ROOT)/Local/Library/Frameworks

    4. Move the file:

    ($NEXT_ROOT)/Local/Library/Frameworks/JDBCEOAdaptor.framework/JDBCEOAdaptor.dll

    to:

    ($NEXT_ROOT)/Local/Library/Executables

    5. Launch EOModeler. In the EOModeler preferences, add:

    ($NEXT_ROOT)/Local/Library/Frameworks/JDBCEOAdaptor.framework/Resources

    to your list of "EOModeler Bundle Search Paths". This will make sure that a helper bundle which turns off fast JVM loading is loaded into EOModeler during startup This is needed to get the JDBC login panel to work.

    NOTE: The JDBC-EOModelerFix.EOMbundle located in JDBCEOAdaptor.framework/Resources can also be used to fix ProjectBuilder so that the wizard's create new model will work. The trick here is that you might have a hard time with PB's bundle chooser since it wants to use bundles with '.bundle' extension and the fix is in a ".EOMbundle". In the worst case, you can either create your EOModels first using EOModeler and then run the wizard, or you can copy the bundle to the same name with a ".bundle" extension for PB.

    6. Quit EOModeler and launch it again.

    7. Bring up the Event viewer and check the Application events. You should see a message telling you that "JDBCJVMFix" has initialized. If it has not, there is a problem with your installation.

    8. Quit EOModeler.

    Installing the JDBC Drivers

    Before you can use this adaptor, you will need to download and install JDBC drivers for your database. These drivers will normally be available from your database vendor; Apple cannot provide them.

    Make sure that you are using:

      • The Java 1.1.x version, not the Java 1.2 version.
      • The 100% Pure Java version. (This is sometimes called the Type 4 version.)
    Follow the vendor instructions to install the drivers and add the driver to the CLASSPATH environment variable. You should now be able to launch EOModeler and create a new model with "JDBC" as your adatptor type.

    Sources for JDBC Drivers

    Sybase drivers are available from Sybase. Go to:

    http://www.sybase.com/products/internet/jconnect/

    Oracle drivers are available from Oracle. Go to:

    http://technet.oracle.com/software/download.htm

    Openbase drivers are included in the main product download. Go to:

    http://store.openbase.com/cgi-bin/WebObjects/OpenBaseStore?openbase=1

    SQLServer users can download a test version of i-net SPRINT, a Type 4 JDBC 2.0 driver for Microsoft SQLServer6.5 and 7.0, from:

    http://www.inetsoftware.de . (A test-version of i-net

    Driver Parameters

    For your convenience, the following is a list of drivers and their associated connection parameters that have been used sucessfully with this adaptor.

    Informix = {
    JDBCDriverName = com.informix.jdbc.IfxDriver;
    password = informix;
    protocol = jdbc;
    subname = "//somehost:1526/movies:INFORMIXSERVER=eof";
    subprotocol = "informix-sqli";
    username = informix;
    };
    ODBC = {
    JDBCDriverName = sun.jdbc.odbc.JdbcOdbcDriver;
    password = "";
    protocol = jdbc;
    subname = "dbName;";
    subprotocol = odbc;
    username = "";
    };
    OpenBase = {
    JDBCDriverName = openbase.jdbc.ObDriver;
    password = "";
    protocol = jdbc;
    subname = "//hostname/dbName";
    subprotocol = openbase;
    username = "";
    };
    Oracle = {
    JDBCDriverName = oracle.jdbc.driver.OracleDriver;
    password = tiger;
    protocol = jdbc;
    subname = "thin:@localhost:1521:ORCL";
    subprotocol = oracle;
    username = scott;
    };
    Sybase = {

    JDBCDriverName = com.sybase.jdbc.SybDriver;
    password = "";
    protocol = jdbc;
    subname = "localhost:3696/dbname";
    subprotocol = "sybase:Tds";
    username = sa;
    }

    DISCLAIMER

    THE INFORMATION IN THIS DOCUMENT AND THE ASSOCIATED DOWNLOAD IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. APPLE COMPUTER, INC. DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. MOREOVER, APPLE COMPUTER, INC. DOES NOT WARRANT OR MAKE ANY REPRESENTATIONS REGARDING THE USE OR THE RESULTS OF THE USE OF THE INFORMATION CONTAINED HEREIN IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY, OR OTHERWISE. ANY STATEMENTS MADE TO YOU BY APPLE COMPUTER, INC. OR CONTAINED HEREIN IN THE COURSE OF PROVIDING YEAR 2000 RELATED FIXES, YEAR 2000 DIAGNOSTIC TOOLS, OR REMEDIATION SERVICES (IF ANY) ARE SUBJECT TO THE YEAR 2000 INFORMATION AND READINESS DISCLOSURE ACT (112 STAT. 2386). IN CASE OF A DISPUTE, THIS ACT MAY REDUCE YOUR LEGAL RIGHTS REGARDING THE USE OF ANY SUCH STATEMENTS, UNLESS OTHERWISE SPECIFIED BY YOUR CONTRACT OR TARIFF.


Document Information
Product Area: WebObjects
Category: WebObjects 4
Sub Category: Development

Copyright © 2000 Apple Computer, Inc. All rights reserved.