Passing additional parameters to the ODConfig constructor
To provide advanced support for additional ODWEK configurations, use the ODConfig constructor that accepts a Java properties object to pass ODWEK Java API configuration options that are not encompassed in the standard ODConfig constructor.
About this task
To use this advanced constructor, you must instantiate a Java properties class, set the advanced values in the properties object, then pass the properties object to the ODConfig constructor.
The following example shows the creation of a Properties object that passes the following
three configuration options through the ODConfig constructor:
- the location of a non-default installation directory
- the maximum size an ODWEK trace log file can grow to 100MB before creating a new log file
- the name of the XML file to use for the Generic Transform Interface
Properties od_props = new Properties();
od_props.setProperty(ODConfig.ODWEK_INSTALL_DIR, "c:\\path\\to\\OnDemandInstall");
od_props.setProperty(ODConfig.MAX_TRACELOG_SIZE, "100");
od_props.setProperty(ODConfig.TransformXML, "C:\\OnDemand\\V10.5\\config\\arsxform.xml");
ODConfig odConfig = new ODConfig(ODConstant.NATIVE,
ODConstant.APPLET,
null,
200,
"/applets",
"ENU",
"c:\\arstmp",
"c:\\arstmp\\trace",
0,
od_props);
odServer = new ODServer(odConfig);
odServer.initialize( "test.java" );
See the ODWEK JavaDocs for a complete list of available parameters that can be set in the ODConfig object.