2.6. Kodo JDO Properties

2.6.1. kodo.ClassResolverClass
2.6.2. kodo.ClassResolverProperties
2.6.3. kodo.ConnectionProperties
2.6.4. kodo.ConnectionFactoryProperties
2.6.5. kodo.Connection2DriverName
2.6.6. kodo.Connection2Password
2.6.7. kodo.Connection2URL
2.6.8. kodo.Connection2UserName
2.6.9. kodo.Connection2Properties
2.6.10. kodo.ConnectionFactory2Properties
2.6.11. kodo.ConnectionRetainMode
2.6.12. kodo.DataCacheClass
2.6.13. kodo.DataCacheProperties
2.6.14. kodo.DataCacheTimeout
2.6.15. kodo.EagerFetchMode
2.6.16. kodo.FetchBatchSize
2.6.17. kodo.FetchGroups
2.6.18. kodo.FetchThreshold
2.6.19. kodo.FilterListenerClasses
2.6.20. kodo.FilterListenerProperties
2.6.21. kodo.FlushBeforeQueries
2.6.22. kodo.LicenseKey
2.6.23. kodo.ManagedRuntimeClass
2.6.24. kodo.ManagedRuntimeProperties
2.6.25. kodo.PersistenceManagerClass
2.6.26. kodo.PersistenceManagerProperties
2.6.27. kodo.PersistentClasses
2.6.28. kodo.ProxyManagerClass
2.6.29. kodo.ProxyManagerProperties
2.6.30. kodo.QueryCacheClass
2.6.31. kodo.QueryCacheProperties
2.6.32. kodo.RemoteCommitProviderClass
2.6.33. kodo.RemoteCommitProviderProperties
2.6.34. kodo.ResultListClass
2.6.35. kodo.ResultListProperties
2.6.36. kodo.TransactionMode
2.6.37. kodo.jdbc.AutoIncrementConstraints
2.6.38. kodo.jdbc.ClassIndicatorClass
2.6.39. kodo.jdbc.ConnectionDecoratorClasses
2.6.40. kodo.jdbc.ConnectionDecoratorProperties
2.6.41. kodo.jdbc.DBDictionaryClass
2.6.42. kodo.jdbc.DBDictionaryProperties
2.6.43. kodo.jdbc.ForeignKeyConstraints
2.6.44. kodo.jdbc.JDBCListenerClasses
2.6.45. kodo.jdbc.JDBCListenerProperties
2.6.46. kodo.jdbc.MappingFactoryClass
2.6.47. kodo.jdbc.MappingFactoryProperties
2.6.48. kodo.jdbc.SchemaFactoryClass
2.6.49. kodo.jdbc.SchemaFactoryProperties
2.6.50. kodo.jdbc.Schemas
2.6.51. kodo.jdbc.SequenceFactoryClass
2.6.52. kodo.jdbc.SequenceFactoryProperties
2.6.53. kodo.jdbc.SubclassMappingClass
2.6.54. kodo.jdbc.TransactionIsolation
2.6.55. kodo.jdbc.UpdateManagerClass
2.6.56. kodo.jdbc.UpdateManagerProperties
2.6.57. kodo.jdbc.VersionIndicatorClass

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 alphabetical listing of Kodo JDO-specific properties is given below.

2.6.1. kodo.ClassResolverClass

Property name: kodo.ClassResolverClass

Configuration API: kodo.conf.JDOConfiguration.getClassResolverClass

Resource adaptor config-property: ClassResolverClass

Default: kodo.util.SpecClassResolver

Description: The full class name of a kodo.util.ClassResolver to use for class name resolution. The default value is compliant with the JDO 1.0 specification, but you may wish to plug in your own implementations if you have special classloading needs.

2.6.2. kodo.ClassResolverProperties

Property name: kodo.ClassResolverProperties

Configuration API: kodo.conf.JDOConfiguration.getClassResolverProperties

Resource adaptor config-property: ClassResolverProperties

Default: -

Description: Configuration properties for the ClassResolver plugin.

2.6.3. kodo.ConnectionProperties

Property name: kodo.ConnectionProperties

Configuration API: kodo.conf.JDOConfiguration.getConnectionProperties

Resource adaptor config-property: ConnectionProperties

Default: -

Description: A properties string for configuration of the driver listed in the ConnectionDriverName property. The string must follow the format of plugin property strings described at the beginning of this chapter .

If the listed driver is an instance of java.sql.Driver, this string will be parsed into a Properties instance, which will then be used to obtain database connections through the java.sql.Driver.connect(String url, Properties props) method. If, on the other hand, the driver is a javax.sql.DataSource, the string will be treated as a plugin properties string, and matched to the bean setter methods of the DataSource instance.

2.6.4. kodo.ConnectionFactoryProperties

Property name: kodo.ConnectionFactoryProperties

Configuration API: kodo.conf.JDOConfiguration.getConnectionFactoryProperties

Resource adaptor config-property: ConnectionFactoryProperties

