IntroductionPetals ESB provides support for managing the system using the scripting language Apache Ant 1.5 (or newer). This section details the mapping of the management functions provided through JMX management beans to Ant tasks. |
Table of contents
Contributors
No contributors found for: authors on selected page(s)
|
General
Error Suppression
All Petals ESB Ant tasks include an optional attribute, “failOnError”, which defaults to true. If this attribute’s
value is false, the task will never fail even if an error occurs during the Ant task execution.
Petals ESB Ant tasks
Task: jbi-install-component
This task installs a JBI component (a service engine or binding component) into a Petals ESB container. The installation process provided by this task load and install the component. This task takes optional installation configuration parameters as name/value pairs for setting the attributes of the InstallerConfigurationMBean during the installation. The task takes the configuration parameters as
optional nested <param> elements, or using an optional params attribute if the parameters are in a file.
| Attribute | Description | Default | Required ? |
|---|---|---|---|
| host | Target Petals ESB container. | localhost | No |
| port | JMX Remote port on the target server. | 7700 | No |
| username | User name for security. | "" | No |
| password | Password for security. | "" | No |
| file | URL where the JBI component archive to install is available. | Yes | |
| failOnError | Signal task failure to Ant. | true | No |
| params | Location of a text file (e.g. configuration.properties) that contains name/value pairs corresponding to the properties of the configuration MBean. |
No |
Nested lement <param>
This nested element is an optional child element containing an installation configuration parameter which will be passed to the install task. Multiple parameters require multiple <param> elements, one per parameter. This element takes a name/value pair for setting the property of the InstallerConfigurationMBean implemented by the installer of the component.
Note that the attribute name value is case sensitive. For example, if the configuration MBean has a attribute Foo as a “setFoo” not as a “setfoo”, then the name attribute value for the param element must be “Foo”. Passing the name attribute value as “foo” will result in a property not found error.
| Attribute | Description | Default | Required ? |
|---|---|---|---|
| name | Name of the property on the InstallerConfigurationMBean. Note that the attribute name is case sensitive. For example, if the ConfigurationMBean has a attribute Foo as a “setFoo” not as a “setfoo”, then the name attribute for the param element should be “Foo”. Passing the name attribute as “foo” will result in a property not found error. | Yes | |
| value | Value of the property to be set. | Yes |
Attribute params
This attribute is optional, indicating the location of a file containing installation configuration parameters which will be passed to the install task. This attribute specifies the location of a file that contains a set of name/value pairs corresponding to the attributes of the InstallerConfigurationMBean implemented by the Bootstrap implementation of the component. The Ant task read the indicated file as a java.util.Properties file, and use each named property to set equivalent attributes of the installer extension MBean.
If the jbi-install-component element contains a <param> child element, as well as a params attribute, the Ant task combine the two parameter lists, giving precedence to those defined in the properties file indicated by the params attribute. This precedence rule allows tools to generate properties files that can customize standard Ant scripts for performing installation of components.
Example
This example uses script-supplied parameters to provide the configuration data:
<!-- install component --> <jbi-install-component host = "localhost" port="7890" file = "${my.dev.dir.path}/bpel-engine.zip" /> <param name="Foo1" value="bar1" /> <param name="Foo2" value="bar2" /> </jbi-install-component>
Alternatively, an external file can be used to supply the configuration data:
<!-- install component --> <jbi-install-component file="dir/component.zip" params="dir/params.properties" port="555"/> where the contents of the dir/params.properties file are: Foo1=bar1 Foo2=bar2