REST Binding Component User's Guide

Creating Application Configurations for Connectivity Parameters (URLs)

Application Configurations allow you to configure the external connectivity parameters (URLs) for a JBI application and, without changing or rebuilding the application, deploy the same application into a different system. For example, if you have an application that is running in a test environment, you can deploy it to a production environment using new connectivity parameters without rebuilding the application.

The connectivity parameters for the REST BC are normally defined in the WSDL service extensibility elements. When you create and apply application configurations for these parameters, the values defined for the application configuration override the values defined in the WSDL elements. You apply the configurations to the Composite Application by entering the application configuration name in the Config Extension Name property for the appropriate endpoint.

Perform the following procedures to implement application configurations for the REST BC:

Once you create an application configuration, you can modify it as described in To Change Application Configuration Values.

ProcedureTo Create Application Configurations

You can create several application configurations, which are all referenced by the names you define. Make sure the REST Binding Component is started before you begin this procedure.

  1. On the NetBeans IDE Services window, expand Servers > GlassFish v2.1 > JBI > Binding Components.

  2. Right-click sun-rest-binding, and then select Properties.

    The Properties window appears.

  3. Click the ellipsis next to Application Configuration.

    The Application Configuration Editor appears.

  4. Click Add.

    A new row appears in the configuration list.

  5. In the new row, enter a name and URL.

    Figure shows the Application Configuration Editor.

ProcedureTo Add the Application Configuration to the Endpoint

  1. Open the Composite Application Service Assembly in the CASA Editor.

  2. Right-click the endpoint to which you want to add the application configuration, and then click Properties.

    The Properties window appears.

  3. In the Name property under Config Extension, enter the name of the application configuration.

    Figure shows the Endpoint Properties Editor.
  4. Click Close, and then click Save All on the NetBeans toolbar.

  5. Once the application configuration values are defined and added to the endpoint, deploy the application.

ProcedureTo Change Application Configuration Values

The REST Binding Component must be started in order to perform this procedure.

  1. On the NetBeans IDE Services window, expand Servers > GlassFish v2.1 > JBI > Binding Components.

  2. Right-click sun-rest-binding, and then select Properties.

    The Properties window appears.

  3. Click the ellipsis next to Application Configuration.

    The Application Configuration Editor appears.

  4. Change the value of the URL column for any of the application configurations.

  5. To apply the new values, stop and restart any service assemblies that use the application configurations you updated.