JPOX
JPOX
 Project  |  Ver 1.1  |  Ver 1.2  |  JDO  |  JPA  |  Guides  |  Tools
1.2 | Persistence | JDO ORM | JPA ORM | Runtime | JDO Runtime | JPA Runtime | Extensions | Developer
JPOX Runtime
RDBMS Datastores
DB4O Datastore
Persistence Properties

Any JDO-enabled application will require at least one PersistenceManagerFactory which accepts properties to define its capabilities. Any JPA-enabled application will require at least one EntityManagerFactory which also accepts properties to define its capabilities. JPOX provides a large number of properties for use with either JDO or JPA.

Use of the following properties gives you more control over the operations of JPOX, but bear in mind that these properties are only for use with JPOX and will not work with other JDO/JPA implementations.

  • General - general properties
  • Schema Control - properties controlling the generation of the datastore schema.
  • Transactions and Locking - properties controlling how transactions operate
  • Caching - properties controlling the behaviour of the cache(s)
  • Identity Generation - properties controlling the generation of object identities
  • MetaData - metadata properties
  • Auto-Start - Auto-Start Mechanism properties
  • Query - properties controlling the behaviour of queries
  • JPA - properties allowing extra functionality with JPA.

Please note that there are additional persistence properties for each supported datastore. See RDBMS and DB4O

General
org.jpox.ConnectionFactory
DescriptionInstance of a connection factory. For RDBMS, it must be an instance of javax.sql.DataSource. See Data Sources. This is for a transactional DataSource
Range of Values


org.jpox.ConnectionFactory2
DescriptionInstance of a connection factory. For RDBMS, it must be an instance of javax.sql.DataSource. See Data Sources. This is for a non-transactional DataSource
Range of Values


org.jpox.ConnectionFactoryName
DescriptionThe JNDI name for a connection factory. For RBDMS, it must be a JNDI name that points to a javax.sql.DataSource object. See Data Sources. This is for a transactional DataSource
Range of Values


org.jpox.ConnectionFactory2Name
DescriptionThe JNDI name for a connection factory. For RBDMS, it must be a JNDI name that points to a javax.sql.DataSource object. See Data Sources. This is for a non-transactional DataSource
Range of Values


org.jpox.ConnectionDriverName
DescriptionThe name of the (JDBC) driver to use for the DB
Range of Values


org.jpox.ConnectionDriverURL
DescriptionURL specifying the datastore to use for persistence
Range of Values


org.jpox.ConnectionUserName
DescriptionUsername to use for connecting to the DB
Range of Values


org.jpox.ConnectionPassword
DescriptionPassword to use for connecting to the DB
Range of Values


org.jpox.IgnoreCache
DescriptionWhether to ignore the cache for queries
Range of Valuestrue | false


org.jpox.Multithreaded
DescriptionWhether to run the PersistenceManager multithreaded
Range of Valuestrue | false


org.jpox.NontransactionalRead
DescriptionWhether to allow nontransactional reads
Range of Valuestrue | false


org.jpox.NontransactionalWrite
DescriptionWhether to allow nontransactional writes
Range of Valuestrue | false


org.jpox.Optimistic
DescriptionWhether to use Optimistic transactions
Range of Valuestrue | false


org.jpox.RetainValues
DescriptionWhether to suppress the clearing of values from persistent instances on transaction completion
Range of Valuestrue | false


org.jpox.RestoreValues
DescriptionWhether persistent object have transactional field values restored when transaction rollback occurs.
Range of Valuestrue | false


org.jpox.Catalog
DescriptionName of the catalog to use by default for all classes persisted using this PMF/EMF. This can be overridden in the MetaData where required, and is optional. JPOX will prefix all table names with this catalog name if the RDBMS supports specification of catalog names in DDL. RDBMS datastores only
Range of Values


org.jpox.Schema
DescriptionName of the schema to use by default for all classes persisted using this PMF/EMF. This can be overridden in the MetaData where required, and is optional. JPOX will prefix all table names with this schema name if the RDBMS supports specification of schema names in DDL. RDBMS datastores only
Range of Values


org.jpox.DetachAllOnCommit
DescriptionAllows the user to select that when a transaction is committed all objects enlisted in that transaction will be automatically detached.
Range of Valuestrue | false


