Portlet Factory, Version 6.1.2


 

Setting IBM® WebSphere Portlet Factory properties

WebSphere Portlet Factory properties affect some aspects of development.

The following aspects of model development are determined by WebSphere Portlet 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

You can determine the Java™ compiler that the WebSphere Portlet 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 WebSphere Portlet Factory servlet generates a Java source file for all of the methods in a model. You 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 WebSphere Portlet Factory servlet compiles the generated Java source file for model methods to a directory that you 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

Adding your own builder definitions to WebSphere Portlet Factory Designer

You can add one or more directories from which WebSphere Portlet Factory Designer loads builder definitions.
#In bowstreet.properties file
# classpath-like syntax (semi-colon delimited) for location of 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 WebSphere Portlet Factory Designer and the WebSphere Portlet Factory servlet will dynamically load Java classes. This property is in the WEB-INF/config/bowstreet.properties file.

Note: 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.

Note: For performance reasons, IBM recommends 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 WebSphere Portlet Factory SOAP/WSDL support specifies the 2001 version of XML Schema by default, but you 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, WebSphere Portlet Factory automatically adds the import statement and re-parses the schema.

You can specify the location from which WebSphere Portlet 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, and so on) on the JVM command line for the application server.

In WebSphere Portlet Factory 5.9, additional per-service call proxy settings are available in the Service Call builder's Advanced Inputs section.

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.

You can control the Maximum Schema Cache size using the following property: bowstreet.schema.maxCacheSize= . The default max cache size is 50 schema Objects.

Parent topic: IBM WebSphere Portlet Factory Designer components


Library | Support |