Author |
Message
|
jdlennon |
Posted: Wed May 24, 2006 9:06 am Post subject: CMP API Exerciser - Using scripts |
|
|
 Novice
Joined: 07 Oct 2004 Posts: 19 Location: The Villages, FL
|
I am trying to capture a script that creates an execution group and then deploys some existing bar files to it. I want to run the script on different brokers.
To test, I created the script. Then, I manually deleted the flow and execution group and tried to rerun the script again. The execution group gets created but I get an error saying it can not be found to do the deploy.
I then tried already having the execution group and just scripting a deploy. I get the same error. Has anyone else worked with the CMP API Exerciser and scripting a deploy? _________________ Jill D Lennon |
|
Back to top |
|
 |
mqmatt |
Posted: Wed May 24, 2006 4:06 pm Post subject: |
|
|
 Grand Master
Joined: 04 Aug 2004 Posts: 1213 Location: Hursley, UK
|
|
Back to top |
|
 |
mqmatt |
Posted: Wed May 24, 2006 4:24 pm Post subject: |
|
|
 Grand Master
Joined: 04 Aug 2004 Posts: 1213 Location: Hursley, UK
|
Actually, ignore my above post; I've tried what you suggested on FP01 and got the same error you did.
You'll find it easier to do what you want using a simple Java program; this program creates a new execution group and deploys to it:
Code: |
import com.ibm.broker.config.proxy.*;
public class CreateAndDeploy {
public static void main(String[] args) {
try {
ConfigManagerConnectionParameters cmcp = new MQConfigManagerConnectionParameters("localhost", 2414, "");
ConfigManagerProxy cmp = ConfigManagerProxy.getInstance(cmcp);
TopologyProxy t = cmp.getTopology();
BrokerProxy b = t.getBrokerByName("WBRK6_DEFAULT_BROKER");
ExecutionGroupProxy e = b.createExecutionGroup("eg1");
e.deploy("C:\\Documents and Settings\\Matt\\My Documents\\BAR Files\\SimpleIntoOut.bar");
} catch (Exception e1) {
e1.printStackTrace();
}
}
}
|
This example is not the most elegant code, but you get the general idea
Hope this helps
-Matt |
|
Back to top |
|
 |
wschutz |
Posted: Thu May 25, 2006 1:30 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Hi Jill... why not just:
Code: |
mqsicreateexecutiongroup -n <cfgfile> -b <broker> -e eg1
mqsideploy -n <cfgfile> -b <broker> -e eg1 -a barfile |
?? _________________ -wayne |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu May 25, 2006 4:12 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
wschutz wrote: |
Hi Jill... why not just: |
That would have to be run on the broker machine. (or maybe the configmgr machine)
The Java code could be run anywhere. Like in a webpage that lets you upload a bar file. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
wschutz |
Posted: Thu May 25, 2006 8:00 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
jefflowrey wrote: |
wschutz wrote: |
Hi Jill... why not just: |
That would have to be run on the broker machine. (or maybe the configmgr machine). |
why would you think that? (since the configmgr file contains the mq client connection properties)
For what Jill's trying to accomplish:
Quote: |
I am trying to capture a script that creates an execution group and then deploys some existing bar files to it. I want to run the script on different brokers.
|
the mqsi* commands would seem to fit the bill  _________________ -wayne |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu May 25, 2006 8:11 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
wschutz wrote: |
jefflowrey wrote: |
wschutz wrote: |
Hi Jill... why not just: |
That would have to be run on the broker machine. (or maybe the configmgr machine). |
why would you think that? (since the configmgr file contains the mq client connection properties) |
Because the mqsicreateexecutiongroup and mqsideploy commands have to be installed on the machine where you want to run the command!
Oops, though. Those are toolkit commands, not runtime commands.  _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|