org.jpox.TransactionType
DescriptionType of transaction to use. If running under J2SE the default is RESOURCE_LOCAL, and if running under J2EE the default is JTA.
Range of ValuesRESOURCE_LOCAL | JTA


org.jpox.ServerTimeZoneID
DescriptionId of the TimeZone under which the datastore server is running. If this is not specified or is set to null it is assumed that the datastore server is running in the same timezone as the JVM under which JPOX is running. From JPOX 1.2.0-beta-2
Range of Values


org.jpox.CopyOnAttach
DescriptionWhether, when attaching a detached object, we create an attached copy or simply migrate the detached object to attached state
Range of Valuestrue | false






org.jpox.storeManagerType
DescriptionType of the StoreManager to use for this PMF/EMF. This has typical values of "rdbms", "db4o". If it isnt specified then it falls back to trying to find the StoreManager from the connection URL. The associated JPOX plugin has to be in the CLASSPATH when selecting this. When using data sources (as usually done in a JavaEE container), JPOX cannot find out the correct type automatically and this option must be set.
Range of Valuesrdbms | db4o | alternate StoreManager key


org.jpox.managedRuntime
DescriptionWhether to allow management of the runtime of JPOX. Allows hooking in JMX. Please refer to the Management Guide
Range of Valuestrue | false


org.jpox.deletionPolicy
DescriptionAllows the user to decide the policy when deleting objects. The default is "JDO2" which firstly checks if the field is dependent and if so deletes dependents, and then for others will null any foreign keys out. The problem with this option is that it takes no account of whether the user has also defined <foreign-key> elements, so we provide a "JPOX" mode that does the dependent field part first and then if a FK element is defined will leave it to the FK in the datastore to perform any actions, and otherwise does the nulling.
Range of ValuesJDO2 | JPOX


org.jpox.findObjectCheckInheritance
DescriptionWhen retrieving an object by identity JPOX can do a check on the inheritance level of the object. In many cases this check is not adding anything since the id implies the inheritance level. This allows the user to turn off the check.
Range of Valuestrue | false


org.jpox.attachSameDatastore
DescriptionWhen attaching an object JPOX by default makes no assumption about which datastore the object was detached from and so makes a check for existence before attaching each object. This option allows you to turn off that check when you know you are detaching and attaching using the same datastore.
Range of Valuesfalse | true


org.jpox.detachOnClose
DescriptionThis allows the user to specify whether, when a PersistenceManager is closed, that all objects in the L1 cache are automatically detached. Users are recommended to not use this option, and instead use the JDO2 standard javax.jdo.option.DetachAllOnCommit. This option may be removed in a later release.
Range of Valuesfalse | true


org.jpox.manageRelationships
DescriptionThis allows the user control over whether JPOX will try to manage bidirectional relations, correcting the input objects so that all relations are consistent. This process runs when flush()/commit() is called. This is introduced after 1.2.0-beta-4. You can set it to false if you always set both sides of a relation when persisting/updating.
Range of Valuestrue | false


org.jpox.manageRelationshipsChecks
DescriptionThis allows the user control over whether JPOX will make consistency checks on bidirectional relations. If "org.jpox.managedRelationships" is not selected then no checks are performed. If a consistency check fails at flush()/commit() then a JDOUserException is thrown. This is introduced after 1.2.0-beta-4. You can set it to false if you want to omit all consistency checks.
Range of Valuestrue | false


org.jpox.persistenceByReachabilityAtCommit
DescriptionWhether to run the "persistence-by-reachability" algorithm at commit() time. This means that objects that were reachable at a call to makePersistent() but that are no longer persistent will be removed from persistence. For performance improvements, consider turning this off.
Range of Valuestrue | false


org.jpox.maxFetchDepth
DescriptionSpecifies the default maximum fetch depth to use for fetching operations. The JDO2 specification defines a default of 1, and this is the JPOX default, meaning that only the first level of related objects will be fetched by default.
Range of Values-1 | 1 | positive integer (non-zero)


org.jpox.classLoaderResolverName
DescriptionName of a ClassLoaderResolver to use in class loading. JPOX provides a default that implements the JDO2 specification for class loading. This property allows the user to override this with their own class better suited to their own loading requirements.
Range of Valuesjdo | {name of class-loader-resolver plugin}


