Class JOP.persist.jdbc.JdbcConfig
All Packages  Class Hierarchy  This Package  Previous  Next  Index  Home

Class JOP.persist.jdbc.JdbcConfig

java.lang.Object
   |
   +----JOP.persist.jdbc.JdbcConfig

public class JdbcConfig
extends Object
The JDBC configuration utility works by testing a number of 'strategies' for storing and retrieving each Java type. A strategy defines the SQL column data type and the JDBC methods to be used to access that column. Testing continues until a successful strategy is found or until all strategies for the Java data type have been attempted. A successful strategy is one that will correctly store and retrieve the pre-defined test data for each Java data type. Typically the test data consists of the minimum, maximum, zero and null values for each Java type.

Once a successful strategy has been selected for all Java types the chosen strategies are saved in the JDBC database. Each time a JDBC PersistManager is opened the correct strategies are immediately loaded into memory.

When another JDBC driver is used against the same data base it is first necessary to run the configuration program to determine if the new driver is compatible with the saved strategies.

Each strategy is a dynamically loaded class that includes methods for reading and writing to JDBC. The methods are necessary to allow character escaping and other manipulations of the saved or retrieved data. It is possible for a JOP user to define their own strategies.

To run the JDBC configuration program execute the following command:

    >java JOP.persist.jdbc.JdbcConfig driver_name url username password
    
This command will configure your database and store the configuration information in the database in the tables JOPconfig and JOPtypes. See the section on testing for information on how to setup JOP and JDBC.

Method Index

 o main(String[])
Command line program entry point....

Methods

 o main
  public static void main(String args[]) throws Exception
Command line program entry point....

All Packages  Class Hierarchy  This Package  Previous  Next  Index  Home