The wlw-config.xml file allows you to configure runtime parameters of web services, both on the development server and production servers. This file is used by wlwBuild when preparing WebLogic Workshop application EAR files for deployment to a production server.
Note that the values appearing in wlw-config.xml are hardcoded into the deployment EAR and cannot be overridden by other runtime configuration mechanisms. For most cases you should use wlw-runtime-config.xml to configure the runtime information for your Workshop application.
<wlw-config>
<hostname>
<protocol>
<http-port>
<https-port>
<transaction-isolation-level>
<transaction-timeout>
<message-transaction-timeout>
<ejb-concurrency-strategy>
<web-tier-controls>
<class-name>
<component-group URI=""
protocol="">
<component
URI="" default=boolean>
<service>
<class-name>
<protocol>
<async-dispatch-policy>
The <wlw-config> element is the root element of the wlw-config.xml file.
<wlw-config>
<hostname>
<protocol>
<http-port>
<https-port>
<transaction-isolation-level>
<transaction-timeout>
<message-transaction-timeout>
<ejb-concurrency-strategy>
<web-tier-controls>
<component-group URI=""
protocol="">
<service>
<async-dispatch-policy>
<wlw-config> <!--
Children elements defining the runtime information about the deployed application.
-->
</wlw-config>
none.
Parents: none.
Children: <hostname>, <protocol>, <http-port>, <https-port>, <transaction-isolation-level>, <transaction-timeout>, <message-transaction-timeout>, <ejb-concurrency-strategy>, <max-beans-in-cache>, <idle-timeout-seconds>, <read-timeout-seconds>, <initial-beans-in-free-pool>, <max-beans-in-free-pool>, <component-group>, <service>.
The <hostname> element specifies the name of the machine where your application will be deployed. If the value is not set in wlw-config.xml, the value may also be set at runtime in the wlw-runtime-config.xml file, which resides in the server's domain root folder. Also, it may be set at runtime via the server configuration parameter FrontendHost: in the WebLogic Server console navigate to Server --> Protocols --> HTTP --> Advanced Options.
Note: that if you specify the <hostname> in wlw-config.xml, the value will be fixed and it cannot be overridden by other configuration techniques. For this reason it is generally preferable to use the alternative configuation techniques described above.
<wlw-config>
<hostname>
<hostname> hostnameString </hostname>
none.
Parents: <wlw-config>.
Children: none.
The <protocol> element defines the default exposure protocol for your web application. Unless otherwise specified in the <service> element, web resources within the web application will be exposed on the protocol specified here. Possible values are http or https.
<wlw-config>
<protocol>
<protocol> [HTTP | HTTPS] </protocol>
Parents: <wlw-config>.
Children: none.
The <http-port> element specifies which port should be used for HTTP traffic. The range of values is 1 to 65535. If omitted the value is set to 7001.
<wlw-config>
<http-port>
<http-port> httpPort </http-port>
none.
Parents: <wlw-config>.
Children: none.
The <https-port> element specifies which port should be used for https traffic. The range of values is 1 to 65535. If omitted the value is set to 7002.
<wlw-config>
<https-port>
<https-port> httpsPort </https-port>
Parents: <wlw-config>.
Children: none.
The <transaction-isolation-level> tag specifies the transaction isolation level of the EJB that is produced when a web service is compiled. The value of <transaction-isolation-level> will be mapped to the EJB's deployment descriptors at compile time. If no value is specified, then no value is written to the deployment descriptor; this will cause the runtime container to use whichever isolation level the target database (used by the EJB) is configured for. Valid values are
TRANSACTION_READ_COMMITTED
TRANSACTION_READ_UNCOMMITTED
TRANSACTION_REPEATABLE_READ
TRANSACTION_SERIALIZABLE
<wlw-config>
<transaction-isolation-level>
<transaction-isolation-level>
[ TRANSACTION_READ_COMMITTED | TRANSACTION_READ_UNCOMMITTED | TRANSACTION_REPEATABLE_READ | TRANSACTION_SERIALIZABLE ]
</transaction-isolation-level>
Parents: <wlw-config>.
Children: none.
The transaction-timeout element specifies the maximum duration for an EJB's container-initiated transactions. If a transaction lasts longer than transaction-timeout, WebLogic Server rolls back the transaction. Note that this element applies to Workshop web services, since web services are compiled into transactional EJBs. Takes an integer indicating seconds. The default value is 30 seconds.
<wlw-config>
<transaction-timeout>
<transaction-timeout> timoutSeconds </transaction-timeout>
Parents: <wlw-config>.
Children: none.
The message-transaction-timeout element specifies the maximum duration for asynchronous message requests. If a transaction lasts longer than message-transaction-timeout, WebLogic Server rolls back the transaction. Takes an integer indicating seconds. The default value is 30 seconds.
<wlw-config>
<message-transaction-timeout>
<message-transaction-timeout> timoutSeconds </message-transaction-timeout>
Parents: <wlw-config>.
Children: none.
The <ejb-concurrency-strategy> element is used to specify the EJB concurrency strategy of the EJBs that back conversational web services. Valid values are
Exclusive
Database
Optimistic
Default value is Exclusive for non-production builds, and Database for production builds. For clustered environments a value of Database is required. Non-clustered environments may use Exclusive.
WebLogic Workshop requires that method invocations on conversational web services occur serially. Serial access is enforced via record locking on the conversation's database record. When SQL Server or Oracle is used as the persistent store for conversation state, record locking is provided by the SQL statements used internally and <ejb-concurrency-strategy> may be set to Optimistic. When PointBase is used as the conversation store, <ejb-concurrency-strategy> must be Exclusive or race conditions may occur in conversation state access.
Note: if your project contains stateful processes, compilation will fail if you set the <ejb-concurrency-strategy> value to "optimistic". Some examples of stateful processes are: (1) an asynchronous web service or (2) a business process that involves stateful nodes or transactions. For more information on stateful web services and business processes see Default Transactional Behavior in WebLogic Workshop and Building Stateless and Stateful Business Processes
<wlw-config>
<ejb-concurrency-strategy>
<ejb-concurrency-strategy> [ Exclusive | Database | Optimistic ] </ejb-concurrency-strategy>
Parents: <wlw-config>.
Children: none.
Controls code generation for controls referenced from the web tier. Use this element as an optimization to reduce the number of generated EJBs. If the <web-tier-controls> element is empty, then no EJBs will be generated. Note that referenced controls will successfully compile, but will fail at runtime.
<wlw-config>
<web-tier-controls>
<class-name>
<web-tier-controls> <!--
Child elements listing control classes referenced from the web-tier
-->
</web-tier-controls>
Parents: <wlw-config>.
Children: <class-name>.
Control file class names that are referenced from the web-tier. This element gives the fully qualified class name, including package. No file extension should be included. E.g., <class-name>my.package.name.Foo</class-name>.
<wlw-config>
<web-tier-controls>
<class-name>
<class-name> JavaClassNameString </class-name>
Parents: <web-tier-controls>.
Children: none.
The <component-group> element is used to group together different versions of a component.
<wlw-config>
<component-group>
<component>
<component-group>
<!--
Child elements listing the different versions of the component
-->
</component-group>
Attribute | Description |
---|---|
URI |
Required string. Any string indicating part of the URI space. |
protocol | Optional string. |
Parents: <wlw-config>.
Children: <component>.
<component-group URI="version/MyWebService.jws"> <component URI="version/MyWebService3.jws" default="true"/> <component URI="version/MyWebService2.jws" /> <component URI="version/MyWebService1.jws" /> </component-group>
Defines an individual version in a component group.
<wlw-config>
<component-group>
<component>
<component
URI="[uriString]"
default="[boolean]"
/>
Attribute | Description |
---|---|
URI |
Required string. |
default | Optional boolean. |
Parents: <component-group>.
Children: none.
<component-group URI="version/MyWebService.jws"> <component URI="version/MyWebService3.jws" default="true"/> <component URI="version/MyWebService2.jws" /> <component URI="version/MyWebService1.jws" /> </component-group>
<wlw-config>
<service>
<class-name>
<protocol>
<service> <!--
Child elements specifying the transport protocol for individual web resources. -->
</service>
Parents: <wlw-config>.
Children: <class-name>, <protocol>.
<service> <class-name>HelloWorld</class-name> <protocol>http</protocol> </service> <service> <class-name>HelloWorldSecure</class-name> <protocol>https</protocol> </service>
The <class-name> element is used in conjunction with the <service> and <protocol> elements to specify the transport protocols of individual web resources. Possible values are the class names of web resources. For example, to specify a web service Foo.jws, use <class-name>Foo</class-name>. Values of the <class-name> element are case sensitive.
<wlw-config>
<service>
<class-name>
<class-name> JavaClassString </class-name>
Parents: <service>.
Children: none.
Defines an HTML protocol to be used by a given class / web resource. Valid values are either HTTP or HTTPS.
<wlw-config>
<service>
<protocol>
<protocol> protocolString </protocol>
Parents: <service>.
Children: none.
Provides a mechanism to associate a project’s asynchronous requests with a server-defined dispatch policy. Administrators can then configure separate server resources to handle a project’s synchronous and asynchronous requests. The value provided for this element is used to generate an <async-dispatch-policy> entry in the weblogic-ejb-jar.xml configuration file for the AsyncDispatcher and AsyncErrorDispatcher message-driven beans. Configuration of dispatch policy for synchronous requests is accomplished through elements in the web.xml configuration file.
<wlw-config>
<async-dispatch-policy>
<async-dispatch-policy> dispatchPolicy </async-dispatch-policy>
none.
Parents: <wlw-config>.
Children: none.
<async-dispatch-policy> weblogic.wlw.async.dispatch </async-dispatch-policy>
This fragment in wlw-config.xml will result in the following entry being generated into the weblogic-ejb-jar.xml configuration file for the project’s AysncDispatcher and AsyncErrorHandler message-driven beans:
<dispatch-policy>weblogic.wlw.async.dispatch</dispatch-policy>