org.jpox.primaryClassLoader
DescriptionSets a primary classloader for situations where a primary classloader is not accessible. This ClassLoader is used when the class is not found in the default ClassLoader search path. As example, when the database driver is loaded by a different ClassLoader not in the ClassLoader search path for JDO or JPA specifications.
Range of Valuesinstance of java.lang.ClassLoader


org.jpox.implementationCreatorName
DescriptionSymbolic name of an implementation creator for "persistent interfaces" (JDO2). JPOX provides two creators, one using BCEL and the other using ASM. Please note that you should have the JPOX Enhancer in the CLASSPATH together with either BCEL or ASM to use "persistent interfaces".
Range of Valuesasm | bcel


org.jpox.plugin.pluginRegistryClassName
DescriptionName of a class that acts as registry of plug-ins.
Range of Values{fully-qualified class name}


org.jpox.plugin.pluginRegistryBundleCheck
DescriptionDefines what happens when plugin bundles are found and are duplicated
Range of ValuesEXCEPTION | LOG | NONE






Schema Control
org.jpox.datastoreAdapterClassName
DescriptionThis property allows you to supply the class name of the adapter to use for your datastore. The default is not to specify this property and JPOX will autodetect the datastore type and use its own internal datastore adapter classes. This allows you to override the default behaviour where there maybe is some issue with the default adapter class.
Range of Values(valid class name on the CLASSPATH)


org.jpox.autoCreateSchema
DescriptionWhether to automatically generate any tables and constraints that don't exist. Please refer to the RDBMS Schema Guide for more details.
Range of Valuestrue | false


org.jpox.autoCreateTables
DescriptionWhether to automatically generate any tables that don't exist. Please refer to the RDBMS Schema Guide for more details.
Range of Valuestrue | false


org.jpox.autoCreateColumns
DescriptionWhether to automatically generate any columns that don't exist. Please refer to the RDBMS Schema Guide for more details.
Range of Valuestrue | false


org.jpox.autoCreateConstraints
DescriptionWhether to automatically generate any constraints that don't exist. Please refer to the RDBMS Schema Guide for more details.
Range of Valuestrue | false


org.jpox.autoCreateWarnOnError
DescriptionWhether to only log a warning when errors occur during the auto-creation/validation process. Please use with care since if the schema is incorrect errors will likely come up later and this will postpone those error checks til later, when it may be too late!!
Range of Valuestrue | false


org.jpox.validateTables
DescriptionWhether to validate tables against the persistence definition. Please refer to the RDBMS Schema Guide for more details.
Range of Valuestrue | false


org.jpox.validateColumns
DescriptionWhether to validate columns against the persistence definition. This refers to the column detail structure and NOT to whether the column exists or not. Please refer to the RDBMS Schema Guide for more details.
Range of Valuestrue | false


org.jpox.validateConstraints
DescriptionWhether to validate table constraints against the persistence definition. Please refer to the Schema Guide for more details.
Range of Valuestrue | false


org.jpox.readOnlyDatastore
DescriptionWhether the datastore is read-only or not (fixed in structure and contents).
Range of Valuestrue | false


org.jpox.readOnlyDatastoreAction
DescriptionWhat happens when a datastore is read-only and an object is attempted to be persisted.
Range of ValuesEXCEPTION | IGNORE


org.jpox.fixedDatastore
DescriptionWhether the datastore is fixed in structure or not.
Range of Valuestrue | false


org.jpox.identifierFactory
DescriptionName of the identifier factory to use when generating table/column names etc. See also the JDO RDBMS Identifier Guide.
Range of Valuesjpox | jpox2 | jpa | {user-plugin-name}


org.jpox.identifier.case
DescriptionWhich case to use in generated table and column names. See also the JDO RDBMS Identifier Guide.
Range of ValuesUpperCase | LowerCase | PreserveCase


org.jpox.identifier.wordSeparator
DescriptionSeparator character(s) to use between words in generated identifiers. Defaults to "_" (underscore)


org.jpox.identifier.tablePrefix
DescriptionPrefix to be prepended to all generated table names (if the identifier factory supports it)


org.jpox.identifier.tableSuffix
DescriptionSuffix to be appended to all generated table names (if the identifier factory supports it)


org.jpox.defaultInheritanceStrategy
DescriptionHow to choose the inheritance strategy default for classes where no strategy has been specified. With JDO2 this will be "new-table" for base classes and "superclass-table" for subclasses. With JPOX this will be "new-table" for all classes.
Range of ValuesJDO2 | JPOX






