Configuring Enhydra 5.1 to use InterBase


Table of Contents

1. Introduction
2. Understanding the InterClient, InterServer, InterBase relationship
3. Enhydra Configuration
Configuration notes

Chapter 1. Introduction

InterBase is an efficient and powerful RDBMS engine. Its vendor Inprise Corp. has announced a policy to release the upcoming version of InterBase as an open source product. See www.interbase.com for more information and product downloads.

Chapter 2. Understanding the InterClient, InterServer, InterBase relationship

With most databases, the JDBC driver talks directly with the database server. In the case of Interbase, the JDBC driver talks to an intermediary server that talks to the database server. The InterBase JDBC driver is called InterClient. The InterClient system includes an all-Java thin client, and a server-side daemon (also known as a service on Windows NT) called InterServer. This daemon accepts JDBC connection requests and in turn connects to the InterBase RDBMS daemon. Each of the three processes (JDBC client, InterServer daemon, InterBase daemon) can run on separate hosts, or they can all run on the same host, or any other combination. InterClient is a class 3 JDBC driver in that it has a separate daemon on the server to serve JDBC connections, but it also matches the definition of a class 4 driver in that the client component can connect only to one DBMS back-end, InterBase.

InterClient is installed separately from InterBase. On Windows, it is commonly installed in the JAR file

 C:\Program Files\Borland\InterClient\interclient.jar.
Depending on the version of InterClient, it might instead be in
 C:\Program Files\InterBase Corp\InterClient\interclient.jar.

Find the jar file and append its location to your system CLASSPATH environment variable on the client host where you run Java applications. Different versions of InterClient are available. Version 1.50x works only with JDK 1.1x. InterClient Version 1.51x works only with JDK 1.2.x. Whichever version of InterClient you use, you must use the matching version of InterServer.

Chapter 3. Enhydra Configuration

Table of Contents

Configuration notes

Below is an example of the database configuration settings for connecting an Enhydra application to InterBase. Add the following settings to the configuration file <appName>.conf where appName is the name of your application.

#--------------------------------------------------------------------
#                   Database Manager Configuration
#--------------------------------------------------------------------
DatabaseManager.Databases[] = "database_id"
DatabaseManager.DefaultDatabase = " database_id "
DatabaseManager.Debug = "false"
DatabaseManager.DB.database_id.ClassType = "Standard"
DatabaseManager.DB.database_id.JdbcDriver = "interbase.interclient.Driver"
DatabaseManager.DB.database_id.Connection.Url = 
"jdbc:interbase://loopback/C:/directory/subdirectory/database.gdb"
DatabaseManager.DB.database_id.Connection.User = "sysdba"
DatabaseManager.DB.database_id.Connection.Password = "masterkey"
DatabaseManager.DB.database_id.Connection.MaxPoolSize = 30
DatabaseManager.DB.database_id.Connection.AllocationTimeout = 10000
DatabaseManager.DB.database_id.Connection.Logging = false
DatabaseManager.DB.database_id.ObjectId.CacheSize = 20
DatabaseManager.DB.database_id.ObjectId.MinValue = 1

Configuration notes

  • Driver name

    The JDBC driver class is always interbase.interclient.Driver. The general URL format for InterClient JDBC connections is as follows:

    jdbc:interbase://servername/path_to_database

  • Server name

    The servername is the hostname or IP address of the server running InterServer, the server-side daemon that accepts JDBC connection requests. If the Java application runs on the same host where InterServer runs, then you can use the special servername loopback. If InterServer runs on a different host than the InterBase RDBMS server, you must specify this host with the following syntax:

    jdbc:interbase://interserver_host/interbase_host:path_to_database

  • Pathnames

    The path_to_database is an absolute path to the InterBase database file on the server where the InterBase RDBMS server runs. InterBase does not have abstract handles to databases, like Oracle SIDs or BDE aliases. You must specify the real path to the database. Note that there is a literal "/" character following the servername. If the absolute path starts with a "/" character, then you should have a pair of "/" characters together. For example:

    jdbc:interbase://servername//usr/local/data/inventory.gdb
    If the server is a Windows host, the path starts with a drive letter identifier:
    jdbc:interbase://servername/C:/data/inventory.gdb
    Slash, "/", and backslash, "\", characters within pathnames are interchangeable to InterBase. The InterBase daemon translates these characters as needed to match the convention on the server platform.

  • Ports

    InterBase does not take a port number argument in connection strings. InterClient and InterServer always communicate using the TCP/IP service named interserver which defaults to port 3060. InterServer and InterBase always communicate using the TCP/IP service named gds_db which defaults to port 3050.

  • User and password

    The username sysdba and its default password masterkey are used in the example configuration above. It is recommended that you change the default sysdba password on your InterBase server and create a non-superuser login in the InterBase password database and use that login for general database access.