Index Changes

Using application configuration in HTTP BC


For BCs, application connectivity information is usually stored in the service extensibility elements in a WSDL.
The information includes connection properties such as hostname, port number, user name, password etc.
With the use of application configuration, you can change the connectivity parameters without redeploying the
application. Application configuration objects can be seen as a named object associated with an endpoint that
defines a set of connection properties for a specific binding protocol.

For HTTP BC, the connectivity information is basically the HTTP URL location defined on soap:address for SOAP binding,
or http:address for HTTP binding. This document focuses on how to use the application configuration feature
with HTTP BC.

Configuring Application Configuration Object on SOAP/HTTP Endpoints

1. An application configuration name can be associated with an endpoint using the CASA editor as shown below.
The configuration name is completely user defined. If an application configuration name is defined for an endpoint,
the set of connection properties associated with the configuration name will override the default
connection properties specified in the WSDL

  • Steps to Launch the CASA editor
    • Create a composite application project
    • Add the JBI project to the composite application project
    • Build the composite application project
    • Open the composite application node
    • Double click on the "Service Assembly" node to open the CASA editor
    • Once CASA editor is launched, edit the configuration name for the desired endpoint as shown below. Make
      sure you click on the 'C' or 'P' port to launch the correct properties editor.


2. An 'application-config' extension will be created in the consumes and/or provides element in the jbi.xml
in HTTP BC's service unit jar, after the composite application (service assembly) is built successfully.
Following is an example of the jbi.xml in HTTP BC's service unit jar. CASA editor and Comp(osite)App(lication) project is
designed to make this whole process easy, however, it is possible to manually add the application configuration
in the jbi.xml (take care to add it to the 'correct' consumes or provides element):
   <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
   <jbi xmlns="" xmlns:ns1="http://localhost/SynchronousSample/SynchronousSample"                    
        xmlns:ns2="" version="1.0">
      <services binding-component="true">
         <consumes endpoint-name="port1" interface-name="ns1:portType1" service-name="ns1:service1">
             <application-config xmlns="" name="myConfigObject"/>

3. Now you can deploy the same composite application (service assembly) .zip file to any runtime environment.
To make sure that the endpoint address is appropriate for the runtime environment, you can define the actual value
for the application configuration:

  • Using NetBeans JBI Manager
    • Right click on "properties" menu item on HTTP BC
    • Click on the "..." button next to configuration property "Application Configuration Objects"
    • Add a new Application Object and define the value for the HTTP URL location:\


For better usability, HTTP BC loads the application configuration objects defined in the service
unit automatically when composite application(service assembly) is deployed - all application configuration objects
defined in the SA will be loaded in the "Application Configuration Objects" property. Of course, the connection
property associated with each application configuration needs to be defined correctly before the service unit
can be started properly.
The value for the HTTP URL location can also reference application variables, which is also a configuation property
available on HTTP BC. When a service unit is deployed, any application variables referenced are also loaded automatically
by HTTP BC. Proper token syntax (e.g. ${var1}) must apply and rules of where application variables may be defined in a HTTP URL
also need to be followed:
The service assembly can be started after all referenced application configurations and/or referenced application
variables are properly defined. In the example shown here, the HTTP URL location where the echo service is provided will
be "http://localhost:18181/helloworld given the application variables values defined below:
  • Using asadmin CLI commands:
Here are the few important asadmin commands to create, update, delete and list application configurations defined in a binding component:
    • create-jbi-application-configuration
    • update-jbi-application-configuration
    • delete-jbi-application-configuration
    • list-jbi-application-configurtions

Here are some examples on how to use these commands with HTTP BC:

    • asadmin.bat create-jbi-application-configuration --component=sun-http-binding --configname=myConfigObject
where a typical looks like:
Make sure that the value for 'configurationName' in the file matches that defined for "--configname" option.
    • asadmin.bat update-jbi-application-configuration --component=sun-http-binding --configname=myConfigObject
Same content format for the file. You could use this command to update the value for HTTP URL location
    • asadmin.bat delete-jbi-application-configuration --component=sun-http-binding testConfig1
This command deletes the application configuration object called testConfig1
    • asadmin.bat list-jbi-application-configurations --component=sun-http-binding
This shows all the application configuration objects defined in HTTP BC.

For detailed information on asadmin commands, please see

Starting a service assembly would require all referenced application configurations and/or application variables
to be defined, otherwise, an exception will thrown with detailed information on what's missing.
Changes in the application configuration definitions(i.e. httpUrlLocation value changes) will take affect only
after the service assembly is restarted. A sequence of shutdown/start steps are needed to update the location URL
if the application is already running.

JSPWiki v2.4.100
« Home Index Changes Prefs
This page (revision-12) was last changed on 09-Apr-09 13:40 PM, -0700 by Sherry Weng