The JDO runtime must have access to a list of all persistent types for each database on startup. Kodo provides two ways to maintain this list:
Properties: You can use the com.solarmetric.kodo.impl.jdbc.PersistentTypes configuration property to specify a comma-separated list of your persistent class names. This approach has the advantage of simplicity but requires the developer to manually add and remove class names from the properties file or properties setup code. If this option is used, it will always override the persistent types list maintained by the schematool, which is described below.
Schematool: If you do not specify a value for the com.solarmetric.kodo.impl.jdbc.PersistentTypes property, the schematool will maintain its own persistent types list in the database. It creates a special table for this purpose, typically called JDOSCHEMAMETADATAX. The table is automatically created and kept up-to-date as you invoke the tool's add, refresh, and drop actions. You can manually manipulate the tool's persistent type list using the register and unregister actions.
This is the preferred method of managing the persistent types list, as it frees you from having to remember to keep the properties files up-to-date.
To migrate from using properties to using the schematool for list maintenance, delete the com.solarmetric.kodo.impl.jdbc.PersistentTypes property from your properties file and then run the schematool's register action on all persistent types. For example, in a UNIX environment, you could use the following commands:
$ cd <source directory root> $ schematool -action register `find . -name "*.jdo"`To migrate from the schematool approach to the properties approach, add the com.solarmetric.kodo.impl.jdbc.PersistentTypes list to your properties files; the system will automatically use it instead of the database table.