Using the Commercial Implementations


Three commercial implementations are featured in this book, but you can use the JDO Learning Tools with any implementation that supports Ant build scripts. The code provided with this book provides build scripts for the three implementations Kodo, Lido, and IntelliBO. The 1.0 release of the JDO Learning Tools supports the Microsoft Windows operating systems. Undoubtedly, the open source community will extend support to other JDO implementations and operating systems. You will have to find or write a script for any other implementation. The JDO Learning Tools are demanding programs, and you may very well find bugs in the commercial implementations as a result of using these programs. If you find bugs, report them to the vendor.

Using the Kodo Implementation

When using the Kodo implementation, configure the kodo.properties file, and copy it to custom.properties. The main build.xml script will invoke the tool script kodo.xml. The tool script runs the Kodo verifier, Kodo enhancer, and Kodo schema tool. The Kodo implementation supports live schema generation and evolution. As a result, when the schema tool is invoked, there is no need to take any further steps to update the database schema. Because the schema tool is fairly time consuming, the Kodo build script with the JDO Learning Tools optimizes the use of the schema tool by detecting whether the enhanced classes have changed. This detection is not foolproof. To force schema generation, use the -Dschema=generate option with the ant command as shown in the following command line:

 ant -Dschema=generate megacups 

The learning-programs target sets this property for you.

Using the Lido Implementation

When using the Lido implementation, configure the lido.properties file, and copy it to custom.properties. The main build.xml script invokes the tool script lido.xml. The tool script runs the Lido enhancer and schema tool. Because the use of the schema tool is somewhat time consuming, it runs only when the schema property is defined. This can be done at the command line when invoking Ant, as the following line shows:

 ant -Dschema=generate megacups 

The learning-programs target sets this property for you.

The Lido tool script has been configured to have the schema tool output SQL files. These files are placed in the bookcode-home directory. Their file names are composed of the lowest package directory plus the SQL extension, such as coffee.sql. After generating the SQL files, you will need to execute the portion of the SQL script that is appropriate for your schema evolution. You may have to drop tables if you alter the definition of persistent fields in the application data classes.

Using the IntelliBO Implementation

When using the IntelliBO implementation, configure the intellibo.properties file, and copy it to custom.properties. The main build.xml script invokes the tool script intellibo.xml. The tool script runs the IntelliBO verifier, enhancer, and schema tools. Because the use of the schema tool is somewhat time consuming, it runs only when the schema property is defined. This can be done at the command line when invoking Ant, as the following line shows:

 ant -Dschema=generate megacups 

The learning-programs target sets this property for you.

The IntelliBO tool script has been configured to have the schema tool output SQL files. These files are placed in the package directory under the enhanced directory. You will find three SQL files: create.sql, drop.sql, and select.sql. After generating the SQL files, you will need to execute the portion of the SQL scripts that are appropriate for your schema evolution.




Using and Understanding Java Data Objects
Using and Understanding Java Data Objects
ISBN: 1590590430
EAN: 2147483647
Year: 2005
Pages: 156
Authors: David Ezzio

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net