RE: JmsAdmin API delete Queue
"Tim Anderson" <[email protected]>
| Newsgroups | gmane.comp.java.openjms.user |
|---|---|
| Message-ID | <001c01c53b7e$0fceb410$0100000a@xerces> |
Looking at the code to AdminConnection (located in src/main/org/exolab/jms/server/ in the source distribution) the isConnected() and unregisterConsumer() methods only apply to durable topic subscribers. There is no way to determine how many active consumers there are for a queue. -Tim > -----Original Message----- > From: openjms-user-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org > [mailto:openjms-user-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf Of jun liu > Sent: Saturday, 2 April 2005 9:37 PM > To: [email protected] > Subject: [openjms-user] JmsAdmin API delete Queue > > > Hi! > Enviroment :openjms7.6;oracle9.1; rmi; > Root caused: user JmsAdminServerIfc delete the queues > which have > created, > Result: openjms server print > :Javax.jms.JMSException:Cannot delete > the > administrated destination 1817671903- true since > there are 1 > active endpoints. > Relative code as follow: > JmsAdminServerIfc jmsAdmin = this.getJmsAdmin(); > Iterator it = jmsAdmin.getAllDestinations().iterator(); > for (; it.hasNext(); ) { > Destination destination = (Destination) it.next(); > String queueName = ( (Queue) > destination).getQueueName(); > if (!jmsAdmin.isConnected(queueName) && > 0 == jmsAdmin.getQueueMessageCount(queueName)) { > jmsAdmin.unregisterConsumer(queueName); > jmsAdmin.removeDestination(queueName); > } > Neither use JmsAdmin Gui Tool,nor restart Server,How to > resolve this > problem? > thanks a lot > > _________________________________________________________________ > 享用世界上最大的电子邮件系统― MSN Hotmail。 http://www.hotmail.com > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from > real users. Discover which products truly live up to the > hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > openjms-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/openjms-user > ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click