Return-Path: Delivered-To: apmail-jakarta-avalon-phoenix-dev-archive@apache.org Received: (qmail 84228 invoked from network); 27 Aug 2002 13:12:06 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 27 Aug 2002 13:12:06 -0000 Received: (qmail 848 invoked by uid 97); 27 Aug 2002 13:11:54 -0000 Delivered-To: qmlist-jakarta-archive-avalon-phoenix-dev@jakarta.apache.org Received: (qmail 550 invoked by uid 97); 27 Aug 2002 13:11:53 -0000 Mailing-List: contact avalon-phoenix-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Avalon-Phoenix Developers List" Reply-To: "Avalon-Phoenix Developers List" Delivered-To: mailing list avalon-phoenix-dev@jakarta.apache.org Received: (qmail 420 invoked by uid 98); 27 Aug 2002 13:11:52 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Content-Type: text/plain; charset="iso-8859-1" From: Peter Donald To: "Avalon-Phoenix Developers List" Subject: Re: JMX Attributes Date: Tue, 27 Aug 2002 23:14:15 +1000 User-Agent: KMail/1.4.2 References: <3D6AAF20.6060504@yahoo.com> In-Reply-To: <3D6AAF20.6060504@yahoo.com> X-Wisdom: A right is not what someone gives you; it's what no one can take from you. MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200208272314.15486.peter@apache.org> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi, I had a look at this. It looks to be a feature of the template. Essential= ly=20 all methods that have the phoenix:mx-attribute attribute cause another=20 attribute to be defined. Unfortunately it would be bloody hard to fix it at the template level wit= h=20 their templating language. Luckily we can extend it with jsp-like tags. = To=20 do this what we would need to do is create a tag handler. The tag handler would iterate over all the methods and collect all the on= es=20 with the particular attributes. Each method would be processed individual= ly=20 unless it had a "pair" (like a getter has a settter). Only one of these=20 methods would be processed and a static variable to be set in handler tha= t=20 could be accessed via a "isReadWrite" tag or something. So the template w= ould=20 like=20 " description=3D"" description=3D"" isReadable=3D"true" isWriteable=3D"true" = =20 type=3D"" /> Anyways - there is an example TagHandler written in=20 jakarta-avalon-excalibur/containerkit/src/java/org/apache/avalon/excalibu= r/containerkit/tools/xdoclet/AvalonTagHandler.java which should help to get a start on it. Huw - do you want to look into it or do you have a better idea on how we = can=20 fix it? On Tue, 27 Aug 2002 08:43, Paul Hammant wrote: > Peter, Huw, > > It seems that if there are two @phoenix:mx-attribute tags for the same > attribute (as might be normal for a getter and setter), them MX4J lists > the item twice. I have had to work one of the two ambiguously as > follows. Thoughts? > > -ph > > package org.apache.avalon.apps.demos.helloworldserver; > /** > * Specifies methods to export via Management interface. > * > * @phoenix:mx-topic name=3D"Greeting" > * > * @author Huw Roberts > * @version 1.0 > */ > public interface HelloWorldServerMBean { > /** > * The greeting that is returned to each HTTP request > * > * @phoenix:mx-attribute > */ > public void setGreeting( final String greeting ); > > /** > * Gets the greeting that is returned to each HTTP request > * > */ > String getGreeting(); > } --=20 Cheers, Peter Donald ------------------------------------------------------------ militant agnostic: i don't know, and you don't know either. ------------------------------------------------------------=20 -- To unsubscribe, e-mail: For additional commands, e-mail: