Home Download FAQ Documentation Support

IceCool DbDir Documentation

IceCool DbDir Data Sheet

IceCool DbDir Design

DbDir is a JNDI directory Service Provider that uses a simple database schema for storing directory objects. Each object stored in the directory table is represented by a "name" string (JNDI absolute name), value (the actual object converted into a string representation) and searchable attributes stored in the form {key, value} - DbDir currently stores 3 {key, value} pairs but this can be extended to store more such properties. The search operation is implemented by means of a SQL query that searches for objects under the particular JNDI subtree matching the key(s) and value(s) predicates.

This leads to a simple design and more sophisticated search mechanisms can be easily incorporated using the power of the SQL WHERE clause. Since DbDir uses JDBC to connect to backend databases, the data can be migrated easily to other databases.

DbDir can also be extended to store other types of objects by providing JNDI ObjectFactory and StateFactory implementations to retrieve and store objects and specifying the names of the classes in the jndi.properties file. Object and State Factories to store String class objects and any Serializable class are bundled.

DbDir comes bundled with implementations for two databases, FireBird and Axion. The Axion database software is also bundled. The FireBird JDBC driver is bundled but the database server is not bundled but can be downloaded from the FireBird site. These examples should serve to illustrate how support for a new database can be incorporated with minimal changes.

Please look at the javadocs accessed through the link below and the samples for getting started.

IceCool DbDir Javadocs

Steps to run the samples


Running the sample applications require that your computer has JDK 1.4.x installed. If you do not already have JDK 1.4 already on your computer download one from Sun's Java site .

Create the base directory and unpack the zip; set the classpath and environment variables:

extract the zip file contents in some directory (the install_dir)

Database Setup:

The Axion database is bundled. To try the samples with FireBird database, download and install FireBird database from the Firebird site

The Firebird driver is already bundled.

set DBDIRBASE=install_dir (The default assumes C:\dbdir0.1\build\DbDir-0.1 as the install_dir)

Make sure javac and java are in your %PATH% variable.

Axion setup:

Choose the Axion database directory; this is the directory where all Axion data will be stored. For example: C:\AxionDb

set AXIONDB = C:\AxionDb

copy %DBDIRBASE%\conf\axiondb.properties %AXIONDB%

Edit %DBDIRBASE%\conf\jndi.properties as follows: com.icecool.jndi.dbdir.daofactory=com.icecool.jndi.dbdir.AxionDAOFactory com.icecool.jndi.dbdir.datasourcefactory=com.icecool.jndi.dbdir.GenericDataSourceFactory com.icecool.jndi.dbdir.dsxmlfile= "value of DBDIRBASE"\\conf\\ds.xml

Copy jndi.properties to one of the directories in the CLASSPATH. The jndi.properties file has to be present in the CLASSPATH for JNDI to pick it.

Edit %DBDIRBASE%\conf\ds.xml.axion and save it as ds.xml (to be consistent with jndi.properties) You should change the sqlurl element according to %AXIONDB%

Firebird setup

Follow the same steps as above, with the changes in jndi.properties as below:


Edit the JDBC connection properties in %DBDIRBASE%\conf\ds.xml.firebird and save it as ds.xml (to be consistent with jndi.properties)

Run the samples

To run the Axion samples, go to %DBDIRBASE%\samples and

Edit JndiAxionClient.java and JndiAxionClient2.java JDBC driver connection properties. No other changes should be necessary.

Edit runaxion.bat and run it. You should also be able to see the trace messages in the logs.

To run the Firebird samples, go to %DBDIRBASE%\samples and

Edit JndiFBClient.java and JndiFBClient2.java JDBC driver connection properties. No other changes should be necessary.

Edit runfb.bat and run it. You should also be able to see the trace messages in the logs.

Please look at the javadocs to see how the DbDir API can be used to extend the functionality of DbDir.

IceCool DbDir Javadocs

(c) 2002 IceCool.com