Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 35068 invoked from network); 25 Jun 2008 14:39:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Jun 2008 14:39:54 -0000 Received: (qmail 32272 invoked by uid 500); 25 Jun 2008 14:39:54 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 32073 invoked by uid 500); 25 Jun 2008 14:39:54 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 32062 invoked by uid 99); 25 Jun 2008 14:39:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Jun 2008 07:39:54 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of bruce.snyder@gmail.com designates 64.233.170.191 as permitted sender) Received: from [64.233.170.191] (HELO rn-out-0910.google.com) (64.233.170.191) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Jun 2008 14:39:01 +0000 Received: by rn-out-0910.google.com with SMTP id j67so707872rne.21 for ; Wed, 25 Jun 2008 07:39:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=yHySO7sxacRd76TrOsB4AkTbLw8KGgHRAuP9Ax+rg3U=; b=WnxiAU4G11/9Duuqu2CjljmsR92lYdvCPLsuPkZ2+TpBLHxrOQ73rwyCcLxKjuc9ks ei6sr1JDt8On/JLFAO6TSjMDAPHyfxWAEAL3l5XmK7AXaolNtKlRiWnBGpPiQd9DmnGw Ay+QIByrkgF/8XzooYBlY+e856/appMqFa7+8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=O2aGVeZVKzb8Hk62IIYUI+b1bz5qsUs9wnnO2D7pLbCaJpoW6ztDZ7/BV53qop7Bvp TBdi+gwmg8HdQOpALHJf8wbvRquIB3Tx2thO7m5OULcFKA+80d1n1K/ob7k9wmgrbPma cuWVUaeNj+yksdbHeg57U5yQyB0erWMvwaTNk= Received: by 10.142.170.6 with SMTP id s6mr6875735wfe.153.1214404758613; Wed, 25 Jun 2008 07:39:18 -0700 (PDT) Received: by 10.142.185.11 with HTTP; Wed, 25 Jun 2008 07:39:18 -0700 (PDT) Message-ID: <7b3355cb0806250739l49d00430w6d2b68cc4fab63a5@mail.gmail.com> Date: Wed, 25 Jun 2008 08:39:18 -0600 From: "Bruce Snyder" To: users@activemq.apache.org Subject: Re: How can i connect to JMX beans of activemq from the code In-Reply-To: <18111006.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_2639_12583932.1214404758635" References: <18111006.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_2639_12583932.1214404758635 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Wed, Jun 25, 2008 at 6:16 AM, Michal Singer wrote: > > hi. i am trying to monitor actimve jmx beans from inside the code. > I am trying something like connecting to the JMX server the process uses > with accessing > a bean with name: > org.apache.activemq.:type=Broker > but i get exception: > com.expand.expandview.common.exceptions.EVJMXException: > javax.management.InstanceNotFoundException: > org.apache.activemq.embeddedbroker:type=Broker > > Any ideas how to connect? which object name to use? Attached is a code example of using JMX to query for the ActiveMQ MBeans and then create a topic and remove that topic. This code can be easily adapted to use queues instead of just topics. Bruce -- perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E