Académique Documents
Professionnel Documents
Culture Documents
Introduction
This article provides a step-by-step guide for creating IBM WebSphere Message
Broker deployable packages from source code using Ant scripts. It also shows you
how to create different build parameter files and deployable packages tailored for
different target environments.
A broker archive (BAR) file enables you to deploy or dynamically install executable
content to a WebSphere Message Broker domain or execution group. A BAR file is a
standard ZIP file with the extension .bar instead of .zip. BAR files are similar to the
EAR files used for J2EE deployment packages, which are ZIP files with the
extension .ear instead of .zip. A BAR file contains a single deployment descriptor
named broker.xml along with compiled message flows, message set dictionaries,
XML, XSLT, and JAR files used by the Java compute node or within ESQL code. The
broker.xml deployment descriptor file is stored in the META-INF directory within the
BAR file, and it specifies overrides for the configurable properties in all of the
message flows within a given BAR file.
Creating BAR files manually or using the WebSphere Message Broker toolkit is not
an ideal option in an enterprise environment. This article shows you how to create a
BAR file from source code located in a source control directory, apply environmentspecific parameters to the generated BAR files, and deploy them in a target
environment.
</xsd:complexType>
</xsd:element>
<xsd:element name="CompiledMessageFlow">
<xsd:annotation>
<xsd:documentation>
A CompiledMessageFlow element defines all the property overrides
for a single compiled msgflow ("CMF") file in the root folder of
the bar archive.
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="ConfigurableProperty" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="ConfigurableProperty">
<xsd:annotation>
<xsd:documentation>
A ConfigurableProperty optionally specifies a deploy-time
value for a single configurable property.
Attribute "uri" specifies the broker-schema qualified flow name,
the node name (if needed),and the property name. Uri is required.
Attribute "override" specifies the value to assign to the
property during installation.
Override is optional. If override is not set, the configurable
property value at install defaults to the value in the flow.
If override is set (even to ""), the value of the configurable
property at install is set to the value of override.
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:attribute ref="uri" use="required" />
<xsd:attribute ref="override" use="optional" />
</xsd:complexType>
</xsd:element>
<xsd:attribute name="uri" type="xsd:string">
<xsd:annotation>
<xsd:documentation>
The following specifies the syntax for uri attribute values in the
broker.xml ConfigurableProperty elements.
URI
>>--+-------------------+--flowName-- # --+-----------------+--propertyName-->>
+--schemaName-- . --+
+--nodeName-- . --+
where:
* "schemaName" is the name of the Broker schema the msgflow was defined in,
or nothing if the msgflow is defined in the unnamed schema.
schemaName is a dot separated list of path segments.
* "flowName" is the name of the msgflow; i.e. the name of the file without
the .msgflow or .msgnode extension.
* "nodeName" is the label of the node, if the property is defined on a node.
The nodeName parameter is optional, and does not appear if the
property is defined on a flow.
* propertyName is the name of the property, or the label key if the node is
a primitive node. The descriptor tab of the BAR editor displays
the NL enabled name if the label key matches a NL enabled name,
else it displays the key itself.
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
Parameters
-data <workspace>
(Required) Path of the workspace in which your projects are created.
-b barName
(Required) Name of the BAR file where the result is stored. The BAR file is
replaced if it already exists, and the META-INF/broker.xml file is created within
the BAR file.
-cleanBuild
(Optional) Refreshes the projects in the workspace and then invokes a clean
build before new items are added to the BAR file. Use the -cleanBuild
parameter to refresh all projects in the BAR file and invoke a clean build if
amendments have been made to the BAR file resources using external tools.
-version VersionString
(Optional) Appends the underscore (_) character and the value of
VersionString to the names of the objects added to the BAR file, before the file
extension. Message Broker V6 or later includes runtime versioning, and you
should use it to version your source files and propagate them to the deployed
execution group.
-esql21
To modify the configurable properties within the broker.xml file, you can either use
the Broker Archive Editor in the WebSphere Message Broker toolkit, or manually
unzip the BAR file and manipulate broker.xml outside the Message Broker
environment. The mqsiapplybaroverride command can help you modify the
configurable properties in a BAR file. This article shows you how to use Ant to build
and maintain BAR files from within WebSphere Message Broker. Ant is like a Java
version of make, and as with make, Ant targets can depend on other targets.
Using the mqsiapplybaroverride command lets you replace configurable values in
the BAR file deployment descriptor with new values that you specify in a properties
file. You can use mqsiapplybaroverride in conjunction with the mqsicreatebar
command. Here is the syntax diagram for the mqsiapplybaroverride command -- for
more information, see mqsiapplybaroverride command in the in the WebSphere
Message Broker V7 information center.
>>-mqsiapplybaroverride-- -b --BarFile-- -p --PropertiesFile---><
Parameters
-b BarFile
(Required) Path to the BAR file (absolute, or relative to the executable
command),