Author |
Message
|
paustin_ours |
Posted: Tue Sep 14, 2010 7:52 am Post subject: Broker 7 cmp |
|
|
Yatiri
Joined: 19 May 2004 Posts: 667 Location: columbus,oh
|
trying to write a cmp application that will get the current state of the broker and display dynamically. There is an example that shows to register a listener for broker and i get outputs when the broker stops and starts. (it only says the runstate changed, doesnt say from what to what)
So if i want to listen for EG and all the flows, do i have to register a listener for each one of those? Is there an option to say listen on everything under this broker?
I guess what i am trying to do is create a light weight cmp excerciser app which only does the display of the current runtime. |
|
Back to top |
|
 |
mqmatt |
Posted: Tue Sep 14, 2010 8:40 am Post subject: |
|
|
 Grand Master
Joined: 04 Aug 2004 Posts: 1213 Location: Hursley, UK
|
Yes, you will need to register an AdministeredObjectListener on all the objects for which you wish to receive updates. (Though of course, if you receive a notification that your broker/execution group is stopped, you can assume that the message flows etc. underneath it are also stopped )
Check out the BrokerInfo sample, it does most of what you need already. |
|
Back to top |
|
 |
paustin_ours |
Posted: Tue Sep 14, 2010 12:04 pm Post subject: |
|
|
Yatiri
Joined: 19 May 2004 Posts: 667 Location: columbus,oh
|
BrokerInfo works beautifully. Thanks. Now i want to create a http flow that reads the output of the broker info and displays it to anyone who invokes the flow.
I am thinking creating a property file with the current state of the broker runtime and then the BrokerInfo keeps updating the property file.
The Broker flow reads that property file and displays it on the output url.
Does that sound like a good way to do this? Can you think of a better way? Please let me know. Thanks. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Sep 14, 2010 1:48 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
paustin_ours wrote: |
BrokerInfo works beautifully. Thanks. Now i want to create a http flow that reads the output of the broker info and displays it to anyone who invokes the flow.
I am thinking creating a property file with the current state of the broker runtime and then the BrokerInfo keeps updating the property file.
The Broker flow reads that property file and displays it on the output url.
Does that sound like a good way to do this? Can you think of a better way? Please let me know. Thanks. |
What about a retained publication?
The current status would be held between status changes...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Sep 14, 2010 4:17 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
paustin_ours wrote: |
Can you think of a better way? Please let me know. Thanks. |
Use an HTTP/Java engine that is focused on end users rather than programs.
Or, in other words, Broker is not a Web Server. It's an HTTP-based Service Engine.
Use a Web Server environment to host USER-CENTRIC applications, use Broker to host PROCESS-CENTRIC applications. |
|
Back to top |
|
 |
paustin_ours |
Posted: Wed Sep 15, 2010 12:39 pm Post subject: |
|
|
Yatiri
Joined: 19 May 2004 Posts: 667 Location: columbus,oh
|
Thanks Guys! I might have found an issue with the BrokerInfo sample.
when i deploy the same BAR file again to the same EG, there is nothing getting reported. It is going to the processModify method but gets out of the check for changed objects.
The only difference would be the deploy time which is getting updated but nothing is getting reported in the listener. |
|
Back to top |
|
 |
paustin_ours |
Posted: Thu Sep 16, 2010 6:28 am Post subject: |
|
|
Yatiri
Joined: 19 May 2004 Posts: 667 Location: columbus,oh
|
hmm...its all making sense now. If i want to check for deploy time. I have to check for
AttributeConstants.MESSAGEFLOW_DEPLOYTIME_PROPERTY
and so forth...
Sorry i blamed the sample code too soon. This is a great sample program.
Merci beaucoup! |
|
Back to top |
|
 |
|