Access to add and change pages is restricted. See: https://cwiki.apache.org/confluence/display/OFBIZ/Wiki+access

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

 

Introduction

This document describes the configuration of the Framework of the Open For Business Framework. It goes through each of the OFBiz Framework properties files to explain the available properties and their usage. The properties files used for the OFBiz applications have examples of the different options and are located in ofbiz/commonapp/etc/.

These files are resources on the classpath so they must be located somewhere on the classpath available to the Java application(s) for the proper operation of the OFBiz Framework. Because they are resources on the classpath they can be overridden locally in webapps by putting a changed copy of the desired file in the webapp/WEB-INF/classes directory.

The entityengine.xml file is not described in this document, it is described in the Entity Engine Configuration Guide as a separate document because of the large number of options in the file. See the Related Documents section for a link to the Entity Engine Configuration Guide. The same is true for the Service Engine Configuration Guide and the serviceengine.xml file, including a link in the Related Documents section above.

 

Properties File Extensions

The OFBiz UtilProperties class uses the OFBiz FlexibleProperties to read and parse properties files with a few extensions. The FlexibleProperties class is an extension of the standard Java Properties class.

The extensions included allow the value of a property to be substituted into the value of another property by simply using the ${property.name} syntax. Another extension is that if an "env." precedes a property.name inside the ${ and } delimiters, then the named property will be looked up in the system environment instead of in the current properties file.

For example the ofbiz.home system property is added using the -D parameter on the java command line and is used in the entityengine.xml and other properties files with ${env.ofbiz.home}.

Note that these extensions are only currently available for properties files used in configuration. The internationalization and localization related message properties files use the standard Java MessageBundle class that does not use these conventions. They do, however support parameters inserted into the messages using the Java MessageFormat class and related conventions.

 

cache.properties

The cache.properties file contains cache setting used by the UtilCache class. Default cache parameters can be passed in when a cache is created but, if cache parameters exist in this file for the given cache name, then they will be loaded from the cache.properties file.

There are three optional properties in this file for each named cache:
    {cache-name}.maxSize (whole number)
    {cache-name}.expireTime
(whole number)
    {cache-name}.useSoftReference
(true or false).
The maxSize property specifies the maximum number of entries in the cache, but does nothing with respect to the size of each cache entry. The expireTime property specifies how long in milliseconds each cache entry will be valid. If either value is 0 the feature will be disabled, i.e. unlimited cache size or no expire time.

The useSoftReference property is used to specify, true or false, whether soft references should be used for cache entries. Soft references help keep large caches from taking too much memory by allowing the garbage collector to clear these entries when more memory is needed.

If the values are not specified and are not passed to the UtilCache constructor, the values in the default.maxSize, default.expireTime and default.useSoftReference properties will be used.

 

debug.properties

The debug.properties file contains options to turn OFBiz debug threads on/off and also serves as the Log4J properties file (see jakarta.apache.org for documentation on Log4J).

In addition to the Log4J properties there are properties that turn OFBiz logging levels on and off. These are formatted like print.{level-name} where level-name is verbose, timing, info, important, warning, error, or fatal.

 

jndiservers.xml

This is a simple XML file that contains a number of jndi-server tags inside a single jndi-config tag. Each jndi-server tag corresponds to a named JNDI Server configuration that will be used in various places in the OFBiz Framework, especially in the Entity and Service Engines.

The jndi-server tag is used to configure JNDI servers that will be used for JTA objects, JDBC objects, JMS objects, and other JNDI resources used by the Entity Engine, the Service Engine, and other framework or application components.


  • No labels