<?xml version="1.0" encoding="ISO-8859-1"?>
<document url="http://castor.codehaus.org/conf-lib.xml">
  <body>
    <title>Configuration, Libraries and Building Castor</title>

    <section title="The Castor configuration file">

      <p>
        Castor uses a configuration file for environmental properties that are
        shared across all the Castor sub systems. The configuration file is
        specified as a Java properties file with the name <tt>castor.properties</tt>.
      </p>

      <p>
        The Castor JAR includes a default configuration file. A configuration
        file in the Java library directory (e.g. <tt>/jdk1.2/lib</tt>) can be
        used to override the default configuration file with system-wide
        properties.  In addition, a configuration file can be placed in the
        classpath and will override both the system wide properties and
        Castor-default configuration.
      </p>

      <p>
        When running the provided examples, Castor will use the configuration
        file located in the examples directory which specifies additional
        debugging information as well as pretty printing of all produced XML
        documents.
      </p>

      <p>
        The following properties are currently supported in the configuration
        file:
      </p>

<pre>
# THE CASTOR PROPERTIES FILE
# This file specifies values for Castor run-time which may be configured
# by the user.
# $Id: conf-lib.xml 8107 2009-02-28 00:12:40Z rjoachim $

# This section defines Backwards compatibility switches.
#
# Hashtable/Map default mapping.
# For backward compatibility with 0.9.5.2 and earlier.
#
#org.exolab.castor.xml.saveMapKeys=false

# Defines the default XML parser to be used by Castor.
# The parser must implement org.xml.sax.Parser.
#
org.exolab.castor.parser=org.apache.xerces.parsers.SAXParser

# Defines the (default) XML serializer factory to use by Castor, which must
# implement org.exolab.castor.xml.SerializerFactory;
# Default is org.exolab.castor.xml.XercesXMLSerializerFactory
org.exolab.castor.xml.serializer.factory=org.exolab.castor.xml.XercesXMLSerializerFactory

# Defines the NodeType for use with Java primitive types (int, long, boolean,
# etc). This value is only used by the Introspector.  Valid values are either
# "attribute" or "element". By default, all primitives are marshaled as
# attributes. Uncomment the following line to change the NodeType to element.
#
#org.exolab.castor.xml.introspector.primitive.nodetype=element

# Defines the Naming "style" or conventions to use when creating XML names
# from Java class or field names.
# Valid values are as follows:
# -----------------------------------------------------------------
# lower (default)  |  All names are lowercase with hyphens
#                  |  separating words.
#                  |
#                  |  Example: personInfo = person-info
# -----------------------------------------------------------------
# mixed            |  All names are mixed case, with Uppercase
#                  |  character as the first letter of a new word.
#                  |
#                  |  Example: personInfo = personInfo
#                  |  Example: FooBar     = fooBar
# -----------------------------------------------------------------
# {Any ClassName}  |  Any Class which implements
#                  |  org.exolab.castor.xml.XMLNaming
# -----------------------------------------------------------------
#
# By default, all names are treated as the "lower" option.  To preserve the
# Java mixed-case conventions, uncomment the following line.
#
#org.exolab.castor.xml.naming=mixed

###############################
# REGULAR EXPRESSION EVALUATORS
#
# Defines the Regular Expression Evaluator to be used by Castor.
# The evaluator must implement org.exolab.castor.util.RegExpEvaluator.
#
# Uncomment the following to basically suppress Regular expressions evaluation:
#org.exolab.castor.regexp=org.exolab.castor.xml.util.AlwaysTrueRegExpEvaluator
#
# An implementation which uses the Jakarta RegExp library:
#org.exolab.castor.regexp=org.exolab.castor.util.JakartaRegExpEvaluator
#
# An implementation which uses the Jakarta ORO library:
org.exolab.castor.regexp=org.exolab.castor.util.JakartaOroEvaluator

# True if all documents should be indented on output by default.
# Defaults to false.
#
#org.exolab.castor.indent=true

# True if xml documents should be validated by the SAX Parser
# Defaults to false.
#
org.exolab.castor.parser.validation=false

# True for parser to support Namespaces.
# Defaults to false.
#
org.exolab.castor.parser.namespaces=false

# True if all documents should be validated by the marshaling framework
# Defaults to true.
#
org.exolab.castor.marshalling.validation=true

