1. RDBMS Linter SQL JDBC driver contains following components: 

   - linapid - server-side daemon. linapid located in ~linter/bin directory
   - JDBC classes - client-side Java classes for a specific JDK
     (LinJdbc.jar, linjdbc-1.2.jar linjdbc-1.4.jar) in ~linter/jdbc directory
   - JNDI-interface (linjndi-1.1.jar, linjndi-1.2.jar)
   - Hibernate 3 dialect LinterDialect.java 

To establish connection via JDBC to Linter database, the correspondent
JDBC driver should be used in conjunction with the proper connection string 
(URL).


2. The following information provides details on different Linter JDBC versions:

            
JDK version     : 1.1.x
JDBC version    : 1
package name    : LinJdbc.jar
driver name     : jdbc.LinJdbc.LinterDriver 
database URL    : jdbc:linter:<host>:<port>:<db_name>
JNDI interface  : linjndi-1.1.jar
JNDI DataSource : jdbc.LinJdbc.jndi.LinterDataSource

JDK version     : 1.2.x - 1.3.x
JDBC version    : 2
package name    : linjdbc-1.2.jar
driver name     : com.relx.jdbc.LinterDriver
database URL    : jdbc:linter:linapid:<host>:<port>:<database>
JNDI interface  : linjndi-1.2.jar
JNDI DataSource : com.relx.jdbc.jndi.LinterDataSource

JDK version     : 1.4.x - 1.5.x
JDBC version    : 3
package name    : linjdbc-1.4.jar
driver name     : com.relx.jdbc.LinterDriver
database URL    : jdbc:linter:linapid:<host>:<port>:<database>
JNDI interface  : linjndi-1.2.jar
JNDI DataSource : com.relx.jdbc.jndi.LinterDataSource

  host     - server name for running linapid
  port     - linapid port (can be setup as a linapid startup parameter -p,
                           by default 1070)
  database - database name from ~linter/bin/nodetab file ('local', by default)

Example for connection string (URL): "jdbc:linter:linapid:192.168.1.123:local"

To use JDBC driver, the package path should be added to CLASSPATH or
parameter -classpath should be used.

To work with jdbc driver you should start jdbc server. 

Jdbc server start command has the following format:

   linapid /S=<path_to_sql> /C=<path_to_dbhandler> /P=<port>, 
   
   where
      
      <path_to_dbhandler> should contain the full path including program name.
      
      <path_to_sql> is needed by Linter Java administrator only.
                    linapid adds "/sql" suffix to <path_to_sql> parameter. 



To use JNDI with old JDK versions (without DataSource support) you should install
proper package.

3 Establishing connection via JNDI interface to Linter database

It's necessary to create DataSource and bind it to JNDI context.
For example:

import jdbc.LinJdbc.jndi.LinterDataSource; // for JDK version < 1.2
import com.relx.jdbc.jndi.LinterDataSource; // for JDK version >= 1.2

...
   LinterDataSource ds = new LinterDataSource();
   ds.setUser("SYSTEM");
   ds.setPassword("MANAGER");
   ds.setServerName("localhost");
   ds.setPortNumber(1070);
   ds.setDatabaseName("DEMO");

   Context ctx = new InitialContext();
   ctx.bind("jdbc/DemoDB", ds);
...

After that any other program can establish connection to Linter database
using saved connection's parameters.
For example:

...

  Connection getMyLinterConnection()
    throws NamingException, SQLException
  {
    Context ctx = new InitialContext();
    DataSource ds = (DataSource) ctx.lookup("jdbc/DemoDB");
    Connection conn = ds.getConnection();
    return conn;
  }
...

4 Hibernate 3 integration
 - add LinterDialect.java into project or compile Hibernate, 
   having the specified file in src/org/hibernate/dialect directory
 - set Hibernate properties for connection to LINTER 
   (in hibernate.properties file or in the program).
   To establish connection to Demo database:

   hibernate.dialect com.relx.hibernate.LinterDialect
   hibernate.connection.driver_class com.relx.jdbc.LinterDriver
   hibernate.connection.username SYSTEM
   hibernate.connection.password MANAGER
   hibernate.connection.url jdbc:linter:linapid:localhost:1070:local
