Skip to main content

Deploying a broker archive file

After you have created and populated a broker archive (BAR) file, you must deploy the file to an execution group on a broker, so that the file contents can be used in the broker.

Before you start:

You must create a BAR file. See Creating a broker archive.
Choose one of the following methods to deploy a broker archive file:

* Using the WebSphere Message Broker Toolkit
* Using the WebSphere Message Broker Explorer
* Using the mqsideploy command
* Using the CMP API

If you change a BAR file, and want to propagate those changes to one or more brokers, you can redeploy the updated BAR file by using one of the methods listed previously:

* Redeploying a broker archive file

The mode in which your broker is working, can affect the number of execution groups and message flows that you can deploy, and the types of node that you can use. See Restrictions that apply in each operation mode.
Using the WebSphere Message Broker Toolkit

Follow these steps to deploy a BAR file by using the WebSphere® Message Broker Toolkit:

1. Open the Brokers view in the Broker Application Development perspective.
2. Optional: Typically, an incremental BAR file deployment is performed. To perform a complete BAR file deployment, right-click the target execution group in the Brokers view and select Delete > All Flows and Resources. Wait for the operation to complete before continuing.

Do not Delete > All Flows and Resources if you want only to refresh one or more of the child processes with the contents of the BAR file. For an explanation of the difference between a complete and an incremental BAR file deployment, see Message flow application deployment.
3. Deploy a BAR file or message flow to an execution group by using one of the following methods:
* Drag a message flow or BAR file onto your target execution group, shown in the Brokers view.
* Right-click the BAR file, and click Deploy. A window opens, and lists all the brokers, and all execution groups in those brokers to which the WebSphere Message Broker Toolkit is connected.

Select an execution group, and click OK to deploy the BAR file.
* Right-click the execution group, and click Deploy. A window opens. You can choose to deploy message flows from the workspace, broker archive files from the workspace, and broker archive files from the file system.

Choose the type of resource to deploy, and then select the resource that you want to deploy from the workspace or file system. Click OK to deploy the selected resource.

Whichever method you use, you can select (and deploy to) only one execution group at a time.
4. If you have not saved the BAR file since you last edited it, you are asked whether you want to save the file before deploying. If you click Cancel, the BAR file is not saved and deployment does not take place.

The BAR file is transferred to the broker, which deploys the file contents (message flows and message sets, for example) to the execution group. In the Brokers view, the assigned message flows and message sets are added to the appropriate execution group.

Next: Continue by checking the results of the deployment; see Checking the results of deployment.
Using the WebSphere Message Broker Explorer

Optional: You can import a BAR file into the WebSphere Message Broker Explorer. See Importing a broker archive file to the WebSphere Message Broker Explorer.

Follow these steps to deploy a BAR file by using the WebSphere Message Broker Explorer:

1. Expand the Broker Resources folder, and select the folder containing your broker archive files.
2. Optional: Typically, an incremental BAR file deployment is performed. To perform a complete BAR file deployment, right-click the target execution group in the Brokers view and select Delete > All Flows and Resources. Wait for the operation to complete before continuing.

Do not Delete > All Flows and Resources if you want only to refresh one or more of the child processes with the contents of the BAR file. For an explanation of the difference between a complete and an incremental BAR file deployment, see Message flow application deployment.
3. Deploy the BAR file to an execution group by using one of the following methods:
* Drag the file onto your target execution group, shown in the Navigator view. You can drag a BAR file from either your WebSphere Message Broker Explorer workspace, or from your file system.
* Right-click the BAR file, and click Deploy file. A window opens, and lists all the brokers, and all execution groups in those brokers to which the WebSphere Message Broker Explorer is connected.

Select an execution group, and click OK to deploy the BAR file.

If you use the Deploy file method, you can select (and deploy to) multiple execution groups at a time.
4. If you have not saved the BAR file since you last edited it, you are asked whether you want to save the file before deploying. If you click Cancel, the BAR file is not saved and deployment does not take place.

The BAR file is transferred to the broker, which deploys the file contents (message flows and message sets, for example) to the execution group. Expand your broker in the Navigator view, to see the assigned message flows and message sets added to the appropriate execution group.

Next: Continue by checking the results of the deployment; see Checking the results of deployment.
Using the mqsideploy command

Follow these steps to deploy a BAR file by using the mqsideploy command:

1. Open a command window that is configured for your environment.
2. Enter the appropriate command for your platform and configuration, using the following examples as a guide.

On distributed platforms:

mqsideploy -i ipAddress -p port -q qmgr -e egroup -a barfile

The command performs an incremental deployment. Add the –m parameter to perform a complete BAR file deployment.

The -i (IP address), -p (port), and -q (queue manager) parameters represent the connection details for the queue manager associated with the broker. If you have created the broker on the computer on which you run this command, you can specify the broker name instead.

You must also specify the -e (execution group name), and -a (BAR file name) parameters.
On z/OS®:

/f MQ01BRK,dp e=egroup a=barfile

The command performs an incremental deployment. Add the m=yes parameter to perform a complete BAR file deployment.

In the example, MQ01BRK is the name of the broker. You must also specify the names of the execution group and the BAR file (the e= and a= parameters).

The command reports when responses are received from the broker. If the command completes successfully, it returns 0.

Next: Continue by checking the results of the deployment; see Checking the results of deployment.
Using the CMP API

Use the deploy method of the ExecutionGroupProxy class.
The following code shows how an application can perform an incremental deployment:

import com.ibm.broker.config.proxy.*;
public class DeployBAR {

public static void main(String[] args) {
BrokerConnectionParameters bcp =
new MQBrokerConnectionParameters("localhost", 2414, "MB7QMGR");
try {
BrokerProxy b = BrokerProxy.getInstance(bcp);
ExecutionGroupProxy eg = b.getExecutionGroupByName("default");
DeployResult dr = eg.deploy("MyBAR.bar", true, 30000);
System.out.println("Result = "+dr.getCompletionCode());
} catch (Exception e) {
e.printStackTrace();
}
}
}

By default, the deploy method performs an incremental deployment. To perform a complete deployment, use a variant of the method that includes a false value for the Boolean isIncremental parameter. For example, e.deploy("deploy.bar",false,0). Set this parameter to true requests an incremental deployment.

Next: Continue by checking the results of the deployment; see Checking the results of deployment.
Redeploying a broker archive file

If you change a BAR file, and want to propagate those changes to one or more brokers, you can redeploy the updated BAR file to one or more execution groups, by using one of the deployment methods described previously. You do not have to stop the message flows that you deployed previously; all resources in the execution group or groups that are in the redeployed BAR file are replaced and new resources are applied.

If your updates to the BAR file include the deletion of resources, a redeployment does not result in their deletion from the broker. For example, assume that your BAR file contains message flows F1, F2, and F3. Update the file by removing F2 and adding message flow F4. If you redeploy the BAR file, all four flows are available in the execution group when the redeployment has completed. F1 and F3 are replaced by the contents of the redeployed BAR file.
If you want to clear previously deployed resources from the execution group before you redeploy, perhaps because you are deleting resources, use one of the methods described earlier:

* To use the WebSphere Message Broker Toolkit, follow the instructions for a complete deployment, making sure that you select Delete > All Flows and Resources before deploying.
* To use the WebSphere Message Broker Explorer, follow the instructions for a complete deployment, making sure that you select Delete All Flows and Resources before deploying.
* To use the mqsideploy command, follow the instructions, making sure that you add the –m parameter to perform a complete BAR file deployment.
* To use the CMP API, follow the instructions for a complete deployment.

If your message flows are not transactional, stop the message flows before you redeploy to be sure that all the applications complete cleanly and are in a known and consistent state. You can stop individual message flows, execution groups, or brokers.

If your message flows are transactional, the processing logic that handles commitment or rollback ensures that resource integrity and consistency are maintained.

Next: Continue by checking the results of the redeployment. See Checking the results of deployment.

Comments

adsrerrapop

Popular posts from this blog

IBM Websphere MQ interview Questions Part 5

MQ Series: - It is an IBM web sphere product which is evolved in 1990’s. MQ series does transportation from one point to other. It is an EAI tool (Middle ware) VERSIONS:-5.0, 5.1, 5.3, 6.0, 7.0(new version). The currently using version is 6.2 Note: – MQ series supports more than 35+ operating systems. It is platform Independent. For every OS we have different MQ series software’s. But the functionality of MQ series Default path for installing MQ series is:- C: programfiles\BM\clipse\SDK30 C: programfiles\IBM\WebsphereMQ After installation it will create a group and user. Some middleware technologies are Tibco, SAP XI. MQ series deals with two things, they are OBJECTS, SERVICES. In OBJECTS we have • QUEUES • CHANNELS • PROCESS • AUTHENTICATION • QUERY MANAGER. In SERVICES we have LISTENERS. Objects: – objects are used to handle the transactions with the help of services. QUEUE MANAGER maintains all the objects and services. QUEUE: – it is a database structure

IBM Websphere MQ Reason code list / mq reason codes / websphere mq error codes / mq error messages

Reason code list ================= The following is a list of reason codes, in numeric order, providing detailed information to help you understand them, including: * An explanation of the circumstances that have caused the code to be raised * The associated completion code * Suggested programmer actions in response to the code * 0 (0000) (RC0): MQRC_NONE * 900 (0384) (RC900): MQRC_APPL_FIRST * 999 (03E7) (RC999): MQRC_APPL_LAST * 2001 (07D1) (RC2001): MQRC_ALIAS_BASE_Q_TYPE_ERROR * 2002 (07D2) (RC2002): MQRC_ALREADY_CONNECTED * 2003 (07D3) (RC2003): MQRC_BACKED_OUT * 2004 (07D4) (RC2004): MQRC_BUFFER_ERROR * 2005 (07D5) (RC2005): MQRC_BUFFER_LENGTH_ERROR * 2006 (07D6) (RC2006): MQRC_CHAR_ATTR_LENGTH_ERROR * 2007 (07D7) (RC2007): MQRC_CHAR_ATTRS_ERROR * 2008 (07D8) (RC2008): MQRC_CHAR_ATTRS_TOO_SHORT * 2009 (07D9) (RC2009): MQRC_CONNECTION_BROKEN * 2010 (07DA) (RC2010): MQRC_DATA_LENGTH_ERROR * 2011 (07DB) (RC2011): MQRC_DYNAMIC_Q_NAME_ERROR * 2012 (07DC) (RC201

IBM WebSphere MQ – Common install/uninstall issues for MQ Version on Windows - Middleware News

Creating a log file when you install or uninstall WebSphere MQ WebSphere MQ for Windows is installed using the Microsoft Installer (MSI). If you install the MQ server or client through launchpad , MQPARMS or setup.exe , then a log file is automatically generated in %temp% during installation. Alternatively you can supply parameters on the installation MSI command msiexec to generate a log file, or enable MSI logging system-wide (which generates MSI logs for all install and uninstall operations). If you uninstall through the Windows Add/Remove programs option, no log file is generated. You should either uninstall from the MSI command line and supply parameters to generate a log file, or enable MSI logging system-wide (which generates MSI logs for all install and uninstall operations). For details on how to enable MSI logging, see the following article in the WebSphere MQ product documentation: Advanced installation using msiexec For details on how to enable system-w