Default: -

Description: A properties string for configuration of the javax.sql.DataSource in use. The string must follow the format of plugin property strings described at the beginning of this chapter. The string's property keys will be matched to the bean-like setter methods of the DataSource.

Kodo JDO's built-in DataSource is used if you do not specify one in any other property. It has several options you can configure via the ConnectionFactoryProperties:

  • MaxActive: The maximum number of database connections in use at one time. Defaults to 8.

  • MaxIdle: The maximum number of idle database connections to keep in the pool. Defaults to 8.

  • MaxWait: The maximum number of milliseconds to wait for a free database connection to become available before giving up. Defaults to 3000.

  • MinEvictableIdleTimeMillis: The minimum number of milliseconds that a database connection can sit idle before it becomes a candidate for eviction from the pool. Defaults to 30 minutes. Set to 0 to never evict a connection based on idle time alone.

  • TestOnBorrow: Set to true to validate database connections before returning them from the pool. Note that validation only consists of a call to the connection's isClosed method unless you specify a ValidationSQL string to use to send a quick query.

  • TestOnReturn: Set to true to validate database connections when they are returned to the pool. Note that validation only consists of a call to the connection's isClosed method unless you specify a ValidationSQL string to use to send a quick query.

  • TestWhileIdle: Set to true to periodically validate idle database connections.

  • TimeBetweenEvictionRunsMillis: The number of milliseconds between runs of the eviction thread. Defaults to -1, meaning the eviction thread will never run.

  • ValidationSQL: A simple SQL query to issue to validate a database connection. If this property is not set, then the only validation performed is to use the Connection.isClosed method. The following table shows some recommended SQL validation strings for various databases:

    Table 2.1. Validation SQL

    DatabaseSQL
    DB2 SELECT DISTINCT(CURRENT TIMESTAMP) FROM SYSIBM.SYSTABLES
    Informix SELECT DISTINCT CURRENT TIMESTAMP FROM INFORMIX.SYSTABLES
    MySQLSELECT NOW()
    Oracle SELECT SYSDATE FROM DUAL
    PostgresSELECT NOW()
    SQLServer SELECT GETDATE()
    Sybase SELECT GETDATE()

  • ValidationTimeout: The minimum number milliseconds that must elapse before a connection will ever be re-validated. This property is usually used with TestOnBorrow or TestOnReturn to reduce the number of validations performed, because the same connection is often borrowed and returned many times in short periods of time.

  • WhenExhaustedAction: The action to take when there are no available database connections in the pool. Set to 0 to immediately throw an exception. Set to 1 to block until a connection is available or the maximum wait time is exceeded. Set to 2 to automatically grow the pool. Defaults to 1 (block).

Additionally, the following properties are available whether you use Kodo JDO's built-in DataSource or a third-party's:

  • MaxCachedStatements: The maximum number of java.sql.PreparedStatements to cache. Statement caching can dramatically speed up some databases. Defaults to 70 for Kodo's data source, and 0 for third-party data sources. Most third-party data sources do not benefit from Kodo's prepared statement cache, because each returned connection has a unique hash code, making it impossible for Kodo to match connections to their cached statements.

  • QueryTimeout: The maximum number of seconds the JDBC driver will wait for a statement to execute.

2.6.5. kodo.Connection2DriverName

Property name: kodo.Connection2DriverName

Configuration API: kodo.conf.JDOConfiguration.getConnection2DriverName

Resource adaptor config-property: Connection2DriverName

Default: -

Description: This property is equivalent to the javax.jdo.option.ConnectionDriverName property described previously, but relates to the alternate connection factory used for non-XA connections. When the primary connection factory is managed by an application server that starts and stops transactions automatically, you should specify a second set of connection properties that Kodo JDO can use to create unmanaged connections. These connections are applied to miscellaneous tasks such as updating the database sequence used to generate unique ID values for newly-persisted objects.

2.6.6. kodo.Connection2Password

Property name: kodo.Connection2Password

Configuration API: kodo.conf.JDOConfiguration.getConnection2Password

Resource adaptor config-property: Connection2Password

Default: -

Description: This property is equivalent to the javax.jdo.option.ConnectionPassword property described previously, but relates to the alternate connection factory used for non-XA connections. When the primary connection factory is managed by an application server that starts and stops transactions automatically, you should specify a second set of connection properties that Kodo JDO can use to create unmanaged connections. These connections are applied to miscellaneous tasks such as updating the database sequence used to generate unique ID values for newly-persisted objects.

2.6.7. kodo.Connection2URL

Property name: kodo.Connection2URL

Configuration API: kodo.conf.JDOConfiguration.getConnection2URL

Resource adaptor config-property: Connection2URL

Default: -

Description: This property is equivalent to the javax.jdo.option.ConnectionURL property described previously, but relates to the alternate connection factory used for non-XA connections. When the primary connection factory is managed by an application server that starts and stops transactions automatically, you should specify a second set of connection properties that Kodo JDO can use to create unmanaged connections. These connections are applied to miscellaneous tasks such as updating the database sequence used to generate unique ID values for newly-persisted objects.

