ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Using the script processing for the CMP Exerciser

Post new topic  Reply to topic
 Using the script processing for the CMP Exerciser « View previous topic :: View next topic » 
Author Message
x061294
PostPosted: Wed Jan 11, 2006 8:57 am    Post subject: Using the script processing for the CMP Exerciser Reply with quote

Acolyte

Joined: 05 Apr 2005
Posts: 62

Has anyone tried using the scripting for the API Exerciser? I have successfully used the exerciser initially just to make sure all is working, and then used it to record a script. When I then use the exerciser to playback the script it always skips past the first command other than the connect. So, for example, if I execut and record:
- connect to config mgr
- stop a message flow
- remove a message flow
- disconnect

the message flow is successfully stopped, and removed.

I then put the message flow back in and runthe playback, and, it skips the stop a flow command, then does the connect, does the remove and disconnect. I've put in pauses before every step with no success. I've done commands other than stop a flow as the first step after the connect and still no success.


Attached is the script and the log of the playback, and, you can see from the log that it doesn't do the invokation of the testStopMsgFlows because it's exeucting that before the connect, even though the connect is first in the playback.

Code:
<?xml version="1.0" encoding="UTF-8"?>
<script
    progid="Samples/ConfigManagerProxy/cmp/exerciser/CMPAPIExerciser.java, Config.Proxy, S000, S000-L50831.3 1.51"
    progname="Configuration Manager Proxy API Exerciser" progver="1.0">
    <method name="pauseRecording" owner="this">
        <parameter type="int" value="10"/>
    </method>
    <method name="testConnect" owner="classTesterCMP">
        <parameter type="java.lang.String" value="localhost"/>
        <parameter type="int" value="1415"/>
        <parameter type="java.lang.String" value="EUROPE"/>
        <parameter type="java.lang.String" value=""/>
        <parameter type="java.lang.String" value=""/>
    </method>
    <method name="pauseRecording" owner="this">
        <parameter type="int" value="10"/>
    </method>
    <method name="testStopMsgFlows" owner="classTesterMisc">
        <parameter type="com.ibm.broker.config.proxy.AdministeredObject" value="ConfigMgr6/PubSubTopology/EUROPE/default/D"/>
        <parameter type="boolean" value="y"/>
    </method>
    <method name="pauseRecording" owner="this">
        <parameter type="int" value="10"/>
    </method>
    <method name="testDeleteMsgFlow" owner="classTesterFlow">
        <parameter type="com.ibm.broker.config.proxy.MessageFlowProxy" value="ConfigMgr6/PubSubTopology/EUROPE/default/D"/>
    </method>
    <method name="pauseRecording" owner="this">
        <parameter type="int" value="10"/>
    </method>
    <method name="testDisconnect" owner="classTesterCMP"/>