# Comma separated list of SAX 2 features that should be enabled for the
# default parser.
#
#org.exolab.castor.sax.features=

# Comma separated list of SAX 2 features that should be disabled for the
# default parser.
#
#org.exolab.castor.sax.features-to-disable

# True if debugging output should be generated.
# Defaults to false.
#
org.exolab.castor.debug=false

# Property specifying whether or not to search for an proxy interface at marshalling.
# If property is not empty the objects to be marshalled will be searched if they
# implement one of the given interface names. If the interface is implemented the
# superclass will be marshalled instead of the class itself.
#
#org.exolab.castor.xml.proxyInterfaces=\
#  net.sf.cglib.proxy.Factory, \
#  org.hibernate.proxy.HibernateProxy

# List of collection handlers for Java 1.1 and Java 1.2 run-times:
#
org.exolab.castor.mapping.collections=\
  org.exolab.castor.mapping.loader.J1CollectionHandlers,\
  org.exolab.castor.mapping.loader.J2CollectionHandlers

# List of persistence factories for the supported database servers:
#
org.castor.cpa.persistence.sql.driver.factories=\
  org.castor.cpa.persistence.sql.driver.OracleFactory,\
  org.castor.cpa.persistence.sql.driver.PostgreSQLFactory,\
  org.castor.cpa.persistence.sql.driver.SybaseFactory,\
  org.castor.cpa.persistence.sql.driver.SQLServerFactory,\
  org.castor.cpa.persistence.sql.driver.DB2Factory,\
  org.castor.cpa.persistence.sql.driver.InformixFactory,\
  org.castor.cpa.persistence.sql.driver.HsqlFactory,\
  org.castor.cpa.persistence.sql.driver.InstantDBFactory,\
  org.castor.cpa.persistence.sql.driver.InterbaseFactory,\
  org.castor.cpa.persistence.sql.driver.MySQLFactory,\
  org.castor.cpa.persistence.sql.driver.SapDbFactory,\
  org.castor.cpa.persistence.sql.driver.GenericFactory,\
  org.castor.cpa.persistence.sql.driver.DerbyFactory,\
  org.castor.cpa.persistence.sql.driver.PointbaseFactory,\
  org.castor.cpa.persistence.sql.driver.ProgressFactory

# List of key generator factories:
#
org.castor.cpa.persistence.sql.keygen.factories=\
  org.castor.cpa.persistence.sql.keygen.MaxKeyGeneratorFactory,\
  org.castor.cpa.persistence.sql.keygen.HighLowKeyGeneratorFactory,\
  org.castor.cpa.persistence.sql.keygen.IdentityKeyGeneratorFactory,\
  org.castor.cpa.persistence.sql.keygen.SequenceKeyGeneratorFactory,\
  org.castor.cpa.persistence.sql.keygen.UUIDKeyGeneratorFactory

# Collection handlers for the source code generator:
#
org.exolab.castor.builder.type.j2=\
  org.exolab.castor.builder.FieldInfoFactoryJ2
org.exolab.castor.builder.type.j1=\
  org.exolab.castor.builder.FieldInfoFactory
org.exolab.castor.builder.type.odmg=\
  org.exolab.castor.builder.FieldInfoFactoryODMG30

# Configures the default time zone to apply to dates/times fetched from
# database fields (if not already part of the data).  Specify same format as
# in java.util.TimeZone.getTimeZone, or the empty string to use the computer's
# local time zone. Please see http://de.wikipedia.org/wiki/Zeitzone for
# detailed information about time zones.
#
org.exolab.castor.jdo.defaultTimeZone=
#org.exolab.castor.jdo.defaultTimeZone=GMT-8:00

# List of TxSynchronizeable implementations:
#
#org.exolab.castor.persist.TxSynchronizable=

# Sets the buffer size in bytes for fetching LOBs (this is dependent upon
# the JDBC driver implementation).  The value below == 5k.
#
org.exolab.castor.jdo.lobBufferSize=5120

# True if database configuration should be initalization
# when loading it (default: true).
#
#org.exolab.castor.jdo.DatabaseInitializeAtLoad=true

# True if proxy classes should be used for JDBC connections and prepared statements.
# Defaults to true.
#
org.castor.cpa.persistence.sql.connection.proxies=false

# MappingLoader implementations:
#
org.castor.mapping.loaderFactories=\
  org.castor.mapping.JDOMappingLoaderFactory,\
  org.castor.mapping.XMLMappingLoaderFactory

