aspose file tools*
The moose likes Threads and Synchronization and the fly likes TibJmsAdmin : EMS Queues :Producer Count Issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "TibJmsAdmin : EMS Queues :Producer Count Issue" Watch "TibJmsAdmin : EMS Queues :Producer Count Issue" New topic
Author

TibJmsAdmin : EMS Queues :Producer Count Issue

Srinivas Aravala
Greenhorn

Joined: Aug 20, 2005
Posts: 6
EMS Queues : Hi I am trying to find out the producer count for the EMS Queues and have configred the TibJmsAdmin instance , i have provided the necesary parameters to the below function:

TibJmsAdmin Initiliazation:

private synchronized TibjmsAdmin getTibjmsInboundAdminInstance() throws TibjmsAdminException {
if (tibAdminInbound_ == null) {
tibAdminInbound_ = new TibjmsAdmin(serverUrl, userName, password);
return tibAdminInbound_;
} else {
return tibAdminInbound_;
}
}

In the Code:

TibjmsAdmin tibAdmin = getTibjmsInboundAdminInstance();
DestinationInfo destinationInfo = tibAdmin.getQueue(inQueueName);

if (shouldMonitorInBoundQueueProducer) {

inBoundProducerExists = doesInBoundQueueProducersExist(tibAdmin, destinationInfo);
}


Function to Get Prducer Count:


private boolean doesInBoundQueueProducersExist (TibjmsAdmin tibAdmin, DestinationInfo destinationInfo) throws Exception {

if (destinationInfo == null) {
System.out.println( " Queue " + destinationInfo.getName() + " unable to get record count of Producers");
return false;
} else {
ProducerInfo[] ci = tibAdmin.getProducersStatistics(tibAdmin.getConnectionId(), userName,destinationInfo);
producerCount = ci.length;
System.out.println( " Queue " + destinationInfo.getName() + " number of Producers: " + producerCount);

if (producerCount <= 0) {
return false;
} else {
return true;
}
}
}

but unfortunately always the producer count is showed 0 and function returns false, though i am connected and wrirting on to the queues.Is there any other way to find the Producer Count i used QueueInfo in place of DestinationInfo but no much use.
Please suggest. Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: TibJmsAdmin : EMS Queues :Producer Count Issue