OJB.properties Configuration File
OJB provides two different configuration mechanisms:
- An XML based repository.xml is used to define the Object/Relational Mapping. This Mapping is translated into a metadata dictionary at runtime. The metadata layer may also be manipulated at runtime through OJB API calls. Follow this link to learn more about the XML repository.
- A properties file OJB.properties that is responsible for the configuration of the OJB runtime environment. It contains information that does not change at runtime and does not contain O/R mapping related information.
The rest of this document details on this properties file.
By default this file is named OJB.properties and is loaded from the classpath by a J2EE compliant resource lookup:
The filename of the properties file can be changed by setting a Java system property. This can be done programmatically:
or by setting a -D option to the JVM:
java -DOJB.properties=myOwnPropertiesFile.props my.own.ojb.Application
All things that can be configured by OJB.properties are commented in the file itself. Have a look at the default version of this file.
by Thomas Mahler, Armin Waibel