This document describes how properties work for the project.
Because we have 3 main branches in the project source code: common, server and client.
Since some classes in common also need properties AND they dont know if they are being used by server-side or by client-side, specific properties needed to be defined.
So, each of the 3 branches uses a different set of properties through a xxxProperty class:
org.freebxml.omar.common.CommonProperties
for commonorg.freebxml.omar.server.common.RegistryProperties
for serverorg.freebxml.omar.client.xml.registry.util.ProviderProperties
for clientThese classes implement singleton pattern and properties are loaded on first
access. Furthermore, they extend org.freebxml.omar.common.AbstractProperties,
which holds common methods for property loading purposes.
NOTE: Both server and client property classes currently INCLUDE properties defined for common. See property loading sequence.
RegistryBrowser (thick client) is also configurable, but that is not covered here. See //TODO: link.
Currently each of the property classes follows this sequence:
org/freebxml/omar/common/omar-common.properties
for commonorg/freebxml/omar/server/omar.properties
for serverorg/freebxml/omar/client/jaxr-ebxml.properties
for clientomar-common.properties
for commonomar.properties
for serverjaxr-ebxml.properties
for clientomar.home, see next steps) if youre planning to have
multiple registry installations in the same machine, under the same user.
omar.home property from System.properties, if
defined, so that it can be used by next step. This is an alternative to
modifying property files to define omar.home.
omar.home from the
steps above for file system directory path.
${omar.home}/omar-common.properties
for common${omar.home}/omar.properties
for server${omar.home}/jaxr-ebxml.properties
for client?DpropName=propValue command-line
switch) where property name starts withomar. for commonomar. for serveromar. or jaxr-ebxml for clientIMPORTANT NOTE: Both server and client property classes fully execute loading sequence for common and use those properties as starting point.
See also: Variable support in property files.
Default properties are loaded from classpath using fully qualified name for resource.
org/freebxml/omar/common/omar-common.properties
for commonorg/freebxml/omar/server/omar.properties
for serverorg/freebxml/omar/client/jaxr-ebxml.properties
for clientAfter the loading steps, variable substitution is performed. Allowed variables:
${user.home}${omar.home}${jaxr-ebxml.home}Prefer changing properties in the classpath root or in omar.home
directory.
Property files are located under omar/conf directory in CVS.
The ant script will copy property files to 3 locations under Build Tree:
There is one directory that centralizes all the omar-related data and
configuration files. It defaults to omar-common.properties or through System properties
to enable multiple deployment/development environment in the same machine, for
the same user.
WARNING: This is strongly discouraged and it is here for documentation purpose only!
Property loading sequence can be changed by modifying the constructor and the loadProperties() method in each of the classes.
The property classes should use a log defined for
org.freebxml.omar.Properties.
If you want to debug the property classes of the project, change the log
configuration. Changing the log level to debug will output complete
information about loading sequence, while changing it to debug will also output
all the loaded properties.
When using log4j, make sure that log4j.properties is in classpath and it contains lines like this:
#Log for OMAR properties
logger.org.freebxml.omar.Properties = debug, Console
This assumes you have configured and appender named Console.
if not, add this lines to your log4j.properties:
# An appender named 'Console' that outputs to stdout.
log4j.appender.Console=org.apache.log4j.ConsoleAppender
log4j.appender.Console.layout=org.apache.log4j.PatternLayout
log4j.appender.Console.layout.ConversionPattern=%d{ISO8601} %p %c[%t] - %m%n