This is part of the larger task of developing Configuration Manager Proxy (CMP) applications and is one of the advanced features of the CMP.
Using the CMP it is possible to group multiple requests destined for the same Configuration Manager together and submit them as a single unit of work.
To start a batch the application must call the beginUpdates() method on the ConfigManagerProxy handle. This tells the CMP to hold back from submitting any state-changing requests to the Configuration Manager until it is told otherwise. The sendUpdates() method tells the CMP to submit as a batch any requests received since the last beginUpdates() call, and clearUpdates() can be used to discard a batch without submitting it to the Configuration Manager. It is possible to determine whether a batch is currently in progress by using the isBatching() method. Note that there can only be one batch in progress for each CMP handle.
One advantage of using a batch method is that it provides an assurance that no other applications can have messages processed by the Configuration Manager during the batch. When a Configuration Manager receives a batch of requests, it processes each request in the batch in the order it was added to the batch (FIFO), and requests from no other CMP application are processed until the entire batch is completed.
BrokerProxy b2 = topology.createBroker("B2", "QMB2"); ExecutionGroupProxy e = b2.createExecutionGroup("default"); b2.deploy();
Without using a batch method it is not possible to guarantee the success of these actions. For example, even if each command would otherwise succeed, it is possible for a second (possibly remote) application to delete the broker B2 after it has been created by the first application, but before the other two commands are processed.
cmp.startUpdates(); BrokerProxy b2 = topology.createBroker("B2", "QMB2"); ExecutionGroupProxy e = b2.createExecutionGroup("default"); b2.deploy(); cmp.sendUpdates();
Another advantage of using a batch method is performance. The CMP typically sends one WebSphere MQ message to the Configuration Manager for each request. In a situation that requires lots of requests to be sent in quick succession – the creation of a topic hierarchy, for example, a batch method has a significant impact on performance in terms of both time taken to process the requests and memory. Each batch of requests is sent in a single WebSphere MQ message and so the overhead for each method is drastically reduced.
Batch mode does not provide transactional (commit and backout) capability; it is possible that some requests in a batch succeed and others fail. If the Configuration Manager processes a request in a batch that fails, it continues to process the next request in the batch regardless.
Notices |
Trademarks |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
ae33130_ |