Kodo JDO defines many properties of its own. Most of these properties are provided for advanced users who wish to customize Kodo JDO's behavior; the majority of developers can omit them. A complete listing of Kodo JDO-specific properties is given below:
com.solarmetric.kodo.LicenseKey
Default: none
Description: The license key provided to you by SolarMetric. Keys are available at www.solarmetric.com
com.solarmetric.kodo.impl.jdbc.PersistentTypes
Default: none
Description: A comma-separated list of persistent type class names to be used accessible via this PersistenceManagerFactory. If this is unset, the system will attempt to load a list of persistent types from a metadata table in the data store.
com.solarmetric.kodo.impl.jdbc.DictionaryClass
Default: based on javax.jdo.option.ConnectionURL
Description: The DBDictionary to use for this configuration. This is auto-detected based on the setting of javax.jdo.option.ConnectionURL, so you need only set this to override the default with your own custom DBDictionary or if you are using an unrecognized driver.
Unfortunately, minor differences in the way databases map java types to native SQL types and variances in the SQL syntax for manipulating database schema make it impossible to write persistence code that will work across all databases. To overcome this problem, SolarMetric has defined the com.solarmetric.kodo.impl.jdbc.schema.DBDictionary interface, which declares the API necessary to abstract away the idiosyncrasies of an individual database vendor. Each supported database has its own dictionary:
com.solarmetric.kodo.impl.jdbc.schema.dict.CloudscapeDictionary
com.solarmetric.kodo.impl.jdbc.schema.dict.InstantDBDictionary
com.solarmetric.kodo.impl.jdbc.schema.dict.PointbaseDictionary
com.solarmetric.kodo.impl.jdbc.schema.dict.PostgresDictionary
com.solarmetric.kodo.impl.jdbc.schema.dict.SQLServerDictionary
com.solarmetric.kodo.impl.jdbc.DictionaryProperties
Default: none
Description: A space-separated list of name-value properties settings to pass to the dictionary defined by com.solarmetric.kodo.impl.jdbc.DictionaryClass.
Many of the DBDictionary options are automatically configured by concrete subclasses of GenericDictionary. The defaults can, however, be overridden by using this property.
The GenericDictionary understands the following properties:
QuoteNumbers
Default: false
Description: If true, then numbers will be quoted before being stored. This improves precision for some data stores.
NameTruncationVersion
Default: 0
Description: If 0, then autogenerated table/column/index names that are longer than the maximum allowable lengths will be truncated using a readable truncation algorithm that can potentially cause collisions. If 1, then a more aggressive but less readable truncation algorithm will be used. This is useful for databases with small maximum lengths, such as DB2. For information on manually overriding Kodo JDO's schema name generation to avoid collisions, see the section on JDO metadata extensions.
SchemaName
Default: null
Description: The name of the schema to connect to when invoking java.sql.DatabaseMetaData methods that accept a schema name. This can be important when accessing a data store that has multiple schemas with JDO metadata tables in them.
The MySQLDictionary understands the following properties:
TableType
Default: null
Description: The table type to use when creating new tables. For example, to create transaction-capable BDB tables, set this to BDB.
SupportsSelectForUpdate
Default: true
Description: If true, then assume that this MySQL install is capable of locking data on select, using SELECT ... FOR UPDATE syntax. Otherwise, assume that this MySQL install cannot lock data. Currently, Kodo JDO silently ignores requests to obtain pessimistic locks in this situation. In the future, Kodo JDO will throw an exception if configured with data store exceptions while this is false.
com.solarmetric.kodo.EnableQueryExtensions
Default: false
Description: If true, then Kodo JDO will allow the use of query filter extensions. See the query extensions documentation for more information.
com.solarmetric.kodo.QueryFilterListeners
Default: none
Description: A list of query filter listeners to add to the default list of extensions. Ignored if com.solarmetric.kodo.EnableQueryExtensions is false.
com.solarmetric.kodo.impl.jdbc.WarnOnPersistentTypeFailure
Default: false
Description: If true, then Kodo JDO will print a warning if an error occurs while loading one of the listed persistent types. Otherwise, Kodo JDO will fail when such an error occurs. This can be useful when developing in a multi-user environment, when the schema may be slightly out-of-sync. However, this option should not be used at deploy time, since at deploy time, any problem loading a listed persistent type is probably a big deal.
com.solarmetric.kodo.impl.jdbc.FlatInheritanceMapping
Default: true
Description: If true, then all fields of all classes in a given inheritance hierarchy will by default map into the least-derived type's default primary table. If false then a new default primary table will be created for each class in the inheritance hierarchy, and each type's declared fields will map to that table by default.
com.solarmetric.kodo.impl.jdbc.SequenceFactoryClass
Default: com.solarmetric.kodo.impl.jbdc.schema.DBSequenceFactory. This implementation obtains sequence numbers from a special database table used solely for this purpose. The table is created automatically the first time sequence numbers are requested if it does not already exist. The sequence table can also be manipulated through the included sequencetable shell/bat script, which accepts the same options as the schematool and uses the following actions:
add: Creates the sequence table if it does not already exist.
drop: Drops the sequence table.
increment: Increments the value of the sequence table by the increment defined for the SequenceFactory, and prints the new value. If the table does not exist, it will be created.
Description: The name of the class to use for generating sequence numbers when using data store identity. Must implement the com.solarmetric.kodo.impl.jdbc.SequenceFactory interface.
com.solarmetric.kodo.impl.jdbc.SequenceFactoryProperties
Default: none
Description: A space-separated list of properties to pass to the class defined in com.solarmetric.kodo.impl.jdbc.SequenceFactoryClass upon initialization.
com.solarmetric.kodo.impl.jdbc.schema.DBSequenceFactory understands the following property:
Increment
Default: 50
Description: The number by which the sequence table should be incremented. The sequence table is created automatically by Kodo JDO and used to generate unique object ID values. To increase performance, Kodo JDO grabs sequence numbers in blocks, so that it only has to consult the sequence table once every N new persistent instances. The default value for this property is 50.
com.solarmetric.kodo.impl.jdbc.AutoReturnTimeout
Default: 10
Description: The number of seconds to wait before automatically reclaiming an in-use transaction.
com.solarmetric.kodo.DefaultFetchThreshold
Default: 30
Description: The threshold below which result lists will be completely instantiated upon their creation. A value of -1 will always force all results to be completely instantiated, thus disabling lazy result loading.
com.solarmetric.kodo.DefaultFetchBatchSize
Default: 10
Description: The number of rows that will be pre-fetched when an element in a Query result is accessed.
com.solarmetric.kodo.PersistenceManagerClass
Default: com.solarmetric.kodo.runtime.PersistenceManagerImpl
Description: The name of the class that the PersistenceManagerFactory should create when creating a new PersistenceManagerImpl. Must extend com.solarmetric.kodo.runtime.PersistenceManagerImpl.
com.solarmetric.kodo.PersistenceManagerProperties
Default: none
Description: A space-separated list of properties to pass to the class defined in com.solarmetric.kodo.PersistenceManagerClass upon initialization.
com.solarmetric.kodo.DataCacheClass
Default: none
Description: The name of the class to use for caching of data loaded from the data store. Must implement com.solarmetric.kodo.runtime.datacache.DataCache.
com.solarmetric.kodo.DataCacheProperties
Default: none
Description: A space-separated list of properties to pass to the class defined in com.solarmetric.kodo.DataCacheClass upon initialization. See the caching documentation for details on possible values.
com.solarmetric.kodo.ProxyManagerClass
Default: com.solarmetric.kodo.util.SimpleProxyManager
Description: The name of the class to use to proxy second class objects in managed instances. Must implement com.solarmetric.kodo.util.ProxyManager.
com.solarmetric.kodo.ProxyManagerProperties
Default: none
Description: A space-separated list of properties to pass to the class defined in com.solarmetric.kodo.ProxyManagerClass upon initialization.
com.solarmetric.kodo.Logger
Default: none
Description: The name of the file to write logging output to. stdout and stderr are treated specially.
com.solarmetric.kodo.ee.ManagedRuntimeClass
Default: com.solarmetric.kodo.ee.JNDIManagedRuntime
Description: The name of the class to use for obtaining a reference to the transaction manager in an enterprise environment. Must implement the com.solarmetric.kodo.ee.ManagedRuntime interface.
com.solarmetric.kodo.ee.ManagedRuntimeProperties
Default: none
Description: A space-separated list of properties to pass to the class defined in com.solarmetric.kodo.ManagedRuntimeClass upon initialization.
com.solarmetric.kodo.ee.JNDIManagedRuntime understands the following property:
TransactionManagerName
Default: java:/TransactionManager
Description: The location in JNDI of the javax.transaction.TransactionManager to use to synchronize with a global transaction.