2.6.8. kodo.Connection2UserName

Property name: kodo.Connection2UserName

Configuration API: kodo.conf.JDOConfiguration.getConnection2UserName

Resource adaptor config-property: Connection2UserName

Default: -

Description: This property is equivalent to the javax.jdo.option.ConnectionUserName property described previously, but relates to the alternate connection factory used for non-XA connections. When the primary connection factory is managed by an application server that starts and stops transactions automatically, you should specify a second set of connection properties that Kodo JDO can use to create unmanaged connections. These connections are applied to miscellaneous tasks such as updating the database sequence used to generate unique ID values for newly-persisted objects.

2.6.9. kodo.Connection2Properties

Property name: kodo.Connection2Properties

Configuration API: kodo.conf.JDOConfiguration.getConnection2Properties

Resource adaptor config-property: Connection2Properties

Default: -

Description: This property is equivalent to the kodo.ConnectionProperties property described previously, but relates to the alternate connection factory used for non-XA connections. When the primary connection factory is managed by an application server that starts and stops transactions automatically, you should specify a second set of connection properties that Kodo JDO can use to create unmanaged connections. These connections are applied to miscellaneous tasks such as updating the database sequence used to generate unique ID values for newly-persisted objects.

2.6.10. kodo.ConnectionFactory2Properties

Property name: kodo.ConnectionFactory2Properties

Configuration API: kodo.conf.JDOConfiguration.getConnectionFactory2Properties

Resource adaptor config-property: ConnectionFactory2Properties

Default: -

Description: This property is equivalent to the kodo.ConnectionFactoryProperties property described previously, but relates to the alternate connection factory used for non-XA connections. When the primary connection factory is managed by an application server that starts and stops transactions automatically, you should specify a second set of connection properties that Kodo JDO can use to create unmanaged connections. These connections are applied to miscellaneous tasks such as updating the database sequence used to generate unique ID values for newly-persisted objects.

2.6.11. kodo.ConnectionRetainMode

Property name: kodo.ConnectionRetainMode

Configuration API: kodo.conf.JDOConfiguration.getConnectionRetainMode

Resource adaptor config-property: ConnectionRetainMode

Default: on-demand

Description: The default connection retain mode to use. Legal values are:

  • persistence-manager: Each persistence manager obtains a single connection and uses it until the persistence manager is closed.

  • transaction: A connection is obtained when each transaction begins (optimistic or datastore), and is released when the transaction completes. Non-transactional connections are obtained on-demand.

  • on-demand: Connections are obtained only when needed. This option is equivalent to the transaction option when datastore transactions are used. For optimistic transactions, though, it means that a connection will be retained only for the duration of the data store flush and commit process.

The connection retain mode can also be specified when obtaining an individual Kodo JDO persistence manager.

2.6.12. kodo.DataCacheClass

Property name: kodo.DataCacheClass

Configuration API: kodo.conf.JDOConfiguration.getDataCacheClass

Resource adaptor config-property: DataCacheClass

Default: -

Description: The full class name of a kodo.datacache.DataCache implementation to use for L2 caching of data loaded from the data store.

2.6.13. kodo.DataCacheProperties

Property name: kodo.DataCacheProperties

Configuration API: kodo.conf.JDOConfiguration.getDataCacheProperties

Resource adaptor config-property: DataCacheProperties

Default: -

Description: Configuration properties for the DataCache plugin.

2.6.14. kodo.DataCacheTimeout

Property name: kodo.DataCacheTimeout

Configuration API: kodo.conf.JDOConfiguration.getDataCacheTimeout

Resource adaptor config-property: DataCacheTimeout

Default: 0

Description: The number of milliseconds that data in the data cache is valid. Use the default value (0) to indicate that data should never expire.

2.6.15. kodo.EagerFetchMode

Property name: kodo.EagerFetchMode

Configuration API: kodo.conf.JDOConfiguration.getEagerFetchMode

Resource adaptor config-property: EagerFetchMode

Default: multiple

Description: The default eager fetch mode to use. Legal values are:

  • none: When querying for objects, do not try to select for related objects in the configured fetch groups at the same time.

  • single: When querying for objects, also select for 1-1 relations in the configured fetch groups when efficient. This typically involves an outer join to select the relation.

  • multiple: When querying for objects, also select for all relations in the configured fetch groups when efficient. This typically involves batching one additional select statement per relation (rather than one per object per relation, as is the case with lazy loading). The batched selects use the same where conditions as the select used to load the target objects.

The eager fetch mode can also be set on individual Kodo JDO persistence manager, query, and extent instances.

2.6.16. kodo.FetchBatchSize

Property name: kodo.FetchBatchSize

Configuration API: kodo.conf.JDOConfiguration.getFetchBatchSize