# Cache implementations:
#
org.castor.cache.Factories=\
  org.castor.cache.simple.NoCacheFactory,\
  org.castor.cache.simple.TimeLimitedFactory,\
  org.castor.cache.simple.CountLimitedFactory,\
  org.castor.cache.simple.UnlimitedFactory,\
  org.castor.cache.distributed.FKCacheFactory,\
  org.castor.cache.distributed.JcsCacheFactory,\
  org.castor.cache.distributed.JCacheFactory,\
  org.castor.cache.distributed.CoherenceCacheFactory,\
  org.castor.cache.distributed.OsCacheFactory,\
  org.castor.cache.hashbelt.FIFOHashbeltFactory,\
  org.castor.cache.hashbelt.LRUHashbeltFactory,\
  org.castor.cache.distributed.EHCacheFactory,\
  org.castor.cache.distributed.GigaspacesCacheFactory

# TransactionManagerFactory implementations:
#
org.castor.transactionmanager.Factories=\
  org.castor.transactionmanager.WebSphereTransactionManagerFactory,\
  org.castor.transactionmanager.WebSphere5TransactionManagerFactory,\
  org.castor.transactionmanager.WebSphere51TransactionManagerFactory,\
  org.castor.transactionmanager.LocalTransactionManagerFactory,\
  org.castor.transactionmanager.JNDIENCTransactionManagerFactory,\
  org.castor.transactionmanager.JOTMTransactionManagerFactory

# Selects whether the TransactionManager should be initialized at registration,
# or lazily when requested for the first time.
# Defaults to false.
#
org.castor.transactionmanager.InitializeAtRegistration=false

# Instructs Castor JDO to use the JDBC 3.0-specific features to obtain
# the generated value of an identity column.
# Defaults to false.
#
org.castor.jdo.use.jdbc30=false

# Specifies whether to use ANSI-compliant SQL for MS SQL Server.
# Defaults to false.
#
org.exolab.castor.jdo.sqlserver.ansi-compliant=false

# Specifyies whether the ClassDescriptorResolver should (automatically) search
# for and consult with package mapping files (.castor.xml) to retrieve class
# descriptor information; on by default.
# Defaults to true.
#
#org.exolab.castor.xml.loadPackageMappings=false

