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.
Property name: com.solarmetric.kodo.CacheReferenceSize
Configuration API: com.solarmetric.kodo.conf.Configuration.getCacheReferenceSize
Resource adaptor config-property: CacheReferenceSize
Default:1000
Description: The number of hard references to cached objects that the PersistenceManager's cache will retain (in addition to the soft reference cache that it maintains). Setting this to a higher value will result in more objects being retained in the cache, at the cost of utilizing more memory resources. Setting this to -1 will cause all loaded objects to have hard references.
Property name: com.solarmetric.kodo.ConnectionProperties
Configuration API: com.solarmetric.kodo.conf.Configuration.getConnectionProperties
Resource adaptor config-property: ConnectionProperties
Default: none
Description: A space-separated list of properties to be passed to the JDBC Driver when obtaining a Connection. Properties are of the form "key=value".
Example 2.1. Specifying Connection Properties
com.solarmetric.kodo.ConnectionProperties: serverName=myserver port=1266
If a javax.sql.DataSource class is defined in the javax.jdo.option.ConnectionDriverName property, then this property will be used to set bean-like properties in the DataSource instance upon creation. These properties vary depending on the DataSource in use: see the documentation for your DataSource for details on the properties to use.
Property name: com.solarmetric.kodo.DataCacheClass
Configuration API: com.solarmetric.kodo.conf.Configuration.getDataCacheClass
Resource adaptor config-property: 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.
Property name: com.solarmetric.kodo.DataCacheProperties
Configuration API: com.solarmetric.kodo.conf.Configuration.getDataCacheProperties
Resource adaptor config-property: 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.
Property name: com.solarmetric.kodo.RemoteCommitProviderClass
Configuration API: com.solarmetric.kodo.conf.Configuration.getRemoteCommitProviderClass
Resource adaptor config-property: RemoteCommitProviderClass
Default: none
Description: The name of the class to use for communicating commit information among JVMs. Must implement com.solarmetric.kodo.runtime.event.RemoteCommitProvider.
Property name: com.solarmetric.kodo.RemoteCommitProviderProperties
Configuration API: com.solarmetric.kodo.conf.Configuration.getRemoteCommitProviderProperties
Resource adaptor config-property: RemoteCommitProviderProperties
Default: none
Description: A space-separated list of properties to pass to the class defined in com.solarmetric.kodo.RemoteCommitProviderClass upon initialization.
Property name: com.solarmetric.kodo.DefaultDataCacheTimeout
Configuration API: com.solarmetric.kodo.conf.Configuration.getDefaultDataCacheTimeout
Resource adaptor config-property: DefaultDataCacheTimeout
Default: 0.0
Description: The number of seconds that data in the data cache is valid for. A value of 0 or less means that by default, cached data does not time out.
Property name: com.solarmetric.kodo.DefaultFetchThreshold
Configuration API: com.solarmetric.kodo.conf.Configuration.getDefaultFetchThreshold
Resource adaptor config-property: 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.
Property name: com.solarmetric.kodo.DefaultFetchBatchSize
Configuration API: com.solarmetric.kodo.conf.Configuration.getDefaultFetchBatchSize
Resource adaptor config-property: DefaultFetchBatchSize
Default: 10
Description: The number of rows that will be pre-fetched when an element in a Query result is accessed.
Property name: com.solarmetric.kodo.EnableQueryExtensions
Configuration API: com.solarmetric.kodo.conf.Configuration.getEnableQueryExtensions
Resource adaptor config-property: 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.
Property name: com.solarmetric.kodo.FetchGroups
Configuration API: com.solarmetric.kodo.conf.Configuration.getFetchGroups
Resource adaptor config-property: FetchGroups
Default: none
Description: A comma-separated list of fetch group names that are to be loaded when loading objects from a data store.
Property name: com.solarmetric.kodo.FlushBeforeQueries
Configuration API: com.solarmetric.kodo.conf.Configuration.getFlushBeforeQueries
Resource adaptor config-property: FlushBeforeQueries
Default: with-connection
Possible values:
true
false
with-connection
Description: Controls whether or not Kodo should automatically flush modifications to the data store before executing queries. Kodo will only flush modifications if javax.jdo.option.IgnoreCache is set to false (not the default) and this property is set to true or with-connection and Kodo detects that the changes made in the current transaction may be involved in the query to be executed.
If FlushBeforeQueries is set to with-connection, then Kodo will only automatically flush if the current PersistenceManager already has a reference to a connection. This means that Kodo will sacrifice query performance in order to not obtain dedicated resources. This option is useful if you use long-lived optimistic transactions and want to ensure that these long-lived transactions will not consume database resources for the life cycle of the transaction. The behavior of Kodo when with-connection is used is dependent upon the current transactional mode and the setting of ConnectionRetainMode.
If IgnoreCache is false, Kodo detects that there may be modifications, and this property is set to false, Kodo will perform queries in-memory.
Below is a table describing 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.1. 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 flush | no flush | no flush | no flush |
IgnoreCache = false; no tx active | no flush | no flush | no flush | no flush |
IgnoreCache = false; datastore tx active | no flush | flush | flush | flush |
IgnoreCache = false; optimistic tx active | no flush | flush | no flush unless flush() has already been invoked | flush |
Property name: com.solarmetric.kodo.LicenseKey
Configuration API: com.solarmetric.kodo.conf.Configuration.getLicenseKey
Resource adaptor config-property: LicenseKey
Default: none
Description: The license key provided to you by SolarMetric. Keys are available at www.solarmetric.com
Property name: com.solarmetric.kodo.PersistenceManagerClass
Configuration API: com.solarmetric.kodo.conf.Configuration.getPersistenceManagerClass
Resource adaptor config-property: 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.
Property name: com.solarmetric.kodo.PersistenceManagerProperties
Configuration API: com.solarmetric.kodo.conf.Configuration.getPersistenceManagerProperties
Resource adaptor config-property: PersistenceManagerProperties
Default: none
Description: A space-separated list of properties to pass to the class defined in com.solarmetric.kodo.PersistenceManagerClass upon initialization.
Property name: com.solarmetric.kodo.ProxyManagerClass
Configuration API: com.solarmetric.kodo.conf.Configuration.getProxyManagerClass
Resource adaptor config-property: 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.
Property name: com.solarmetric.kodo.ProxyManagerProperties
Configuration API: com.solarmetric.kodo.conf.Configuration.getProxyManagerProperties
Resource adaptor config-property: ProxyManagerProperties
Default: none
Description: A space-separated list of properties to pass to the class defined in com.solarmetric.kodo.ProxyManagerClass upon initialization.
Property name: com.solarmetric.kodo.QueryCacheClass
Configuration API: com.solarmetric.kodo.conf.Configuration.getQueryCacheClass
Resource adaptor config-property: QueryCacheClass
Default: none
Description: The name of the class to use for caching of queries loaded from the data store. Must implement com.solarmetric.kodo.runtime.datacache.QueryCache.
Property name: com.solarmetric.kodo.QueryCacheProperties
Configuration API: com.solarmetric.kodo.conf.Configuration.getQueryCacheProperties
Resource adaptor config-property: QueryCacheProperties
Default: none
Description: A space-separated list of properties to pass to the class defined in com.solarmetric.kodo.QueryCacheClass upon initialization. See the caching documentation for details on possible values.
Property name: com.solarmetric.kodo.QueryFilterListeners
Configuration API: com.solarmetric.kodo.conf.Configuration.getQueryFilterListeners
Resource adaptor config-property: 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.
Property name: com.solarmetric.kodo.ResultListClass
Configuration API: com.solarmetric.kodo.conf.Configuration.getResultListClass
Resource adaptor config-property: ResultListClass
Default: none
Description: The name of the class to use as the List implementation that holds Query results. 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.kodo.runtime.objectprovider.CustomResultList interface. The following built-in implementations are available:
com.solarmetric.kodo.runtime.objectprovider.EagerResultList: This implementation will instantiate all the results immediately, and free the underlying datastore resource. This is the default that will be used when the underlying JDBC driver does not support scrolling ResultSets.
com.solarmetric.kodo.runtime.objectprovider.OnDemandForwardResultList: This implementation is never used by default. It can be used when scrolling ResultSets incur a large performance penalty, but support for large ResultSets is still desired. It instantiates requested elements on demand in a forward-only fashion. If the UseWindow configuration property is set to true in the com.solarmetric.kodo.ResultListProperties property, then the list will only hold onto a window-full of references to objects, and will drop references to any lower indices in the list. The window size is defined by the fetch batch size setting of the PersistenceManager when the list is created.
![]() | Warning |
---|---|
Since this ResultList 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 result of OnDemandForwardResultList.size() will be java.lang.Integer.MAX_VALUE. |
com.solarmetric.kodo.impl.jdbc.runtime.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 ResultSets.
Property name: com.solarmetric.kodo.ResultListProperties
Configuration API: com.solarmetric.kodo.conf.Configuration.getResultListProperties
Resource adaptor config-property: ResultListProperties
Default: none
Description: A space-separated list of properties to pass to the class defined in com.solarmetric.kodo.ResultListClass upon initialization.
Property name: com.solarmetric.kodo.TransactionCacheClass
Configuration API: com.solarmetric.kodo.conf.Configuration.getTransactionCacheClass
Resource adaptor config-property: TransactionCacheClass
Default: com.solarmetric.kodo.runtime.FifoStateManagerSet
Description: The name of the class to use to store persistence-capable objects involved in a transaction. Must implement com.solarmetric.kodo.runtime.StateManagerSet. See the StateManagerSet documentation for possible values.
Property name: com.solarmetric.kodo.TransactionCacheProperties
Configuration API: com.solarmetric.kodo.conf.Configuration.getTransactionCacheProperties
Resource adaptor config-property: TransactionCacheProperties
Default: none
Description: A space-separated list of properties to pass to the class defined in com.solarmetric.kodo.TransactionCacheClass upon initialization.
Property name: com.solarmetric.kodo.UseSoftTransactionCache
Configuration API: com.solarmetric.kodo.conf.Configuration.getUseSoftTransactionCache
Resource adaptor config-property: UseSoftTransactionCache
Default: false
Description:Sets whether or not Kodo should maintain soft references to transactional items that have not been dirtied. This can be useful in esoteric situations involving iterating through a massive list of objects within a transaction but only dirtying a couple towards the end of the list. However, there is a noticeable performance impact involved with turning this option on, in particular when loading massive lists of objects into a transaction.
Property name: com.solarmetric.kodo.PersistentTypes
Configuration API: com.solarmetric.kodo.conf.Configuration.getPersistentTypes
Resource adaptor config-property: PersistentTypes
Default: none
Description: A comma-separated list of classes that are to be instantiated whenever a new PersistenceManager is created. This property is optional, but it can be used to get around known deficiencies in the JDO specification whereby locating a persistent instance based in an application id class is not possible until the target persistent class has been loaded by the JVM. This property is also used to optimize datastore subclass identification: normally, subclass location is done by issuing a "SELECT DISTINCT [subclass identifier column]" statement. This property makes that identification unnecessary, which can lead to some performance benefits at initialization time when for very large tables. If this property is set, then all the persistent types in the system must be enumerated; failure to do so will lead to a warning, and may result in a failure to correctly locate subclasses for a persistent inheritance model.
Property name: com.solarmetric.kodo.TransactionMode
Configuration API: com.solarmetric.kodo.conf.Configuration.getTransactionMode
Resource adaptor config-property: TransactionMode
Default: direct
Description: When set to "xa", the PersistenceManager will not pass commit() requests directly to the data store, but will allow the current XA-compliant global transaction to handle the commit. This should only be used in managed environments where XADataSources are being used.
Property name: com.solarmetric.kodo.ConnectionFactory2Properties
Configuration API: com.solarmetric.kodo.conf.Configuration.getConnectionFactory2Properties
Resource adaptor config-property: ConnectionFactory2Properties
Default: none
Description: Enables the configuration of a ConnectionFactory2 without binding it into JNDI. A space-separated list of bean setters for the com.solarmetric.kodo.impl.jdbc.ConnectionFactoryConfiguration instance to configure the ConnectionFactory2, which is used for obtaining datastore identities.
Property name: com.solarmetric.kodo.impl.jdbc.ConnectionRetainMode
Configuration API: com.solarmetric.kodo.impl.jdbc.JDBCConfiguration.getConnectionRetainMode
Resource adaptor config-property: ConnectionRetainMode
Default:on-demand
Description:Controls the association between a PersistenceManager and a JDBC Connection. Possible values:
on-demand: obtain connections as necessary, releasing them as soon as they are no longer needed. When using pessimistic transactions, connections are held for the duration of transactions, so that locks can be obtained correctly -- the behavior is the same as if transaction had been used. If a request for a connection is made while a connection is in use, the same connection will be returned, and an internal reference counter will be incremented. This means that a PM will never use more than one connection (ignoring any connections used by the SequenceFactory). This behavior differs from pre-2.5.3 versions of Kodo. If the old-style on-demand connection retain mode is needed, consider using the legacy-on-demand mode (see below).
transaction: obtain connections on a per-transaction basis. That is, a connection is obtained and used for the duration of each transaction. Nontransactional database accesses will obtain connections on-demand.
persistence-manager: obtain connections on a per-PersistenceManager basis, releasing them when the PersistenceManager is closed. All database accesses will use the same connection.
legacy-on-demand: just like on-demand, except that if multiple nested requests for a connection occur, multiple connections will be fetched from the pool. This is inefficient, and can possibly result in race conditions if the pool size is sufficiently small. This setting should therefore be avoided, and it is likely that this setting will be removed in a future release of Kodo.
Property name: com.solarmetric.kodo.impl.jdbc.ConnectionTestTimeout
Configuration API: com.solarmetric.kodo.impl.jdbc.JDBCConfiguration.getConnectionTestTimeout
Resource adaptor config-property: ConnectionTestTimeout
Default: 10
Description:The number of seconds to wait between testing connections retrieved from the connection pool. Only valid when using the built-in Kodo connection pooling.
Property name: com.solarmetric.kodo.impl.jdbc.DefaultClassMappingClass
Configuration API: com.solarmetric.kodo.impl.jdbc.JDBCConfiguration.getDefaultClassMappingClass
Resource adaptor config-property: DefaultClassMappingClass
Default: com.solarmetric.kodo.impl.jbdc.ormapping.ClassMapping.
Description: The name of the default class to use for mapping persistent classes to the database. Must extend com.solarmetric.kodo.impl.jdbc.ormapping.ClassMapping .
Property name: com.solarmetric.kodo.impl.jdbc.DefaultSubclassProviderClass
Configuration API: com.solarmetric.kodo.impl.jdbc.JDBCConfiguration.getDefaultSubclassProviderClass
Resource adaptor config-property: DefaultSubclassProviderClass
Default: com.solarmetric.kodo.impl.jbdc.ormapping.SubclassProviderImpl. This implementation stores the full classname of each type stored into the database in the indicator column defined in the JDO metadata file.
Description: The name of the default class to use for managing subclass indicator columns. Must implement the com.solarmetric.kodo.impl.jdbc.ormapping.SubclassProvider interface. See custom class indicator documentation for more information about subclass providers.
Property name: com.solarmetric.kodo.impl.jdbc.DefaultSubclassProviderProperties
Configuration API: com.solarmetric.kodo.impl.jdbc.JDBCConfiguration.getDefaultSubclassProviderProperties
Resource adaptor config-property: DefaultSubclassProviderProperties
Default: none
Description: A space-separated list of properties to pass to the class defined in com.solarmetric.kodo.impl.jdbc.DefaultSubclassProviderClass upon initialization.
Property name: com.solarmetric.kodo.impl.jdbc.DictionaryClass
Configuration API: com.solarmetric.kodo.impl.jdbc.JDBCConfiguration.getDictionaryClass
Resource adaptor config-property: 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
Property name: com.solarmetric.kodo.impl.jdbc.DictionaryProperties
Configuration API: com.solarmetric.kodo.impl.jdbc.JDBCConfiguration.getDictionaryProperties
Resource adaptor config-property: 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.
IndexNameGenerator
Default: com.solarmetric.kodo.impl.jdbc.schema.DefaultNameGenerator
Description: The concrete implementation of the com.solarmetric.kodo.impl.jdbc.schema.NameGenerator interface, which controls how index names will be generated.
ColumnNameGenerator
Default: com.solarmetric.kodo.impl.jdbc.schema.DefaultNameGenerator
Description: The concrete implementation of the com.solarmetric.kodo.impl.jdbc.schema.NameGenerator interface, which controls how column names will be generated.
TableNameGenerator
Default: com.solarmetric.kodo.impl.jdbc.schema.DefaultNameGenerator
Description: The concrete implementation of the com.solarmetric.kodo.impl.jdbc.schema.NameGenerator interface, which controls how table names will be generated.
SimulateLocking
Default: false
Description: Some databases do not support pessimistic locking, which will result in a JDOException to be thrown when a datastore transaction is attempted. Setting this parameter to true will bypass this check, and allow a datastore transaction to occur even though the underlying database does not support them.
ValidateConnections
Default: true
Description: Many JDBC drivers do not actually validate the Connection when Connection.isClosed() is issued. When set to true, the dictionary will perform additional validation of a JDBC Connection when retrieving a Connection from the DataSource. This will typically take the form of the issuance of a small SQL statement (such as "SELECT SYSDATE FROM DUAL"). This helps to ensure that Connection instances retrieved from a connection pool are in a valid state.
ValidateConnectionSQL
Default: null
Description: A SQL statement to issue that a Connection instance is in a valid state.
StoreLargeNumbersAsStrings
Default: false
Description: Many databases have limitation on the number of digits can can be stored in a numeric field (for example, Oracle can only store 38 digits). For applications that may be operating 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.
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.
Property name: com.solarmetric.kodo.impl.jdbc.FlatInheritanceMapping
Configuration API: com.solarmetric.kodo.impl.jdbc.JDBCConfiguration.getFlatInheritanceMapping
Resource adaptor config-property: 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.
Property name: com.solarmetric.kodo.impl.jdbc.SequenceFactoryClass
Configuration API: com.solarmetric.kodo.impl.jdbc.JDBCConfiguration.getSequenceFactoryClass
Resource adaptor config-property: 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 when the schematool is run.
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. Simple examples are included in the source directory of your Kodo Installation. Possible values:
com.solarmetric.kodo.impl.jdbc.schema.DBSequenceFactory. A SequenceFactory capable of generating globally unique IDs.
com.solarmetric.kodo.impl.jdbc.schema.ClassDBSequenceFactory. A class-sensitive SequenceFactory. This takes the same options as DBSequenceFactory.
com.solarmetric.kodo.impl.jdbc.schema.TrueSequenceFactory. A SequenceFactory that uses database sequences to obtain globally unique values. This will only work for databases that support direct access and manipulation to database sequences.
com.solarmetric.kodo.impl.jdbc.schema.ClassSequenceFactory. A class-sensitive SequenceFactory that uses database sequences to obtain values. This will only work for databases that support direct access and manipulation to database sequences.
com.solarmetric.kodo.impl.jdbc.schema.AutoIncrementSequenceFactory. A class-sensitive SequenceFactory that uses auto-incrementing primary key columns to obtain values. This will only work with database dictionaries that support auto-incrementing identity columns.
Property name: com.solarmetric.kodo.impl.jdbc.SequenceFactoryProperties
Configuration API: com.solarmetric.kodo.impl.jdbc.JDBCConfiguration.getSequenceFactoryProperties
Resource adaptor config-property: 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 properties:
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.
TableName
Default: JDO_SEQUENCE
Description: The sequence table to look for the sequence values. The default value for this property is JDO_SEQUENCE. Note that tables names will go through the DBDictionary for their ultimate table name.
Property name: com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerClass
Configuration API: com.solarmetric.kodo.impl.jdbc.JDBCConfiguration.getSQLExecutionManagerClass
Resource adaptor config-property: SQLExecutionManagerClass
Default: com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl
Description: The name of a custom SQLExecutionManager to be used for all issuance of SQL to the data store. Must implement com.solarmetric.kodo.impl.jdbc.SQLExecutionManager.
Property name: com.solarmetric.kodo.impl.jdbc.SQLExecutionListenerClass
Configuration API: com.solarmetric.kodo.impl.jdbc.JDBCConfiguration.getSQLExecutionListenerClass
Resource adaptor config-property: SQLExecutionListenerClass
Default: none
Description: A single implementation that will be installed as a custom SQLExecutionListener to listen to all JDBC activity. com.solarmetric.kodo.impl.jdbc.SQLExecutionListener.
Property name: com.solarmetric.kodo.impl.jdbc.StatementCacheMaxSize
Configuration API: com.solarmetric.kodo.impl.jdbc.JDBCConfiguration.getStatementCacheMaxSize
Resource adaptor config-property: StatementCacheMaxSize
Default: 70
Description: The size of the PreparedStatement cache that is maintained in the DataSource implementation. This value is global to the data source, rather than per-connection.
Property name: com.solarmetric.kodo.impl.jdbc.StatementExecutionTimeout
Configuration API: com.solarmetric.kodo.impl.jdbc.JDBCConfiguration.getStatementExecutionTimeout
Resource adaptor config-property: StatementExecutionTimeout
Default: -1
Description: The time, in seconds, after which a JDBC query will be aborted if it has not yet returned any values. This value is simply passed to the JDBC driver's Statement.setTimeout method; Kodo does not perform any addition timeout actions. Note that many JDBC drivers either ignore this request, or improperly handle it, which may result in application deadlocks.
Property name: com.solarmetric.kodo.impl.jdbc.SynchronizeSchema
Configuration API: com.solarmetric.kodo.impl.jdbc.JDBCConfiguration.getSynchronizeSchema
Resource adaptor config-property: SynchronizeSchema
Default: false
Description: If true, the Kodo runtime will automatically attempt to refresh the database schema when persistent classes are referenced, allowing the developer to bypass the schematool step.
![]() | Warning |
---|---|
This property is only intended to be used for development. As automatic schema migration can result in data loss, this feature should never be enabled on a production system. Furthermore, this feature has serious adverse affects on Kodo's runtime performace. Ensure that it is disabled before doing any performance analysis. |
Property name: com.solarmetric.kodo.impl.jdbc.TransactionIsolation
Configuration API: com.solarmetric.kodo.impl.jdbc.JDBCConfiguration.getTransactionIsolation
Resource adaptor config-property: TransactionIsolation
Default: none
Description: Typically, the default transaction isolation provided by a java.sql.Connection will be appropriate for an application. However, it is sometimes desirable to override the default transaction isolation. This property can be used to set the transaction isolation for every transactional connection that is made to the data store. Valid values are:
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
Property name: com.solarmetric.kodo.impl.jdbc.UseBatchedStatements
Configuration API: com.solarmetric.kodo.impl.jdbc.JDBCConfiguration.getUseBatchedStatements
Resource adaptor config-property: UseBatchedStatements
Default: true (provided the underlying JDBC driver's method supportsBatchUpdates() returns true)
Description: Whenever possible, batch together similiar non-selecting SQL statements (INSERT/UPDATE/DELETE) for performance.
Property name: com.solarmetric.kodo.impl.jdbc.UseSQL92Joins
Configuration API: com.solarmetric.kodo.impl.jdbc.JDBCConfiguration.getUseSQL92Joins
Resource adaptor config-property: UseSQL92Joins
Default: database
Description: Set this property to true to make queries use SQL 92-style joins, including left outer joins where appropriate. Note that some databases do not support the SQL 92 standard, but do have a native outer join syntax. For these databases, set the value of this property to database. For databases that only support traditional joins, set this property to false. This property can also be set on a query-by-query basis; see the com.solarmetric.kodo.impl.jdbc.query.JDBCQuery Javadoc for details.
Property name: com.solarmetric.kodo.impl.jdbc.WarnOnPersistentTypeFailure
Configuration API: com.solarmetric.kodo.impl.jdbc.JDBCConfiguration.getWarnOnPersistentTypeFailure
Resource adaptor config-property: 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.
Property name: com.solarmetric.kodo.ee.ManagedRuntimeClass
Configuration API: com.solarmetric.kodo.ee.EEConfiguration.getManagedRuntimeClass
Resource adaptor config-property: 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.
Property name: com.solarmetric.kodo.ee.ManagedRuntimeProperties
Configuration API: com.solarmetric.kodo.ee.EEConfiguration.getManagedRuntimeProperties
Resource adaptor config-property: 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.