Resource adaptor config-property: FetchBatchSize

Default: 10

Description: The number of rows to fetch at once when scrolling through a result set. This property can also be set on individual Kodo JDO persistence manager, query, and extent instances.

2.6.17. kodo.FetchGroups

Property name: kodo.FetchGroups

Configuration API: kodo.conf.JDOConfiguration.getFetchGroups

Resource adaptor config-property: FetchGroups

Default: -

Description: A comma-separated list of fetch group names that are to be loaded when loading objects from the data store. This property can also be set on individual Kodo JDO persistence manager, query, and extent instances.

2.6.18. kodo.FetchThreshold

Property name: kodo.FetchThreshold

Configuration API: kodo.conf.JDOConfiguration.getFetchThreshold

Resource adaptor config-property: FetchThreshold

Default: 30

Description: The threshold below which result sets will be completely traversed upon creation. A value of -1 will disable scrolling of result sets. A value of 0, on the other hand, will cause the system to always scroll results. This property can also be set on individual Kodo JDO persistence manager, query, or extent instances.

2.6.19. kodo.FilterListenerClasses

Property name: kodo.FilterListenerClasses

Configuration API: kodo.conf.JDOConfiguration.getFilterListenerClasses

Resource adaptor config-property: FilterListenerClasses

Default: -

Description: A comma-separated list of full class names of custom JDOQL kodo.jdbc.query.JDBCFilterListener s to make available to all queries, in addition to the standard set of listeners. You can also add filter listeners to individual Kodo JDO query instances. Query extensions are discussed here.

2.6.20. kodo.FilterListenerProperties

Property name: kodo.FilterListenerProperties

Configuration API: kodo.conf.JDOConfiguration.getFilterListenerProperties

Resource adaptor config-property: FilterListenerProperties

Default: -

Description: A comma-separated list of properties strings for the filter listeners listed in the FilterListenerClasses property.

2.6.21. kodo.FlushBeforeQueries

Property name: kodo.FlushBeforeQueries

Configuration API: kodo.conf.JDOConfiguration.getFlushBeforeQueries

Resource adaptor config-property: FlushBeforeQueries

Default: with-connection

Description: Whether or not to flush any changes made in the current transaction to the data store before executing a query. This setting only applies to queries that would otherwise have to be executed in-memory because the IgnoreCache property is set to false and the query may involve objects that have been changed in the current transaction. Legal values are:

  • true: Always flush rather than executing the query in-memory. If the current transaction is optimistic, Kodo will begin a non-locking datastore transaction.

  • false: Never flush before a query.

  • with-connection: Flush only if the persistence manager has already established a dedicated connection to the data store, otherwise executes the query in-memory. This option is useful if you use long-running optimistic transactions and want to ensure that these transactions do not consume database resources until commit. Kodo's behavior with this option is dependent on the transaction status and mode, as well as the configured connection retain mode.

The flush mode can also be set on individual Kodo JDO persistence manager and query instances.

The table below describes the behavior of automatic flushing in various different situations. In all these situations, flushing will only occur if Kodo detects that you have made modifications in the current transaction to instances of types that are in the current query's access path.

Table 2.2. Kodo Automatic Flush Behavior

  FlushBeforeQueries = false FlushBeforeQueries = true FlushBeforeQueries = with-connection; ConnectionRetainMode = on-demand FlushBeforeQueries = with-connection; ConnectionRetainMode = transaction or persistence-manager
IgnoreCache = true no flushno flushno flushno flush
IgnoreCache = false; no tx active no flushno flushno flushno flush
IgnoreCache = false; datastore tx active no flushflushflushflush
IgnoreCache = false; optimistic tx active no flushflush no flush unless KodoPeristenceManager.flush has already been invoked flush

2.6.22. kodo.LicenseKey

Property name: kodo.LicenseKey

Configuration API: kodo.conf.JDOConfiguration.getLicenseKey

Resource adaptor config-property: LicenseKey

Default: -

Description: The license key provided to you by SolarMetric. Keys are available at www.solarmetric.com.

2.6.23. kodo.ManagedRuntimeClass

Property name: kodo.ManagedRuntimeClass

Configuration API: kodo.conf.JDOConfiguration.getManagedRuntimeClass

Resource adaptor config-property: ManagedRuntimeClass

Default: kodo.ee.AutomaticManagedRuntime

Description: The full class name of the kodo.runtime.ManagedRuntime implementation to use for obtaining a reference to the TransactionManager in an enterprise environment. The default AutomaticManagedRuntime is able to automatically integrate with several common application servers. Kodo also comes bundled with the InvocationManagedRuntime and the JNDIManagedRuntime; see the Javadoc for details on these plugins and the bean properties they accept. You can also implement your own ManagedRuntime for any application server not easily supported by the existing options.

2.6.24. kodo.ManagedRuntimeProperties

Property name: kodo.ManagedRuntimeProperties

Configuration API: kodo.conf.JDOConfiguration.getManagedRuntimeProperties

Resource adaptor config-property: ManagedRuntimeProperties

Default: -

Description: Configuration properties for the ManagedRuntime plugin.

2.6.25. kodo.PersistenceManagerClass

Property name: kodo.PersistenceManagerClass

Configuration API: kodo.conf.JDOConfiguration.getPersistenceManagerClass

Resource adaptor config-property: PersistenceManagerClass

Default: kodo.runtime.PersistenceManagerImpl

Description: The full class name of a custom javax.jdo.PersistenceManager type to use at runtime. This must be a subclass of kodo.runtime.PersistenceManagerImpl .

2.6.26. kodo.PersistenceManagerProperties

Property name: kodo.PersistenceManagerProperties

Configuration API: kodo.conf.JDOConfiguration.getPersistenceManagerProperties

Resource adaptor config-property: PersistenceManagerProperties

Default: -

Description: Configuration properties for the PersistenceManager plugin.

The kodo.runtime.PersistenceManagerImpl class can be configured with the following properties:

  • CloseOnManagedCommit: If true, then the PersistenceManager will be closed after a managed transaction (such as an EJB container-managed transaction) commits. If this is set to false, then the PersistenceManager will not be closed upon commit. This means that objects that were not properly detached from the PersistenceManager at the end of a session bean method and were then passed to a processing tier in the same JVM will still be usable, as their owning PersistenceManager will still be open. This behavior is not in strict compliance with the JDO specification, but is convenient for applications that were coded against Kodo 2, which did not close the PersistenceManager in these situations. The default for this property is true, meaning that the PersistenceManager will be properly closed.

2.6.27. kodo.PersistentClasses

Property name: kodo.PersistentClasses

Configuration API: kodo.conf.JDOConfiguration.getPersistentClasses

Resource adaptor config-property: PersistentClasses

Default: -

Description: A comma-separated list of classes that are to be instantiated whenever a new PersistenceManager is created. This property is optional; you can use it to work around a known deficiency in the JDO specification whereby locating a persistent instance by application identity is not possible until the class of the instance has been loaded by the JVM.

This property is also used to optimize subclass identification: normally, the standard class indicator identifies subclasses by issuing a SELECT DISTINCT <class indicator column> query the first time a base class is used. If you specify this property, however, then the given list is used to calculate subclasses instead.

If this property is used, you must list all persistent classes. Failure to do so will result in a warning being logged, and may disrupt the inheritance system.

2.6.28. kodo.ProxyManagerClass

Property name: kodo.ProxyManagerClass

Configuration API: kodo.conf.JDOConfiguration.getProxyManagerClass

Resource adaptor config-property: ProxyManagerClass

Default: kodo.util.ProxyManagerImpl

Description: The full class name of a kodo.util.ProxyManager to use for proxying mutable second class objects. The default proxy manager supports java.util.Date and all Collection and Map types in the java.util package.

2.6.29. kodo.ProxyManagerProperties

Property name: kodo.ProxyManagerProperties

Configuration API: kodo.conf.JDOConfiguration.getProxyManagerProperties

Resource adaptor config-property: ProxyManagerProperties

Default: -

Description: Configuration properties for the ProxyManager plugin.

2.6.30. kodo.QueryCacheClass

Property name: kodo.QueryCacheClass

Configuration API: kodo.conf.JDOConfiguration.getQueryCacheClass

Resource adaptor config-property: QueryCacheClass

Default: -

Description: The full class name of a kodo.datacache.query.QueryCache implementation to use for caching of queries loaded from the data store.

2.6.31. kodo.QueryCacheProperties

Property name: kodo.QueryCacheProperties

Configuration API: kodo.conf.JDOConfiguration.getQueryCacheProperties

Resource adaptor config-property: QueryCacheProperties

Default: -

Description: Configuration properties for the QueryCache plugin.

2.6.32. kodo.RemoteCommitProviderClass

Property name: kodo.RemoteCommitProviderClass

Configuration API: kodo.conf.JDOConfiguration.getRemoteCommitProviderClass

Resource adaptor config-property: RemoteCommitProviderClass

Default: -

Description: The full class name of a kodo.event.RemoteCommitProvider implementation to use for distributed event notification.

2.6.33. kodo.RemoteCommitProviderProperties

Property name: kodo.RemoteCommitProviderProperties

Configuration API: kodo.conf.JDOConfiguration.getRemoteCommitProviderProperties

Resource adaptor config-property: RemoteCommitProviderProperties

Default: -

Description: Configuration properties for the RemoteCommitProvider plugin.

2.6.34. kodo.ResultListClass

Property name: kodo.ResultListClass

Configuration API: kodo.conf.JDOConfiguration.getResultListClass

Resource adaptor config-property: ResultListClass

Default: -

