Set factory properties
A few Factory properties also affect some aspects of development. The following aspects of model development are determined by Factory properties. All properties shown are in the WEB-INF/config/cluster.properties file unless otherwise noted.
Setting the Compiler to Use for JSP and Method Compilation
We can determine the Java compiler that the Factory servlet uses to compile methods and JSP pages.
# specifies the compiler to use
bowstreet.methods.compiler=C:/jdk131/bin/javac.exe
Determining the Target Directory for Java Source Files for the Model
The Factory servlet generates a Java source file for all of the methods in a model. We can determine the directory to which this file is generated. The default directory is the WEB-INF/work/source directory.
# This is where the generated source(.java) will go
bowstreet.methods.sourceDirectory=${bowstreet.rootDirectory}/work/source
Determining the Output Directory for Compiled Methods`
The Factory servlet compiles the generated Java source file for model methods to a directory that we can specify. The default is the WEB-INF/work/classes directory.
# This is where the compiled class will go. This should be in a place where the dynamic class loader can pick it up.
bowstreet.methods.targetDirectory=${bowstreet.rootDirectory}/work/classes
Add Your Own Builder Definitions to the Designer
We can add one or more directories from which the Designer loads builder definitions.
#In bowstreet.properties file
# classpath-like syntax (semi-colon delimited) to tell Factory where to look for BuilderDef files
# default if unavailable is ${bowstreet.rootDirectory}/builders
bowstreet.location.builderdef.path=${bowstreet.rootDirectory}/builders
Configuring Dynamic Class Loading
The value you set in the bowstreet.dynamic.class.load.path property determines the directory or directories from which Designer and the Factory servlet will dynamically load Java classes. This property is in the WEB-INF/config/bowstreet.properties file.
Dynamically-loaded classes cannot be on your Java class path.
To specify multiple locations from which to dynamically load classes, append the additional paths in the property by separating each path with a comma, as in this example:
#In bowstreet.properties file
bowstreet.dynamic.class.load.path=${bowstreet.rootDirectory}/work/classes,${bowstreet.rootDirectory}/work/my_classes
bowstreet.dynamic.class.load.checkTimestamp=true
The bowstreet.dynamic.class.load.checkTimestamp property, if set to true, enables the time check for classes being loaded by the dynamic class loader. If the property is set to true and a class changes, the class will be dynamically reloaded on the next instance creation, providing it is on the loader class path and is one of the supported classes to be dynamically loaded.
For performance reasons, it is recommended that the bowstreet.dynamic.class.load.checkTimestamp property be set to true in a development environment and false in production.
Setting the Schema Reference
The Factory SOAP/WSDL support specifies the 2001 version of XML Schema by default, but we can set the appropriate reference to use by un-commenting one of the properties listed below:
# Uncomment these parameters to add 1999 and/or 2000/11 XMLSchema References into
# SOAP responses when using pre-Factory 5.9 SOAPPC and SOAPDOC URLs (not used by Axis)
#bowstreet.soap.schemaRef.1999=true
#bowstreet.soap.schemaRef.2000=true
For example:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<ns1:gcdXmlResponse xmlns:ns1="http://bowstreet.com/2002/03/models/xmethods/gcd">
<gcdreply><distance>2708.88</distance></gcdreply>
</ns1:gcdXmlResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Setting the SOAP Schema Location
Some schemas found in WSDL documents that reference SOAP encoding structures do not always specify an import statement or schemaLocation attribute for the SOAP encoding schema. If the parse fails, Factory automatically adds the import statement and re-parses the schema.
We can specify the location from which the Factory retrieves the SOAP encoding schema with the property, which is by default set to: bowstreet.location.schemas
Proxy Support for WSDL and SOAP Calls
For both WSDL retrieval and for outbound service calls the underlying SOAP and HTTP code leverages the standard Java properties (http.proxyHost, http.proxyPort, http.proxyUser, http.proxyPasswd). These values can be set in the "server.properties" file or they can be set with a property (-Dhttp.proxyHost=foo, etc.) on the JVM command line for the application server.
In Factory 5.9, additional per-service call proxy settings are available in the Service Call Builder's Advanced inputs section. See Service Call Builder help for more about these Proxy settings.
Configuring Schema Cache Size
Schema objects generated by the Schema Builder or the Schema Builder's API are cached. This allows another thread or Webapp looking for the same schema to access the cached object with no re-parsing overhead. However, like all caches this cache uses memory. As a result,limiting the maximum size of the cache is desirable.
We can control the Maximum Schema Cache size using the following property: bowstreet.schema.maxCacheSize= . The default max cache size is 50 schema Objects.