</script>



    (1/10/06 11:49:26 AM) ----> cmp.exerciser.CMPAPIExerciser.startPlaybackOnNewThread("C:\Documents and Settings\halburt\My Documents\Script1-remove.xml")
    (1/10/06 11:49:26 AM) Note that you can also play back scripts by specifying the script file as a command-line parameter to this program.
    (1/10/06 11:49:26 AM) <---- cmp.exerciser.CMPAPIExerciser.startPlaybackOnNewThread
    (1/10/06 11:49:26 AM) Starting to play back script.
    (1/10/06 11:49:26 AM)
    (1/10/06 11:49:26 AM) ----> cmp.exerciser.CMPAPIExerciser.pauseRecording(10)
    (1/10/06 11:49:36 AM) Warning: The object 'ConfigMgr6/PubSubTopology/EUROPE/default/D' could not be found in the hierarchy.
    (1/10/06 11:49:36 AM) Warning: Ignored the request to invoke testStopMsgFlows because a named object could not be found.
    (1/10/06 11:49:36 AM) <---- cmp.exerciser.CMPAPIExerciser.pauseRecording
    (1/10/06 11:49:36 AM)
    (1/10/06 11:49:36 AM) ----> cmp.exerciser.ClassTesterForConfigManagerProxy.testConnect("localhost", 1415, "EUROPE", "", "")
    (1/10/06 11:49:36 AM) Successfully connected to the Configuration Manager's Queue Manager.
    (1/10/06 11:49:37 AM) Successfully connected to the Configuration Manager.
    (1/10/06 11:49:40 AM) Successfully registered for domain object <D>.
    (1/10/06 11:49:41 AM) Successfully registered for domain object <EED_JCompute_Simple_Two>.
    (1/10/06 11:49:41 AM) Successfully registered for domain object <EEC_JCompute_Simple>.
    (1/10/06 11:49:41 AM) Successfully registered for domain object <EEB_MQGet_Simple>.
    (1/10/06 11:49:41 AM) Successfully registered for domain object <EEA_MQGet_Grouping>.
    (1/10/06 11:49:41 AM) Successfully registered for domain object <BackendReplyApp>.
    (1/10/06 11:49:41 AM) Successfully registered for domain object <Request>.
    (1/10/06 11:49:41 AM) Successfully registered for domain object <Reply>.
    (1/10/06 11:49:41 AM) Successfully registered for domain object <default>.
    (1/10/06 11:49:42 AM) Successfully registered for domain object <EEA_MQGet_Grouping>.
    (1/10/06 11:49:42 AM) Successfully registered for domain object <newtim2>.
    (1/10/06 11:49:42 AM) Successfully registered for domain object <EUROPE>.
    (1/10/06 11:49:42 AM) Successfully registered for domain object <PubSubTopology>.
    (1/10/06 11:49:42 AM) Successfully registered for domain object <TopicRoot>.
    (1/10/06 11:49:42 AM) Successfully registered for domain object <Log (roseilnk6207a\halburt)>.
    (1/10/06 11:49:42 AM) Successfully registered for domain object <ConfigMgr6>.
    (1/10/06 11:49:42 AM) The Configuration Manager's object hierarchy is available for use.
    (1/10/06 11:49:42 AM) Click on an object in the hierarchy to select it and display its properties.
    (1/10/06 11:49:42 AM) Right-click on a selected object to manipulate it.
    (1/10/06 11:49:42 AM) <---- cmp.exerciser.ClassTesterForConfigManagerProxy.testConnect
    (1/10/06 11:49:42 AM)
    (1/10/06 11:49:42 AM) ----> cmp.exerciser.CMPAPIExerciser.pauseRecording(10)
    (1/10/06 11:49:52 AM) <---- cmp.exerciser.CMPAPIExerciser.pauseRecording
    (1/10/06 11:49:52 AM) Finished playing back script.
    (1/10/06 11:49:53 AM)
    (1/10/06 11:49:53 AM) ----> cmp.exerciser.CMPAPIExerciser.pauseRecording(10)
    (1/10/06 11:50:03 AM) <---- cmp.exerciser.CMPAPIExerciser.pauseRecording
    (1/10/06 11:50:03 AM)
    (1/10/06 11:50:03 AM) ----> cmp.exerciser.ClassTesterForMessageFlowProxy.testDeleteMsgFlow(<D>)
    (1/10/06 11:50:04 AM)
    (1/10/06 11:50:04 AM) ----> cmp.exerciser.ExerciserAdministeredObjectListener.processActionResponse(...)
    (1/10/06 11:50:04 AM) affectedObject = default
    (1/10/06 11:50:04 AM) completionCode = success
    (1/10/06 11:50:04 AM) (Log entry) {message=BIP1520I, detail=BIP1520I: The Configuration Manager has initiated a deployment operation.
    ...


Looking for any ideas/thoughts
Back to top
View user's profile Send private message
mqmatt
PostPosted: Wed Jan 11, 2006 2:07 pm    Post subject: Reply with quote

Grand Master

Joined: 04 Aug 2004
Posts: 1213
Location: Hursley, UK

I've just reproduced this. It looks like the Exerciser isn't waiting long enough for the Administered Objects to be initialised before timing out.
In CMPAPIExerciser.getAdministeredObjectFromString(), increase the maximum value of the retries variable, for example:

Code:
if (retries > 99) {
  ...
}

...instead of 9.
Feel free to raise a PMR to get that value raised in future CSDs; on reflection I think it's too low.
Back to top
View user's profile Send private message
mqmatt
PostPosted: Wed Jan 11, 2006 2:24 pm    Post subject: Reply with quote

Grand Master

Joined: 04 Aug 2004
Posts: 1213
Location: Hursley, UK

My goodness, I've found another problem here.
If you try and replay your script without the Exerciser GUI (i.e. you specify the script's filename on the command line), the program quits too early.

To get round this, put this code into CMPAPIExerciser.startPlayback(String), after the log(ResourcesHandler.getNLSResource(ResourcesHandler.PLAYBACK_FINISHED)); line.
Code:
while (commandThread.commandQueue.size()>0) {
      Thread.sleep(1000);
}

If you do raise a PMR, you might like to mention this fix too.

Right, I'm going to stop looking at this app now before I embarrass myself further.

-Matt
Back to top
View user's profile Send private message
x061294
PostPosted: Wed Jan 11, 2006 8:05 pm    Post subject: Reply with quote

Acolyte

Joined: 05 Apr 2005
Posts: 62

Thanks for the information. I'll give it a shot. I hope I don't find any more features All in all it's a great jump start, just need to work out the kinks.

I'll also open that PMR for future releases.
Back to top
View user's profile Send private message
mqmatt
PostPosted: Tue Feb 14, 2006 2:56 am    Post subject: Reply with quote

Grand Master

Joined: 04 Aug 2004
Posts: 1213
Location: Hursley, UK

Hello there, did you get any further with these suggestions?
I've made the changes in the fixpack codestream, but I want to make sure it actually solves your problem before claiming it's fixed

-Matt
Back to top
View user's profile Send private message
x061294
PostPosted: Mon Feb 20, 2006 10:23 am    Post subject: Reply with quote

Acolyte

Joined: 05 Apr 2005
Posts: 62

Sorry to say I never tested it further. With the problems I was having I went with the script based commands instead of trying to script the exerciser. I was able to accomplish most of what I needed through the script commands so haven't had a chance to get back to this.

The script based processing though only takes you so far, so it is likely I'll be getting back to this soon. Will let you know if i encounter any other issues.

Thanks....
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Using the script processing for the CMP Exerciser
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.