Description: The name of the class to use as the List implementation that holds query results and extents. By default, this value will be dependant on whether the JDBC driver supports scrollable cursors, but can be overridden by expicitely setting this property. The class must implement the com.solarmetric.rop.ResultList interface. The following built-in implementations are available:

  • com.solarmetric.rop.EagerResultList : This implementation will instantiate all the results immediately, and free the underlying data store resource. This is the default that will be used when the underlying JDBC driver does not support scrolling result sets.

  • com.solarmetric.rop.OnDemandForwardResultList : This implementation is never used by default. It can be used when scrolling result sets incur a large performance penalty, but support for large result sets is still desired. It instantiates requested elements on demand in a forward-only fashion.

    [Warning]Warning

    Since this result list implementation is instantiated in a forward-only fashion, the size of the collection will be reported incorrectly until the all of the results have been completely instantiated. This can lead to problems with code that relies on the correct size of a collection, including many of the contracts defined by the java.util.Collection interface. Until the results are completely instantiated, the size will return Integer.MAX_VALUE, per the JDO specification.

  • com.solarmetric.rop.LazyResultList : This implementation will keep open the datastore resource in order to provide random access to potentially large result lists. It is used by default when the JDBC driver supports scrolling result sets.

2.6.35. kodo.ResultListProperties

Property name: kodo.ResultListProperties

Configuration API: kodo.conf.JDOConfiguration.getResultListProperties

Resource adaptor config-property: ResultListProperties

Default: -

Description: Configuration properties for the ResultList plugin.

2.6.36. kodo.TransactionMode

Property name: kodo.TransactionMode

Configuration API: kodo.conf.JDOConfiguration.getTransactionMode

Resource adaptor config-property: TransactionMode

Default: local

Description: The default transaction mode to use when obtaining a persistence manager. Legal values are:

  • local: Perform transaction operations locally.

  • managed: Integrate with the application server's managed global transactions.

  • xa: Integrate with the application server's managed XA transactions. In this mode, the persistence manager will not invoke commit on the underlying connection, but will allow the current XA-compliant global transaction to handle the commit. This should only be used in managed environments where an XADataSource is being used.

The transaction mode can also be specified when obtaining an individual Kodo JDO persistence manager.

2.6.37. kodo.jdbc.AutoIncrementConstraints

Property name: kodo.jdbc.AutoIncrementConstraints

Configuration API: kodo.conf.JDOConfiguration.getAutoIncrementConstraints

Resource adaptor config-property: AutoIncrementConstraints

Default: false

Description: Whether to order SQL to meet dependencies introduced by relations to objects with auto-incrementing primary key values. You can use Kodo's auto-increment support without setting this value to true if your auto-incrementing fields are not primary key fields, or if none of your objects have relations to classes with auto-incrementing primary keys. Otherwise, however, you must set this property to true so that Kodo can make sure all auto-incrementing primary keys have their final values set before flushing foreign keys with those values.

2.6.38. kodo.jdbc.ClassIndicatorClass

Property name: kodo.jdbc.ClassIndicatorClass

Configuration API: kodo.jdbc.conf.JDBCConfiguration.getClassIndicatorClass

Resource adaptor config-property: ClassIndicatorClass

Default: in-class-name

Description: The shortened type name or full class name of the default ClassIndicator to install on new mappings. Class indicators are discussed here.

2.6.39. kodo.jdbc.ConnectionDecoratorClasses

Property name: kodo.jdbc.ConnectionDecoratorClasses

Configuration API: kodo.jdbc.conf.JDBCConfiguration.getConnectionDecoratorClasses

Resource adaptor config-property: ConnectionDecoratorClasses

Default: -

Description: A comma-separated list of full class names of com.solarmetric.jdbc.ConnectionDecorator instances to install. These decorators can wrap connections passed from the underlying data source to add functionality. Kodo will pass all connections through the list of decorators before using them. Note that by default Kodo JDO employs all of the built-in decorators in the com.solarmetric.jdbc package already; you do not need to list them here.

2.6.40. kodo.jdbc.ConnectionDecoratorProperties

Property name: kodo.jdbc.ConnectionDecoratorProperties

Configuration API: kodo.jdbc.conf.JDBCConfiguration.getConnectionDecoratorProperties

Resource adaptor config-property: ConnectionDecoratorProperties

Default: -

Description: A comma-separated list of properties strings for the classes in the ConnectionDecoratorClasses property.

2.6.41. kodo.jdbc.DBDictionaryClass

Property name: kodo.jdbc.DBDictionaryClass

Configuration API: kodo.jdbc.conf.JDBCConfiguration.getDBDictionaryClass

Resource adaptor config-property: DBDictionaryClass

Default: based on the javax.jdo.option.ConnectionURL

Description: The full class name of the kodo.jdbc.sql.DBDictionary to use for database interaction. Kodo JDO typically auto-configures the dictionary based on the JDBC URL, but you may have to set this property explicitly if you are using an unrecognized driver, or to plug in your own dictionary for a database Kodo JDO does not support out-of-the-box.

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 DBDictionary plugin, which declares the API necessary to abstract away the idiosyncrasies of an individual database vendor. Each supported database has its own dictionary:

2.6.42. kodo.jdbc.DBDictionaryProperties

Property name: kodo.jdbc.DBDictionaryProperties

Configuration API: kodo.jdbc.conf.JDBCConfiguration.getDBDictionaryProperties

Resource adaptor config-property: DBDictionaryProperties

Default: -

Description: Configuration properties for the DBDictionary plugin. The standard dictionaries recognize the following properties:

  • StoreLargeNumbersAsStrings: Many databases have limitations on the number of digits can can be stored in a numeric field (for example, Oracle can only store 38 digits). For applications that operate on very large BigInteger and BigDecimal values, it may be necessary to store these objects as string fields rather than the database's numeric type. Note that this may prevent meaningful numeric queries from being executed against the database. Defaults to false.

  • StoreCharsAsNumbers: Set this property to true to store Java char fields as numbers rather than CHAR values. Defaults to false.

  • SimulateLocking: Some databases do not support pessimistic locking, which will result in a JDOException when a pessimistic transaction is attempted. Setting this property to true will bypass the locking check to allow pessimistic transactions even on databases that do not support locking. Defaults to false.

  • JoinSyntax: The SQL join syntax to use in select statements. The available settings are:

    • traditional: Traditional SQL join syntax; outer joins are not supported.

    • database: The database's native join syntax. Databases that do not have a native syntax will default to one of the other options.

    • sql92: ANSI SQL92 join syntax. Outer joins are supported. Not all databases support this syntax.

  • BatchLimit: The maximum number of SQL update statements to batch together. Set to 0 to disable SQL batching.

  • SystemTables: Comma-separated list of table names that should be excluded when reflecting on the database. This list will be added to the default list of system tables, which is database-dependent.

  • SystemSchemas: Comma-separated list of schema names that should be excluded when reflecting on the database. This list will be added to the default list of system schemas, which is database-dependent.

The MySQLDictionary also understands the following properties:

  • TableType: The MySQL table type to use when creating tables.

2.6.43. kodo.jdbc.ForeignKeyConstraints

Property name: kodo.jdbc.ForeignKeyConstraints

Configuration API: kodo.conf.JDOConfiguration.getForeignKeyConstraints

Resource adaptor config-property: ForeignKeyConstraints

Default: false

Description: Whether to evaluate database foreign key constraints and order all SQL operations so that referential integrity is not violated.

2.6.44. kodo.jdbc.JDBCListenerClasses

Property name: kodo.jdbc.JDBCListenerClasses

Configuration API: kodo.jdbc.conf.JDBCConfiguration.getJDBCListenerClasses

Resource adaptor config-property: JDBCListenerClasses

Default: -

Description: A comma-separated list of full class names of com.solarmetric.jdbc.JDBCListener event listeners to install. These listeners will be notified on various JDBC-related events. The com.solarmetric.jdbc.PerformanceTracker is one such listener that can be used to track JDBC performance.

2.6.45. kodo.jdbc.JDBCListenerProperties

Property name: kodo.jdbc.JDBCListenerProperties

Configuration API: kodo.jdbc.conf.JDBCConfiguration.getJDBCListenerProperties

Resource adaptor config-property: JDBCListenerProperties

Default: -

Description: A comma-separated list of properties strings for the classes in the JDBCListenerClasses property.

2.6.46. kodo.jdbc.MappingFactoryClass

Property name: kodo.jdbc.MappingFactoryClass

Configuration API: kodo.jdbc.conf.JDBCConfiguration.getMappingFactoryClass

Resource adaptor config-property: MappingFactoryClass

Default: kodo.jdbc.meta.DBMappingFactory

Description: The full class name of the kodo.jdbc.meta.MappingFactory to use to store and retrieve object-relational mapping information for your persistent classes. Kodo JDO offers several mapping factory plugins:

The Object Relational Mapping chapter of the reference guide provides details on each of these plugins, and how to migrate between them. You can also plug in your own mapping factory implementation.

2.6.47. kodo.jdbc.MappingFactoryProperties

Property name: kodo.jdbc.MappingFactoryProperties

Configuration API: kodo.jdbc.conf.JDBCConfiguration.getMappingFactoryProperties

Resource adaptor config-property: MappingFactoryProperties

Default: -

Description: Configuration properties for the MappingFactory plugin.

2.6.48. kodo.jdbc.SchemaFactoryClass

Property name: kodo.jdbc.SchemaFactoryClass

Configuration API: kodo.jdbc.conf.JDBCConfiguration.getSchemaFactoryClass

Resource adaptor config-property: SchemaFactoryClass

Default: kodo.jdbc.schema.LazySchemaFactory

Description: The full class name of the kodo.jdbc.schema.SchemaFactory to use to store and retrieve information about the database schema. Kodo JDO offers several schema factory plugins:

The Schema Manipulation section of the reference guide provides details on each of these plugins, and how to migrate between them. You can also plug in your own schema factory implementation.

