Network Deployment (Distributed operating systems), v8.0 > Administer applications and their environment > Administer OSGi applications > Maintain an OSGi composition unit
Modify the configuration of an OSGi composition unit
We can 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
We can modify the configuration of an OSGi composition unit by using the administrative console as described in this topic, or by using wsadmin as described in Modify the configuration of an OSGi composition unit using wsadmin.
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:
- Maps 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.
- Maps 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 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.
This topic describes the specific task of modifying the configuration of an OSGi composition unit. The more generalized task of modifying the configuration of any composition unit is described in Update business-level applications.
Procedure
- Start the administrative console.
- Navigate to Applications > Application Types > Business-level applications > application_name > composition_unit_name.
The Composition unit settings panel is displayed.
- Under the Additional Properties section, click any of the following options then modify the settings as required.
- Session management
Configure HTTP session management for the web application bundles. See Configure session management by level.
The Session management option is only visible if the OSGi application uses web application bundles.
- Map context roots
Select a web application bundle (WAB) from the list, then enter the context root for the WAB. For example, /sample. See Context root for web application bundles [Settings].
The Map context roots option is only visible if the application uses web application bundles.
- Virtual hosts
The list of available WABs in this asset is displayed. For each WAB, you can change the associated virtual host by selecting a different one from the list. If you specify an existing virtual host in the ibm-web-bnd.xml or .xmi file for a given WAB, the specified virtual host is set by default. Otherwise, the default virtual host setting is default_host. See Virtual hosts for web application bundles [Settings].
The Virtual hosts option is only visible if the application uses web application bundles.
- Security role to user/group mapping
Change the security mapping as needed. See Security role to user or group mapping [Settings].
The Security role to user/group mapping option is only visible if the application uses security roles.
- Map RunAs roles to users
We can map a specified user identity and password to a RunAs role. This enables you to specify application-specific privileges for individual users, so that they can run specific tasks using another user identity. See Map RunAs roles to users [Collection].
The Map RunAs roles to users option is only visible if the application uses RunAs roles.
- Bind Blueprint resource references
The list of available Blueprint resource references in this asset is displayed. For each reference, you can optionally select an authentication alias from the list. Default authentication aliases (from ibm-eba-bnd.xml files) are offered only if they exist on every target server or cluster. See Blueprint resource reference bindings [Settings].
The Bind Blueprint resource references option is only visible if the bundle includes Blueprint resource reference declarations.
- Web module message destination and resource environment reference bindings
The list of available web application message destination and resource environment references in this asset is displayed. That is, resources of type message-destination-ref (message destination reference) or resource-env-ref (resource environment reference), as defined in the Java specification JSR-250: Common Annotations for the Java Platform. For each reference, specify the JNDI name under which the resource is known in the runtime environment. See Web module message destination and resource environment reference bindings [Settings].
The Web module message destination and resource environment reference bindings option is only visible if the bundle includes a web application.
- Web module resource reference bindings
The list of available web application resource references in this asset is displayed. That is, resources of type resource-ref (resource reference), as defined in the Java specification JSR-250: Common Annotations for the Java Platform. For each reference, specify the JNDI name under which the resource is known in the runtime environment. Optionally, set authentication properties and extended data source custom properties, which affect how the resource is accessed at run time.
To specify the JNDI name mapping, either type the JNDI name into the box, or click Browse... then select the resource reference from the list of available resources.
To modify the authentication method or set extended data source custom properties, select a single reference then click Modify Resource Authentication Method... or Extended Properties.... See Web module resource reference bindings [Settings].
The Web module resource reference bindings option is only visible if the bundle includes a web application.
- Save your changes to the master configuration.
Results
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 WAS SystemOut.log file.
Subtopics
- Modify the configuration of an OSGi composition unit using wsadmin
We 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.
Parent topic: Maintain an OSGi composition unit
Related concepts:
About OSGi ApplicationsRelated tasks:
Update an OSGi composition unit
Add or removing extensions for an OSGi composition unit
Secure OSGi Applications
Update business-level applicationsRelated reference:
OSGi Applications: Troubleshooting tips
Composition unit settingsRelated information:
Blueprint resource reference bindings [Settings]
Context root for web application bundles [Settings]
Security role to user or group mapping [Settings]
Map RunAs roles to users [Collection]
Virtual hosts for web application bundles [Settings]
Web module message destination and resource environment reference bindings [Settings]
Web module resource reference bindings [Settings]
Web module resource references: Available resources [Collection]
Task topic Feedback
Copyright IBM Corporation 2009, 2011. All Rights Reserved.
This information center is powered by Eclipse technology.