# Type convertors
#
org.castor.cpa.persistence.TypeConvertors=\
  org.castor.cpa.persistence.convertor.BigDecimalToBoolean,\
  org.castor.cpa.persistence.convertor.BigDecimalToByte,\
  org.castor.cpa.persistence.convertor.BigDecimalToDate,\
  org.castor.cpa.persistence.convertor.BigDecimalToDouble,\
  org.castor.cpa.persistence.convertor.BigDecimalToFloat,\
  org.castor.cpa.persistence.convertor.BigDecimalToInteger,\
  org.castor.cpa.persistence.convertor.BigDecimalToLong,\
  org.castor.cpa.persistence.convertor.BigDecimalToShort,\
  org.castor.cpa.persistence.convertor.BooleanToBigDecimal,\
  org.castor.cpa.persistence.convertor.BooleanToInteger,\
  org.castor.cpa.persistence.convertor.BooleanToShort,\
  org.castor.cpa.persistence.convertor.BooleanToString,\
  org.castor.cpa.persistence.convertor.ByteArrayToInputStream,\
  org.castor.cpa.persistence.convertor.ByteArrayToSerializable,\
  org.castor.cpa.persistence.convertor.ByteArrayToString,\
  org.castor.cpa.persistence.convertor.ByteToBigDecimal,\
  org.castor.cpa.persistence.convertor.ByteToInteger,\
  org.castor.cpa.persistence.convertor.ByteToShort,\
  org.castor.cpa.persistence.convertor.CastorDateToDate,\
  org.castor.cpa.persistence.convertor.CastorDateToSqlDate,\
  org.castor.cpa.persistence.convertor.CastorDurationToLong,\
  org.castor.cpa.persistence.convertor.CharArrayToSqlClob,\
  org.castor.cpa.persistence.convertor.CharArrayToString,\
  org.castor.cpa.persistence.convertor.DateToBigDecimal,\
  org.castor.cpa.persistence.convertor.DateToCastorDate,\
  org.castor.cpa.persistence.convertor.DateToDouble,\
  org.castor.cpa.persistence.convertor.DateToInteger,\
  org.castor.cpa.persistence.convertor.DateToLong,\
  org.castor.cpa.persistence.convertor.DateToSqlDate,\
  org.castor.cpa.persistence.convertor.DateToSqlTime,\
  org.castor.cpa.persistence.convertor.DateToSqlTimestamp,\
  org.castor.cpa.persistence.convertor.DateToString,\
  org.castor.cpa.persistence.convertor.DoubleToBigDecimal,\
  org.castor.cpa.persistence.convertor.DoubleToDate,\
  org.castor.cpa.persistence.convertor.DoubleToFloat,\
  org.castor.cpa.persistence.convertor.DoubleToInteger,\
  org.castor.cpa.persistence.convertor.DoubleToLong,\
  org.castor.cpa.persistence.convertor.FloatToBigDecimal,\
  org.castor.cpa.persistence.convertor.FloatToDouble,\
  org.castor.cpa.persistence.convertor.FloatToInteger,\
  org.castor.cpa.persistence.convertor.FloatToLong,\
  org.castor.cpa.persistence.convertor.InputStreamToByteArray,\
  org.castor.cpa.persistence.convertor.InputStreamToSerializable,\
  org.castor.cpa.persistence.convertor.IntegerToBigDecimal,\
  org.castor.cpa.persistence.convertor.IntegerToBoolean,\
  org.castor.cpa.persistence.convertor.IntegerToByte,\
  org.castor.cpa.persistence.convertor.IntegerToDate,\
  org.castor.cpa.persistence.convertor.IntegerToDouble,\
  org.castor.cpa.persistence.convertor.IntegerToFloat,\
  org.castor.cpa.persistence.convertor.IntegerToLong,\
  org.castor.cpa.persistence.convertor.IntegerToShort,\
  org.castor.cpa.persistence.convertor.LongToBigDecimal,\
  org.castor.cpa.persistence.convertor.LongToCastorDuration,\
  org.castor.cpa.persistence.convertor.LongToDate,\
  org.castor.cpa.persistence.convertor.LongToDouble,\
  org.castor.cpa.persistence.convertor.LongToFloat,\
  org.castor.cpa.persistence.convertor.LongToInteger,\
  org.castor.cpa.persistence.convertor.LongToShort,\
  org.castor.cpa.persistence.convertor.ObjectToString,\
  org.castor.cpa.persistence.convertor.SerializableToByteArray,\
  org.castor.cpa.persistence.convertor.SerializableToInputStream,\
  org.castor.cpa.persistence.convertor.ShortToBigDecimal,\
  org.castor.cpa.persistence.convertor.ShortToBoolean,\
  org.castor.cpa.persistence.convertor.ShortToByte,\
  org.castor.cpa.persistence.convertor.ShortToInteger,\
  org.castor.cpa.persistence.convertor.ShortToLong,\
  org.castor.cpa.persistence.convertor.SqlClobToCharArray,\
  org.castor.cpa.persistence.convertor.SqlClobToString,\
  org.castor.cpa.persistence.convertor.SqlDateToCastorDate,\
  org.castor.cpa.persistence.convertor.SqlDateToDate,\
  org.castor.cpa.persistence.convertor.SqlTimestampToDate,\
  org.castor.cpa.persistence.convertor.SqlTimestampToString,\
  org.castor.cpa.persistence.convertor.SqlTimeToDate,\
  org.castor.cpa.persistence.convertor.StringToBigDecimal,\
  org.castor.cpa.persistence.convertor.StringToBoolean,\
  org.castor.cpa.persistence.convertor.StringToByteArray,\
  org.castor.cpa.persistence.convertor.StringToCharacter,\
  org.castor.cpa.persistence.convertor.StringToCharArray,\
  org.castor.cpa.persistence.convertor.StringToDate,\
  org.castor.cpa.persistence.convertor.StringToDouble,\
  org.castor.cpa.persistence.convertor.StringToFloat,\
  org.castor.cpa.persistence.convertor.StringToInteger,\
  org.castor.cpa.persistence.convertor.StringToLong,\
  org.castor.cpa.persistence.convertor.StringToShort,\
  org.castor.cpa.persistence.convertor.StringToSqlClob,\
  org.castor.cpa.persistence.convertor.StringToSqlTimestamp
</pre>

    </section>

  </body>

</document>
