Task: jbi-set-configuration

Description

This task modifies the configuration parameters on either the JBI runtime or a specified JBI component.

The configuration parameters are name/value pairs specified either as nested elements or as a path to a configuration file. If you specify configuration parameters with both nested elements and a configuration file, then the values specified in the configuration file are used.

Parameters

Attribute Description Required
host The machine name where the Domain Administration Server (DAS) is running. The default value is localhost. No
port The HTTP/S port for DAS administration. The default value is 4848. No
secure If set to true, uses SSL/TLS to communicate with the DAS. No
username The authorized DAS administrator user name. Yes
password Specifies a password for user authentication.

If you set a password with both the password attribute and the passwordfile attribute, the password specified in the passwordfile attribute is used for authentication.

If you do not set a password with both the password attribute and the passwordfile attribute, then no password is required.
Yes. Not required if passwordfile is set.
passwordfile Specifies a path to a password property file that is used for user authentication.

The password for user authentication is specified by the "AS_ADMIN_PASSWORD" property in the property file.

If you set a password with both the password attribute and the passwordfile attribute, the password specified in the passwordfile attribute is used for authentication.
No
failOnError Signal task failure to Ant. The default value is "true". No
params Path to the configuration parameters file that contains the list of name/value pair configuration parameters. No
componentName sets the configuration paramters for this component.
Without this parameter, the configuration parameters are set for JBI runtime.
No
target Specifies where the JBI administration tasks are performed. The default value is 'server'. No

Nested Elements

param

This nested element is a optional child element. This element takes a name/value pair for setting the configuration parameters.

Attribute Description Required
name Name of the configuration parameter. Yes
value Value of the configuration parameter to be set. No

Target Attribute Values

Target Attribute Value Behavior
'server' When the target option is not specified, or the literal string 'server' is specified, the task is executed against the embedded DAS server instance.
'domain' When the target option is the literal string 'domain', the task is executed against the domain itself, but not to any instances or clusters running on the domain.
<cluster-name> When a <cluster-name> is specified, the task is executed against all instances in the specified cluster.
<instance-name> When a <instance-name> is specified, the task is executed against the specific instance specified.

Examples

The following code shows how to set the configuration parameters for JBI runtime and JBI Components.
<!--
Load JBI task definitions.
Note:  This task is not included in the default task definitions in the asant environment.
you need to load the JBI task defininitions in the Ant script in the asant environment.
-->
<taskdef resource="com/sun/jbi/ui/ant/antlib.xml" />
<!-- setting the JBI runtime configuration -->
<!-- setting configuration parameters using nested elements -->
<jbi-set-configuration host="localhost" port="7890" target="my-cluster" >
       <param name="Foo1" value="bar1" />
       <param name="Foo2" value="bar2" />
</jbi-set-configuration>
<!-- setting configuration parameters using properties file -->
<jbi-set-configuration  params="dir/config-params.properties" /> 

<!-- setting the JBI Component configuration -->
<!-- setting configuration parameters using nested elements -->
<jbi-set-configuration host="localhost" port="7890" componentName="my-service-engine" target="my-cluster" >
       <param name="Foo1" value="bar1" />
       <param name="Foo2" value="bar2" />
</jbi-set-configuration>
<!-- setting configuration parameters using properties file -->
<jbi-set-configuration  componentName="my-service-engine" params="dir/config-params.properties" /> 
       

Copyright 2007, Sun Microsystems, Inc.