This property replaces the deprecated smtp
property.
Configuration Properties
- 1. Overview
- 2. Global Properties
- 3. Epilogue Properties
- 4. Java Processor Properties
- 4.1. Class Path
- 4.2. JAR Path
- 4.3. Compiler JAR
- 4.4. Compiler Main Class
- 5. Email Processor Properties
- 5.1. Global SMTP Host
- 5.2. Test SMTP host
- 5.3. Test Recipient
1. Overview
-
Rationale ??? The Orbeon Forms properties are used by some processors to configure or customize their behavior. This section describes how the system is configured, and lists all the customizable properties.
-
Properties File Location ??? The properties sub-system is initialized after the Resource Manager (the properties being read like any other Orbeon Forms resources). By default it tries to load a file from the URL
oxf:/properties.xml
. This value can be overridden in the Web application descriptorweb.xml
with theoxf.properties
initialization parameter:<context-param><param-name>oxf.properties</param-name><param-value>oxf:/config/properties.xml</param-value></context-param> -
Standard Property Files ??? Even though the location of the property file can be configured in web.xml, Orbeon Forms uses the following locations:
-
oxf:/config/properties.xml
: the main property file. This file is stored withinorbeon-resources-public.jar
. In turn, it uses XInclude to include the following files: -
oxf:/config/properties-base.xml
: base Orbeon Forms properties. This file is underWEB-INF/resources/config/
. -
oxf:/config/properties-xforms.xml
: XForms engine properties. This file is underWEB-INF/resources/config/
. -
oxf:/config/properties-form-runner.xml
: Orbeon Form Runner properties. This file is underWEB-INF/resources/config/
. -
oxf:/config/properties-form-builder.xml
: Orbeon Form Builder properties. This file is underWEB-INF/resources/config/
. -
oxf:/config/properties-local.xml
: optional file with properties local to the deployment. This file can also contain properties that override properties in the above files. This file should be placed underWEB-INF/resources/config/
.
-
-
Automatic Reloading ??? The property file is reloaded every time it is changed (after a short delay), however some properties are taken into account only when the server is first started.
-
Property types ??? Properties have a type, which must be one of the following XML Schema simple types:
xs:anyURI
,xs:integer
,xs:boolean
,xs:QName
,xs:string
,xs:date
,xs:dateTime
. -
Global and Processor Properties ??? There are two types of properties: global properties that apply to the system as a whole, and processor-specific properties. For instance, you set the cache size with a global property:
<property as="xs:integer" name="oxf.cache.size" value="200"/>On the other hand setting the maximum amount of bytes that can be uploaded to the server is set with a processor specific property. Note the additionalprocessor-name
attribute:<property as="xs:integer" processor-name="oxf:request" name="max-upload-size" value="100000000"/> -
Wildcards ??? Property names may be defined using wildcards. A property name is assumed to be built as a series of path elements separated by
.
characters. A path element may contain a*
character instead of an actual path element value.<property as="xs:anyURI" name="oxf.fr.persistence.app.uri.*.*.*" value="/fr/service/exist"/><property as="xs:anyURI" name="oxf.fr.persistence.app.uri.*.*.data" value="/fr/service/oracle"/><property as="xs:anyURI" name="oxf.fr.persistence.app.uri.orbeon.builder.form" value="/fr/service/resource"/>In this example:
-
If the property name
oxf.fr.persistence.app.uri.orbeon.builder.form
is requested, the value/fr/service/resource
is returned (exact match). -
If the property name
oxf.fr.persistence.app.uri.orbeon.foobar.data
is requested, the value/fr/service/oracle
is returned, because the path elementsorbeon
,foobar
match wildcards, anddata
matches the last path element. -
If the property name
oxf.fr.persistence.app.uri.orbeon.foobar.form
is requested, the value/fr/service/exist
is returned, because the path elementsorbeon
,foobar
andform
all match wildcards.
This allows creating hierarchical properties with generic defaults and more specific values.
-
2. Global Properties
This section has migrated to the wiki.
3. Epilogue Properties
This section has migrated to the wiki.
4. Java Processor Properties
4.1. Class Path
Name | classpath |
---|---|
Purpose | Defines a directory where Java class files are located. The Java processor dynamically compiles Java code, and may need some libraries. This property defines the classpath used by the compiler. |
Processor name | oxf:java |
Type | xs:string |
Default Value | None |
4.2. JAR Path
Name | jarpath |
---|---|
Purpose | Defines a list of directories where JAR files are located. The Java processor dynamically compiles Java code, and may need some libraries. This property defines a "JAR path", a list of directories containing JAR files that will be added to the classpath when compiling and running the processor executed by the Java processor. |
Processor name | oxf:java |
Type | xs:string |
Default Value | None |
4.3. Compiler JAR
Name | compiler-jar |
---|---|
Purpose | Define a URL pointing to a JAR file containing the Java compiler to use. If this property is set, the Java processor adds the specified JAR file to the class path used to search for the main compiler class. |
Processor name | oxf:java |
Type | xs:anyURI |
Default Value |
If the property is not specified, the Java processor tries to load
the main compiler class first using the current class loader. If
this fails, it retrieves the java.home system property
which specifies a directory on disk. If that directory is called
jre , and there exists a JAR file relative to that
directory under ../lib/tools.jar , that JAR file is
added to the class path used to search for the main compiler class.
This covers most cases where the standard Sun JDK is used, so that
the compiler-jar property does not have to be
specified.
|
4.4. Compiler Main Class
Name | compiler-class |
---|---|
Purpose |
Define a class name containing the Java compiler to use. The Java processor loads the corresponding
class and calls a static method on this class with the following
signature: public static int compile(String[] commandLine,
PrintWriter printWriter) .
|
Processor name | oxf:java |
Type | xs:string |
Default Value |
com.sun.tools.javac.Main
|
5. Email Processor Properties
5.1. Global SMTP Host
The following property can be specified globally as a property instead of being part of the processor configuration:
Name | smtp-host |
---|---|
Purpose | Configure the SMTP host for all email processors. This global property can be overridden by local processor configurations. |
Processor name | oxf:email |
Type | xs:string |
Default Value | None |
The following properties can be used for testing purposes:
5.2. Test SMTP host
Name | test-smtp-host |
---|---|
Purpose |
Configure a test SMTP host for all email processors. This global
property when specified overrides all the other SMTP host
configurations for all Email processors, whether in the processor
configuration or using the smtp-host property.
|
Processor name | oxf:email |
Type | xs:string |
Default Value | None |
5.3. Test Recipient
Name | test-to |
---|---|
Purpose | Configure a test recipient email address for all email processors. This global property when specified overrides all the other SMTP recipient configurations for all Email processors. |
Processor name | oxf:email |
Type | xs:string |
Default Value | None |
This property replaces the deprecated forceto
property.
For example, those properties can be used as follows:
The test properties can easily be commented out for deployment.