Deployment Guide

     Previous  Next    Open TOC in new window  Open Index in new window  View as PDF - New Window  Get Adobe Reader - New Window
Content starts here

Using the Deployment APIs

You can use the AquaLogic Service Bus MBeans in Java programs and WLST scripts to automate promotion of AquaLogic Service Bus configurations from development environments through testing, staging, and finally to production environments. The AquaLogic Service Bus MBeans you can use to programmatically perform deployment operations include:

The latter MBeans are interfaces in the com.bea.wli.sb.management.configuration package.

Numerous customization options can be applied during deployment. An extended list of environment variables allows you to preserve or tailor settings when moving from one environment to another.

This section contains the following topics:

Tip: AquaLogic Service Bus APIs are documented at http://download.oracle.com/docs/cd/E13171_01/alsb/docs26/javadoc

 


Managing Sessions Using Programs and Scripts

AquaLogic Service Bus sessions allow different users to update discrete parts of configuration data without interfering with each other. A session is essentially a named sandbox, in which your changes are abstracted from other users, as well as from the core data (the data on which AquaLogic Service Bus runs), until the changes are activated. In order to modify resources and AquaLogic Service Bus configurations, you must create a session and perform changes in that session. The changes are only reflected in the core data when you activate the session. You can create multiple sessions as long as no two sessions have the same name. A session can only be activated using the instance of the SessionManagementMBean that works on that session data.

Each MBean type, except for SessionManagementMBean, has one instance per session. When a session is created, a new set of MBean instances (one for each MBean Type) is created automatically. One instance of each MBean Type operates on the core data that is saved to the AquaLogic Service Bus data cache. MBean instances created for a session are destroyed when the session is discarded or activated. MBean instances that operate on core data, however, are never destroyed. MBean instances that work on core data do not support update operations.

Creating, Activating, Discarding, and Locating Sessions

AquaLogic Service Bus sessions are created using the AquaLogic Service Bus Console. The methods in the SessionManagementMBean interface directly parallel the interactive features provided in the AquaLogic Service Bus Console, and require execution in the same order as their GUI counterparts. The following table lists the methods available in the SessionManagementMBean interface and the tasks they perform.

Table A-1 Session Management Methods
To...
Use...
  1. Activate a session
activateSession(String session, String description)
  1. Create a new session with a user-specified name.
createSession(String session)
  1. Delete the session without activating changes
discardSession(String session)
  1. Return true if a session with the given session name exists
sessionExists(String session)

For reference material on the SessionManagementMBean interface and Java usage examples, as well as sample code describing how to use MBeans from a Java client and in a script, see the SessionManagementMBean Interface in the com.bea.wli.sb.management.configuration package in the AquaLogic Service Bus Javadoc.

Examples

The SessionManagementMBean Interface in the com.bea.wli.sb.management.configuration package in the AquaLogic Service Bus javadoc includes example code illustrating how to create a session, how to obtain SessionManagementMBean for creating a session, and ALSBConfigurationMBean for operating on the session that is created and on core data, and so on.

 


Managing Configuration Tasks Using Programs and Scripts

The AquaLogic Service Bus ALSBConfigurationMBean allows you to programmatically query, export and import resources, obtain validation errors, get and set environment values, and in general manage resource configuration in an AquaLogic Service Bus domain. AquaLogic Service Bus configurations are packaged as simple JARs containing AquaLogic Service Bus resources such as proxy services, WSDLs, and business services. These resources can span multiple projects, or contain only partial configuration information. For example, you can export only a subset of a project, a whole project, or subsets of resources from many projects.

The following sections describe how to use the ALSBConfigurationMBean to perform these deployment activities from a Java client:

For reference material on the ALSBConfigurationMBean interface, see the ALSBConfigurationMBean Interface in the com.bea.wli.sb.management.configuration package in the AquaLogic Service Bus javadoc, which is available at the following URL: http://download.oracle.com/docs/cd/E13171_01/alsb/docs26/javadoc/

Importing, Exporting, and Querying Configurations

AquaLogic Service Bus configurations are created using the AquaLogic Service Bus Console, and are stored through export in .jar files. After a configuration .jar file has been exported, you can promote the configuration by importing it into a different AquaLogic Service Bus domain and changing the environment-specific values in the configuration to match those of the new environment.

The methods in the ALSBConfigurationMBean Interface allow you to manage resources in an AquaLogic Service Bus domain, including tasks such as:

and so on. See the ALSBConfigurationMBean Javadoc for the comprehensive method summary for the ALSBConfigurationMBean methods.

Updating Environment-Specific Information

The methods in ALSBConfigurationMBean and the Customization Class allow you to update environment specific information. This includes.

and so on. See the ALSBConfigurationMBean Javadoc and the Customization Class Javadoc for a comprehensive summary of methods. Import customizations are supported by the ALSBImportPlan—see the ALSBImportPlan Class in the Javadoc.

You must update your security configuration and all other environment-specific settings interactively using the AquaLogic Service Bus Console. For information on configuring security, see Securing Inbound and Outbound Messages in the BEA AquaLogic Service Bus Console Online Help. For information on configuring other environment-specific settings, see Step 4. Deploy an AquaLogic Service Bus Configuration.

Examples

The ALSBConfigurationMBean Interface in the com.bea.wli.sb.management.configuration package in the AquaLogic Service Bus javadoc includes example code illustrating how to import and export AquaLogic Service Bus configurations, how to change environment values, how to query resources, and so on.

 


APIs Deprecated in AquaLogic Service Bus 2.6

The following deployment APIs (in the ALSBConfigurationMBean) are deprecated in AquaLogic Service Bus 2.6:

  1. To import selected resources/projects/folders from a previously uploaded JAR file
  2. public ImportResult importUploaded(Collection<Ref> refs, boolean includeDependencies, boolean preserveExistingEnvValues, String passphrase) throws Exception;

    was deprecated in 2.6 in favor of:

    ImportResult importUploaded(ALSBImportPlan importPlan)throws Exception;

    The latter API allows more import customizations via the ALSBImportPlan. For information about the ALSBImportPlan, see

  3. To Find and Replace Environment Values
  4. Find environment values as indicated by the query and replace all occurrences of the environment value pattern (as returned by EnvValueQuery.getSearchString()) with the given parameter.

    public int replaceEnvValues(EnvValueQuery query, String replacement) throws Exception;

    Deprecated in 2.6 in favor of:

    customize(List <Customization> customizations) throws Exception

    in the ALSBConfigurationMBean.

    Use FindAndReplaceCustomization for modifying environment values by doing string substitutions.

  5. To Set One or More Environment Values
  6. Set one or more environment values directly

    public void assignEnvValues(Collection<QualifiedEnvValue> envValues) throws NotFoundException, UpdateException;

    Deprecated in 2.6 in favor of:

    customize(List <Customization> customizations) throws Exception 

    in the ALSBConfigurationMBean.

    Use EnvValueCustomization for environment value assignments.

Related Topics

AquaLogic Service Bus APIs in the BEA AquaLogic Service Bus User Guide.


  Back to Top       Previous  Next