Transactions and Locking
org.jpox.transactionIsolation
DescriptionSelect the default JDBC transaction isolation level for ALL PersistenceManager factories - case insensitive, and spaces/underscores are treated the same. Some databases do not support all isolation levels, refer to your database documentation. Please refer to the Transactions Guide
Range of ValuesREAD_UNCOMMITTED | READ_COMMITTED | REPEATABLE_READ | SERIALIZABLE


org.jpox.jtaLocator
DescriptionSelects the locator to use when using JTA transactions so that JPOX can find the JTA TransactionManager. If this isn't specified and using JTA transactions JPOX will search all available locators which could have a performance impact. See JTA Locator extension. If specifying "custom_jndi" please also specify "org.jpox.jtaJndiLocation"
Range of Valuesjboss | jonas | jotm | oc4j | orion | resin | sap | sun | weblogic | websphere | custom_jndi | alias of a JTA transaction locator
Since1.2.0-beta-2


org.jpox.jtaJndiLocation
DescriptionName of a JNDI location to find the JTA transaction manager from (when using JTA transactions). This is for the case where you know where it is located. If not used JPOX will try certain well-known locations
Range of ValuesJNDI location
Since1.2.0-beta-4


org.jpox.datastoreTransactionDelayOperations
DescriptionFor use when using datastore transactions and has the effect of delaying datastore operations until flush()/commit()
Range of valuestrue | false


org.jpox.datastoreTransactionFlushLimit
DescriptionFor use when using datastore transactions and is the limit on number of dirty objects before a flush to the datastore will be performed.
Range of values1 | positive integer


org.jpox.connectionPoolingType
DescriptionThis property allows you to utilise a 3rd party software package for enabling connection pooling using a JPOX plugin. Currently JPOX supports use of DBCP, C3P0 or Proxool. You must have the plugin and the related 3rd party JARs in your CLASSPATH to use this option. Please refer to the RDBMS Connection Pooling guide for details.
Range of ValuesNone | DBCP | C3P0 | Proxool


org.jpox.connectionPoolingConfigurationFile
DescriptionAllows specification of configuration properties for controlling the connection pooling when you have specified the org.jpox.connectionPoolingType above.
Range of ValuesFilename present in the CLASSPATH


org.jpox.connection.resourceType
DescriptionResource Type for connection ???
Range of ValuesJTA | RESOURCE_LOCAL


org.jpox.connection.resourceType2
DescriptionResource Type for connection 2
Range of ValuesJTA | RESOURCE_LOCAL






Caching
org.jpox.cache.collections
DescriptionSCO collections can be used in 2 modes in JPOX. You can allow JPOX to cache the collections contents, or you can tell JPOX to access the datastore for every access of the SCO collection. The default is to use the cached collection.
Range of Valuestrue | false


org.jpox.cache.collections.lazy
DescriptionWhen using cached collections/maps, the elements/keys/values can be loaded when the object is initialised, or can be loaded when accessed (lazy loading). The default is to use lazy loading when the field is not in the current fetch group, and to not use lazy loading when the field is in the current fetch group.
Range of Valuestrue | false


org.jpox.cache.level1.type
DescriptionName of the type of Level 1 cache to use. Defines the backing map.
Range of Valuesweak | soft | hard | {your-plugin-name}


org.jpox.cache.level2
DescriptionWhether to use a Level 2 Cache with this Persistence Manager Factory.
Range of Valuestrue | false


org.jpox.cache.level2.type
DescriptionName of the type of Level 2 Cache to use. Can be used to interface with external caching products.
Range of ValuesDEFAULT | SOFT | Tangosol | EHCache | EHCacheClassBased | OSCache | SwarmCache | {your-plugin-name}


org.jpox.cache.level2.cacheName
DescriptionName of the cache. This is for use with plugins such as the Tangosol cache plugin for accessing the particular cache. Please refer to the Cache Guide
Range of Valuesyour cache name


org.jpox.cache.level2.configurationFile
DescriptionThe path to the configuration file. e.g. /cache.xml The file must be in the classpath and will be looked up as a java resource. Please refer to the Cache Guide
Range of Valuesyour configuration file






Identity/Value Generation
org.jpox.datastoreIdentityClassName
DescriptionWhich "datastore-identity" class plugin to use to represent datastore identities. Refer to Datastore Identity extensions for details.
Range of Valuesjpox | {user-supplied plugin}


