From activemq-users-return-1404-apmail-geronimo-activemq-users-archive=geronimo.apache.org@geronimo.apache.org Wed May 17 17:18:37 2006 Return-Path: Delivered-To: apmail-geronimo-activemq-users-archive@www.apache.org Received: (qmail 99314 invoked from network); 17 May 2006 17:18:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 17 May 2006 17:18:36 -0000 Received: (qmail 19860 invoked by uid 500); 17 May 2006 17:18:36 -0000 Delivered-To: apmail-geronimo-activemq-users-archive@geronimo.apache.org Received: (qmail 19839 invoked by uid 500); 17 May 2006 17:18:35 -0000 Mailing-List: contact activemq-users-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-users@geronimo.apache.org Delivered-To: mailing list activemq-users@geronimo.apache.org Received: (qmail 19830 invoked by uid 99); 17 May 2006 17:18:35 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 May 2006 10:18:35 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [66.100.65.198] (HELO BUTTHEAD.daxtechnologies.com) (66.100.65.198) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 May 2006 10:18:35 -0700 Received: from BEAVIS.daxtechnologies.com ([192.168.0.1]) by BUTTHEAD.daxtechnologies.com with Microsoft SMTPSVC(5.0.2195.6713); Wed, 17 May 2006 13:18:02 -0400 Received: from [192.168.0.34] ([192.168.0.34]) by BEAVIS.daxtechnologies.com with Microsoft SMTPSVC(5.0.2195.6713); Wed, 17 May 2006 13:18:02 -0400 Message-ID: <446B5AB3.5090000@daxtechnologies.com> Date: Wed, 17 May 2006 13:17:39 -0400 From: Adrian Tarau User-Agent: Mail/News 1.5 (X11/20060214) MIME-Version: 1.0 To: activemq-users@geronimo.apache.org Subject: Re: Remove all messages from a queue References: <4354353.post@talk.nabble.com> <4464A513.4010403@daxtechnologies.com> <44688CBA.40400@daxtechnologies.com> <4468F442.7010707@daxtechnologies.com> <4468F76D.6070607@daxtechnologies.com> <446A046C.8070303@daxtechnologies.com> <446B38FE.9050505@daxtechnologies.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 17 May 2006 17:18:02.0656 (UTC) FILETIME=[DA725A00:01C679D5] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N BrokerServer.getBroker().getDestinationMap() ? Hiram Chirino wrote: > Hi Adrian, > > If you get a hold of the BrokerServer it should be possible navigate > the object tree and be able to get a Queue object and ask it to delete > it's messages. > > > On 5/17/06, Adrian Tarau wrote: >> James? Anybody? Help? :) >> >> Adrian Tarau wrote: >> > James? Any suggestions how to clear a queue with activemq API without >> > JMX? Thanks. >> > >> > Adrian Tarau wrote: >> >> I know the utility of JMX, I use it :) But right now I don't want to >> >> activate JMX. I saw that ActiveMQ use MX4J 2.1.1(why don't use >> >> 3.0.1?) and I have already in my application MX4J 3.0.1 libraries and >> >> I remember I used 3.0.1 with a project that need 2.1.x and was not >> >> working. >> >> >> >> And of course I cannot have two version of MX4J in my application. >> >> >> >> James Strachan wrote: >> >>> On 5/15/06, Adrian Tarau wrote: >> >>>> Since I use embedded JMS is not necessary to activate also JMX, >> >>> >> >>> JMX is extremely useful. e.g. in JConsole you can watch all of the >> >>> mbeans in an application (the garbage collector, number of threads, >> >>> amount of memory free together wtih the ActiveMQ mbeans such as all >> >>> the destinations & consumers and queue depths etc >> >>> >> >>> >> >>>> and JMX >> >>>> MBeans already use those parts to interrogate for values outside >> >>>> the JMS >> >>>> standard. Why not to be accessible with Java code and only JMX? >> >>> >> >>> Everything is accessible via Java code and JMX; the reason I suggest >> >>> JMX is that >> >>> >> >>> (i) it can work with remote brokers too >> >>> (ii) it works great in JConsole - so its really easy to look at the >> >>> mbeans whenever you like (rather than having to write Java code) >> >>> >> >> >> > >> >> > >