Modifying the configuration of an OSGi composition unit using wsadmin commands

You can use the editCompUnit command and the AdminConfig commands to modify the configuration information for a composition unit that contains an enterprise OSGi application. An OSGi composition unit consists of an EBA asset, (optionally) one or more composite bundle extensions, and configuration information for running the asset and composite bundle extensions in a business-level application. The configuration information can include HTTP session management, context roots, virtual hosts, security roles, run-as roles, and web application or Blueprint resource reference bindings for your OSGi application.

Before you begin

You can modify the configuration of an OSGi composition unit by using wsadmin commands as described in this topic, or by using the administrative console as described in Modifying the configuration of an OSGi composition unit.

About this task

An OSGi composition unit consists of an EBA asset, (optionally) one or more composite bundle extensions, and some or all of the following configuration information:
  • Mappings from the composition unit to a target application server, web server or cluster.
  • Configuration of the application's session manager, context roots or virtual hosts.
  • Bindings to any associated web applications or blueprint resource references.
  • Mappings from security roles to particular users or groups.

You first specify the configuration of an EBA asset or composite bundle extension when you add it to a composition unit. If bundles in the asset or composite bundle extension are subsequently changed, or if you need to remap resources, you can update the configuration. For example, if you update a bundle in an EBA asset, or replace a composite bundle extension, you might introduce a resource that requires additional configuration, such as a new or changed Blueprint resource reference, or security role mapping.

To configure all elements of the composition unit except the HTTP session manager, you use the editCompUnit command. To configure the HTTP session manager, you use the AdminConfig commands to configure the deployed object represented by the appDeploy variable.

In the following procedure, all the steps and substeps are optional. You only need to re-configure the elements that have changed.

Procedure

What to do next

After using these commands, save your changes to the master configuration by using the following command:

AdminConfig.save()

When you save the changes to the composition unit, the associated business-level application is updated to use the new configuration. If the business-level application is running, the bundle and configuration updates are applied immediately. If possible (that is, depending on the nature of the updates) the system applies the updates without restarting the application. If you update a bundle that provides only OSGi services to the rest of the application, then only that bundle is restarted. If you update a bundle that provides one or more packages to other bundles, then those bundles and any bundles to which they provide packages are restarted. If, however, a new package or service dependency is added, or an existing package or service dependency is removed, then the application is restarted; a newly added package and service can come from a newly-provisioned bundle, or from a bundle that has already been provisioned. Messages relating to any restart operations are written to the WebSphere Application Server SystemOut.log file.


Task topic

Terms of use | Feedback


Timestamp icon Last updated: Tuesday, 20 September 2011
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=matt&product=was-nd-zos&topic=ta_admin_mod_acu_wsadmin

Copyright IBM Corporation 2009, 2011. All Rights Reserved.
This information center is powered by Eclipse technology. (http://www.eclipse.org)