2.6.49. kodo.jdbc.SchemaFactoryProperties

Property name: kodo.jdbc.SchemaFactoryProperties

Configuration API: kodo.jdbc.conf.JDBCConfiguration.getSchemaFactoryProperties

Resource adaptor config-property: SchemaFactoryProperties

Default: -

Description: Configuration properties for the SchemaFactory plugin.

2.6.50. kodo.jdbc.Schemas

Property name: kodo.jdbc.Schemas

Configuration API: kodo.jdbc.conf.JDBCConfiguration.getSchemas

Resource adaptor config-property: Schemas

Default: -

Description: A comma-separated list of the schemas and/or tables used for your persistent JDO-related data. To list a schema, list its name. To list a table, list its full name in the form <schema-name>.<table-name>. If a table does not have a schema or you do not know its schema, list its name as .<table-name> (notice the preceding '.'). For example, to list the BUSOBJS schema, the ADDRESS table in the GENERAL schema, and the SYSTEM_INFO table, regardless of what schema it is in, use the string:

BUSOBJS GENERAL.ADDRESS .SYSTEM_INFO

Some Kodo JDO tools reflect on the database, and this list can be used to limit the schemas they examine. Additionally, if this property is specified then Kodo JDO will place any new tables it needs to create in the first schema listed.

[Note]Note

Some databases are case-sensitive with respect to schema and table names. Oracle, for example, requires names in all upper case.

2.6.51. kodo.jdbc.SequenceFactoryClass

Property name: kodo.jdbc.SequenceFactoryClass

Configuration API: kodo.jdbc.conf.JDBCConfiguration.getSequenceFactoryClass

Resource adaptor config-property: SequenceFactoryClass

Default: kodo.jdbc.schema.DBSequenceFactory . This implementation obtains sequence numbers from a special database table used solely for this purpose. The table is created automatically when the mappingtool is run.

Description: The full class name of the kodo.jdbc.schema.SequenceFactory to use to generate datastore identity values. An example SequenceFactory implementation is included in the source code directory of your Kodo JDO installation. Built-in sequence factory options are discussed here.

2.6.52. kodo.jdbc.SequenceFactoryProperties

Property name: kodo.jdbc.SequenceFactoryProperties

Configuration API: kodo.jdbc.conf.JDBCConfiguration.getSequenceFactoryProperties

Resource adaptor config-property: SequenceFactoryProperties

Default: -

Description: Configuration properties for the SequenceFactory plugin. See the plugin class' Javadoc for details on the available bean properties to set.

2.6.53. kodo.jdbc.SubclassMappingClass

Property name: kodo.jdbc.SubclassMappingClass

Configuration API: kodo.jdbc.conf.JDBCConfiguration.getSubclassMappingClass

Resource adaptor config-property: SubclassMappingClass

Default: flat

Description: The shortened type name or full class name of the default ClassMapping to install on new subclass mappings. Class mappings are discussed here.

2.6.54. kodo.jdbc.TransactionIsolation

Property name: kodo.jdbc.TransactionIsolation

Configuration API: kodo.conf.JDOConfiguration.getTransactionIsolation

Resource adaptor config-property: TransactionIsolation

Default: Use the JDBC driver's default isolation.

Description: The JDBC transaction isolation level to use. Legal values are:

  • none: No transaction isolation.

  • read-committed: Dirty reads are prevented; non-repeatable reads and phantom reads can occur.

  • read-uncommitted: Dirty reads, non-repeatable reads and phantom reads can occur.

  • repeatable-read: Dirty reads and non-repeatable reads are prevented; phantom reads can occur.

  • serializable: Dirty reads, non-repeatable reads, and phantom reads are prevented.

2.6.55. kodo.jdbc.UpdateManagerClass

Property name: kodo.jdbc.UpdateManagerClass

Configuration API: kodo.jdbc.conf.JDBCConfiguration.getUpdateManagerClass

Resource adaptor config-property: UpdateManagerClass

Default: kodo.jdbc.runtime.UpdateManagerImpl

Description: The full class name of the kodo.jdbc.runtime.UpdateManager to use to flush persistent object changes to the data store. The provided default implementation will suit all but the most advanced users.

2.6.56. kodo.jdbc.UpdateManagerProperties

Property name: kodo.jdbc.UpdateManagerProperties

Configuration API: kodo.jdbc.conf.JDBCConfiguration.getUpdateManagerProperties

Resource adaptor config-property: UpdateManagerProperties

Default: none

Description: Configuration properties for the UpdateManager plugin.

2.6.57. kodo.jdbc.VersionIndicatorClass

Property name: kodo.jdbc.VersionIndicatorClass

Configuration API: kodo.jdbc.conf.JDBCConfiguration.getVersionIndicatorClass

Resource adaptor config-property: VersionIndicatorClass

Default: version-number

Description: The shortened type name or full class name of the default VersionIndicator to install on new mappings. Version indicators are discussed here.