org.jpox.poid.transactionAttribute
DescriptionWhether to use the PM connection or open a new connection. Only used by POID generators that require a connection to the datastore.
Range of ValuesNew | UsePM


org.jpox.poid.transactionIsolation
DescriptionSelect the default JDBC transaction isolation level for transactions used by identity generation. Must have org.jpox.poid.transactionAttribute set to New. Case insensitive, and spaces/underscores are treated the same. Some databases do not support all isolation levels, refer to your database documentation. Please refer to the Transactions Guide
Range of ValuesREAD_UNCOMMITTED | READ_COMMITTED | REPEATABLE_READ | SERIALIZABLE






MetaData
org.jpox.metadata.jdoFileExtension
DescriptionSuffix for JDO MetaData files. Provides the ability to override the default suffix and also to have one PMF with one suffix and another with a different suffix, hence allowing differing persistence of the same classes using different PMF's.
Range of valuesjdo | {file suffix}


org.jpox.metadata.ormFileExtension
DescriptionSuffix for ORM MetaData files. Provides the ability to override the default suffix and also to have one PMF with one suffix and another with a different suffix, hence allowing differing persistence of the same classes using different PMF's.
Range of valuesorm | {file suffix}


org.jpox.metadata.jdoqueryFileExtension
DescriptionSuffix for JDO Query MetaData files. Provides the ability to override the default suffix and also to have one PMF with one suffix and another with a different suffix, hence allowing differing persistence of the same classes using different PMF's.
Range of valuesjdoquery | {file suffix}


org.jpox.metadata.validate
DescriptionWhether to validate the MetaData file(s) for XML correctness (against the DTD) when parsing
Range of valuestrue | false


org.jpox.metadata.annotationsManager
DescriptionClass name for the annotations manager
Range of valuesorg.jpox.metadata.annotations.AnnotationManagerImpl | {class-name}






Auto-Start
org.jpox.autoStartMechanism
DescriptionHow to initialise JPOX at startup. This allows JPOX to read in from some source the classes that it was persisting for this data store the previous time. "XML" stores the information in an XML file for this purpose. "SchemaTable" stores a table in the RDBMS for this purpose. "Classes" looks at the property org.jpox.autoStartClassNames for a list of classes. The other option is "None" (start from scratch each time). Please refer to the Auto-Start Mechanism Guide for more details. The default for RDBMS is "SchemaTable". The default for "DB4O" is "None".
Range of ValuesXML | SchemaTable | Classes | None | SchemaTable2


org.jpox.autoStartMechanismMode
DescriptionThe mode of operation of the auto start mode. Currently there are 3 values. "Quiet" means that at startup if any errors are encountered, they are fixed quietly. "Ignored" means that at startup if any errors are encountered they are just ignored. "Checked" means that at startup if any errors are encountered they are thrown as exceptions.
Range of valuesChecked | Ignored | Quiet


org.jpox.autoStartMechanismXmlFile
DescriptionFilename used for the XML file for AutoStart when using "XML" Auto-Start Mechanism


org.jpox.autoStartClassNames
DescriptionThis property specifies a list of classes (comma-separated) that are loaded at startup when using the "Classes" Auto-Start Mechanism.






Query control
org.jpox.query.timeout
DescriptionThe timeout to apply to all queries (seconds). This also will apply to all fetch statements - for example when retrieving objects using PM.getObjectById().
Range of Values0 | A positive value (seconds)


org.jpox.query.flushBeforeExecution
DescriptionThis property can enforce a flush to the datastore of any outstanding changes just before executing all queries. If using optimistic transactions any updates are typically held back until flush/commit and so the query would otherwise not take them into account.
Range of Valuestrue | false


org.jpox.query.useFetchPlan
DescriptionWhether to use the FetchPlan when executing a JDOQL query. The default is to use it which means that the relevant fields of the object will be retrieved. This allows the option of just retrieving the identity columns.
Range of Valuestrue | false






JPA
org.jpox.jpa.oneToManyUniFkRelations
DescriptionStrict JPA1 behaviour doesnt permit a 1-N unidirectional FK relation - must have a join table. Setting this property to true means that JPOX will allow this relation, overriding this shortsighted JPA specification behaviour
Range of Valuesfalse | true