Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 60680 invoked from network); 5 May 2008 03:31:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 May 2008 03:31:59 -0000 Received: (qmail 36204 invoked by uid 500); 5 May 2008 03:31:53 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 36157 invoked by uid 500); 5 May 2008 03:31:53 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 36146 invoked by uid 500); 5 May 2008 03:31:53 -0000 Delivered-To: apmail-jakarta-tomcat-dev@jakarta.apache.org Received: (qmail 36140 invoked by uid 99); 5 May 2008 03:31:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 May 2008 20:31:53 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of costin@gmail.com designates 72.14.220.158 as permitted sender) Received: from [72.14.220.158] (HELO fg-out-1718.google.com) (72.14.220.158) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 May 2008 03:31:08 +0000 Received: by fg-out-1718.google.com with SMTP id 22so86307fge.1 for ; Sun, 04 May 2008 20:31:21 -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:reply-to:to:subject:mime-version:content-type; bh=7boJFPYO7EOOOJ5588ool9UAbwvqnfwK5/cJfz1Fcss=; b=xqj4o5AOY0Ake6hxAcZwpSRJYYX4UVA6XnVqRcWwaacRYnW4IsFDZxH40+fSb3T9Mv/iL8VMxt+VGLPyBPNo2ekCXkiWxfGFt8qu09TVdmGA5VW3LW7XCuCnLJZq+LMim+5ZLz9jJe2gHDJNCWtK4X7oEyuhiwtUpBaJWIZ2O9o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:to:subject:mime-version:content-type; b=S4Ejc6Gw1Trb5LO8dAGssNxJKq+t5IpEcaxMG3EgjhyejWUiSYX9CkBpjpAvdp6S2DxFNyCzgVf0F4wvQA6vR1pE4/1qmVJYToYleLpGIujuc69oe1okHvKD0+9kyTtPyhJoCneoBqnlXBhlbSD/Q09mbqc7ZkU3JcCehpS1deo= Received: by 10.82.123.16 with SMTP id v16mr510988buc.82.1209958281271; Sun, 04 May 2008 20:31:21 -0700 (PDT) Received: by 10.82.100.3 with HTTP; Sun, 4 May 2008 20:31:21 -0700 (PDT) Message-ID: <96e4b5230805042031t1dc62230pb91ff20977d7b415@mail.gmail.com> Date: Sun, 4 May 2008 20:31:21 -0700 From: "Costin Manolache" Reply-To: costin@apache.org To: "Tomcat Developers List" Subject: JConsole and tomcat. MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_19341_22325175.1209958281258" X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_19341_22325175.1209958281258 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline This is a proposal for a very small change in tomcat trunk, to make tomcat easier to use with JConsole. Right now if you start tomcat 'out of box' and than try to inspect it with jconsole, you'll only see the 'platform' mbeans (memory etc). That's because tomcat doesn't use the platform mbean server. The fix is simple - in main or anywhere before the first MBeanServerFactory.findMBeanServer(null) we need to add a ManagementFactory.getPlatformMBeanServer(). This way modeler and tomcat will find the platform mbean server as the first server and use it. A better fix would be to replace all usages of findMBeanServer with getPlatformMBeanServer. The options are: - add a flag/system property to enable this behavior - make it default, add a flag to disable and use separate server - just use getPlatformMBeanServer with no flag. The javadoc is: " It is recommended that this platform MBeanServer also be used to register other application managed beans besides the platform MXBeans. This will allow all MBeans to be published through the same MBeanServer and hence allow for easier network publishing and discovery." I can't think of any good reason to use a separate MBean server - and using jconsole is quite nice, all other methods of remote JMX documented on our site are more complex ( but good for specific cases ). The extra benefit is that we can see both memory/logging/other platform mbeans in the same place with tomcat beans. Options ? Can I just add the one liner before the first invocation of MBeanServerFactory ? Costin ------=_Part_19341_22325175.1209958281258--