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 » IBM MQ API Support » getCurrentDepth returns -1

Post new topic  Reply to topic
 getCurrentDepth returns -1 « View previous topic :: View next topic » 
Author Message
bkc98
PostPosted: Fri Jul 25, 2003 11:24 am    Post subject: getCurrentDepth returns -1 Reply with quote

Novice

Joined: 25 Jul 2003
Posts: 10

Hi there,

I'm writing a dashboard/plugin app and the plugin I'm currently working on is one that reports the queue depths our various production applications use.

I have written a .Net class that creates instances of the MQAX200.MQSession and MQAX200.MQQueueManager ProgIDs (in C#), and then uses the correct server names, queue manager names, queue info, etc to successfully get the queue depths.

For some reason, when getting the queue depth of a batch queue, the result always comes back as -1.

All other queue depths come back with the real values, but for some reason the batch queue always returns -1. Even the batch reply queue returns the correct queue depth value.

No exception is being thrown when getting the batch queue depth. Also, trying to access ANY property (MaximumDepth, etc) results in a -1.

Any help on this is much appreciated.

Thanks in advance,

/bc
Back to top
View user's profile Send private message Send e-mail
tej
PostPosted: Thu Aug 07, 2003 7:28 am    Post subject: Reply with quote

Novice

Joined: 18 Nov 2002
Posts: 20

Any .FDC files generated ant the time you run the application
Back to top
View user's profile Send private message Send e-mail
bkc98
PostPosted: Thu Aug 21, 2003 7:19 pm    Post subject: MQAX200 in C# vs. ASP Reply with quote

Novice

Joined: 25 Jul 2003
Posts: 10

Nope, no FDC files are around.

Maybe I'll try and approch my problem in another way so more of you can understand what I'm facing.

Here goes:

Inside a C# winform, I've succeeded in connecting to and getting queue depth from several queues on various servers within an enterprise environment. For some reason, when trying to get queue depth on two separate batch queues, I get a value of -1. The weird thing that is REALLY starting to annoy me is that I can get the actual queue depths from an ASP webpage on these same queues that return a -1 from inside a C# winform.

Here is the code that "works" inside the ASP page:
******************************************
Set oMQSessionFoo = CreateObject("MQAX200.MQSession", "server_foo")
Set oMQMgrFoo = oMQSessionCOMM01.AccessQueueManager("foo")

Set oMQBatch01 = oMQMgrFoo.AccessQueue("queueNameFoo", 32, "foo", , "some user")

Batch01Depth = oMQBatch01.CurrentDepth
******************************************


Here is the C# code
******************************************
const SESSION_PROG_ID = "MQAX200.Session"
const QUEUE_MGR_PROG_ID = "MQAX200.QueueManager"
private System.Type m_typeMQSession;
private System.Type m_typeMQMgr;
private object m_oMQSessionInstance;
private object m_oMQMgr;
private object m_oMQQueue;


m_typeMQSession = System.Type.GetTypeFromProgID( SESSION_PROG_ID, m_sServerName, true );

m_typeMQMgr = System.Type.GetTypeFromProgID( QUEUE_MGR_PROG_ID, m_sServerName, true );

m_oMQSessionInstance = System.Activator.CreateInstance( m_typeMQSession );

m_oMQMgr = m_typeMQSession.InvokeMember( "AccessQueueManager", System.Reflection.BindingFlags.InvokeMethod, null, m_oMQSessionInstance, new object[] {m_sQueueMgr} );

m_oMQQueue = m_typeMQMgr.InvokeMember( "AccessQueue", System.Reflection.BindingFlags.InvokeMethod, null, m_oMQMgr, new object[] {m_sQueue, m_InputAsQDef.ToString(), "", m_sUser} );


return long.Parse(m_typeMQMgr.InvokeMember( "CurrentDepth", System.Reflection.BindingFlags.InvokeMethod, null, m_oMQQueue, null ).ToString());
******************************************


What types of things would cause the ASP code (running on an IIS webserver) to successfully get the queue depth and yet cause the C# winform code to return a -1 when doing the exact same thing. Again, the C# code works just fine for all queues except two. I'm not that familiar with MQSeries, so some of you may have questions about the troublesome queues in order to shed more light on the situation. I should be able to get an answer to these questions.

I'd appreciate any thoughts on this.

I'll be happy to provide any further info/clarification.

This is really bugging me, so I'd really like some help on this.

Thanks in advance....


/bc
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » getCurrentDepth returns -1
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.