Author |
Message
|
sysugong |
Posted: Mon Sep 10, 2012 5:32 am Post subject: can't get the correct UserTrace level using getUserTrace() |
|
|
Newbie
Joined: 10 Sep 2012 Posts: 6
|
I have some codes like below trying to get the UserTrace level of message flows, but it always return none.
I have opened the user trace level to debug using command:
mqsichangetrace <broker> -u -e <EG> -f <flow> -l debug;
and I can use command mqsireporttrace to check that the trace level is already debug.
Could you give some advice about this? My broker version is 6109.
BrokerConnectionParameters bcp = new MQBrokerConnectionParameters("localhost", 1414, "QMGR");
BrokerProxy b = BrokerProxy.getInstance(bcp);
ExecutionGroupProxy e = b.getExecutionGroupByName("default");
MessageFlowProxy m = e.getMessageFlowByName("mf1");
String UserTraceLevel=m.getUserTrace().toString(); |
|
Back to top |
|
 |
Vitor |
Posted: Mon Sep 10, 2012 7:16 am Post subject: Re: can't get the correct UserTrace level using getUserTrace |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
sysugong wrote: |
Could you give some advice about this? My broker version is 6109. |
Best advice - upgrade to a supported version of WMB & try again.
Or extract it with the command line tools & shut the trace off again. It's not a great idea to switch debug on and just leave it. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
smdavies99 |
Posted: Mon Sep 10, 2012 9:42 am Post subject: Re: can't get the correct UserTrace level using getUserTrace |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Vitor wrote: |
Best advice - upgrade to a supported version of WMB & try again.
|
I didn't think that V6.1 had gone out of support already???? _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Sep 10, 2012 11:56 am Post subject: Re: can't get the correct UserTrace level using getUserTrace |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
smdavies99 wrote: |
Vitor wrote: |
Best advice - upgrade to a supported version of WMB & try again.
|
I didn't think that V6.1 had gone out of support already???? |
Might not have - been a heavy day this end.
But it's still better to be on v7. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mapa |
Posted: Mon Sep 10, 2012 2:01 pm Post subject: |
|
|
 Master
Joined: 09 Aug 2001 Posts: 257 Location: Malmö, Sweden
|
The code works just fine on my local Windows WMB 8.0.0.0.
It reports the correct usertrace for my flows.
Do you get the same result if you try the CMP Exerciser?
Then again, come to think of it, if you are on 6.1.0.9, shouldn't you go via the configmanager?
Your code seems like V7 or later? |
|
Back to top |
|
 |
sysugong |
Posted: Mon Sep 10, 2012 6:57 pm Post subject: |
|
|
Newbie
Joined: 10 Sep 2012 Posts: 6
|
Thanks for your reples.
yes, I am using CMP exerciser, only make some modification of function displayMessageFlowRunstate() in file DomainInfo.java.
I'm not very understand the meaning of "shouldn't you go via the configmanager?", do you mean using command "mqsireporttrace" to get it? I want to get the usertrace level of all message flows, so I think using CMP is more convenient.
I'm sure my broker version is 6.1.0.9 |
|
Back to top |
|
 |
mapa |
Posted: Tue Sep 11, 2012 2:40 am Post subject: |
|
|
 Master
Joined: 09 Aug 2001 Posts: 257 Location: Malmö, Sweden
|
I meant the code you posted are using an MQBrokerConnectionParameters as together with the BrokerProxy to connect to the broker:
Code: |
BrokerConnectionParameters bcp = new MQBrokerConnectionParameters("localhost", 1414, "QMGR");
BrokerProxy b = BrokerProxy.getInstance(bcp);
ExecutionGroupProxy e = b.getExecutionGroupByName("default");
|
In 6.1 I believe you have to do as in the documented in the 6.1 Infocenter, for instance here:
Navigating broker domains using the Configuration Manager Proxy
No expert on the subject though since I haven't used CMP much. |
|
Back to top |
|
 |
sysugong |
Posted: Tue Sep 11, 2012 4:57 am Post subject: |
|
|
Newbie
Joined: 10 Sep 2012 Posts: 6
|
I tried again this afternoon, found it can get the correct usertrace level . But there is a bit delay.For example, I use command "mqsichangetrace" to change the trace level to "normal", I can use command "mqsireporttrace" directly to find that the level is already changed to "normal". But by using CMP, I need to wait about 20 minutes, at the same time, I can see an sign "!" on the flow from the toolkit indicated that the flow is on "normal" trace.
When you run CMP on WMB 8.0, did you get the change very soon? |
|
Back to top |
|
 |
mapa |
Posted: Wed Sep 12, 2012 5:00 am Post subject: |
|
|
 Master
Joined: 09 Aug 2001 Posts: 257 Location: Malmö, Sweden
|
Yes, when running on my Windows WMB8 (client and server on my laptop) it is current information.
I change trace and when I run the code after the change is reflected. |
|
Back to top |
|
 |
nathanw |
Posted: Wed Sep 12, 2012 5:06 am Post subject: |
|
|
 Knight
Joined: 14 Jul 2004 Posts: 550
|
the only time i have seen a changetrace command take that long to process and complete is when there is a monitoring solution on the server and it interfered with the responses
when compiling a trace from xml to txt etc it may take some time if it is very very large but 20 minutes would be a huge trace file _________________ Who is General Failure and why is he reading my hard drive?
Artificial Intelligence stands no chance against Natural Stupidity.
Only the User Trace Speaks The Truth  |
|
Back to top |
|
 |
sysugong |
Posted: Wed Sep 12, 2012 6:50 pm Post subject: |
|
|
Newbie
Joined: 10 Sep 2012 Posts: 6
|
"In v6.1, everything happens asynchronously, so you should use the registerListener() method, and use a callback to catch the response method."
Not sure whether it is because of "In v6.1, everything happens asynchronously",
so I need to wait some minutes to get the correct user trace level. |
|
Back to top |
|
 |
|