Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 54085 invoked from network); 23 Feb 2005 18:09:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 23 Feb 2005 18:09:45 -0000 Received: (qmail 90483 invoked by uid 500); 23 Feb 2005 18:09:44 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 89758 invoked by uid 500); 23 Feb 2005 18:09:42 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 89745 invoked by uid 99); 23 Feb 2005 18:09:42 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from Unknown (HELO mgd.gluecode.com) (64.14.202.141) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 23 Feb 2005 10:09:40 -0800 Received: from [209.152.54.169] ([209.152.54.169]) (authenticated bits=0) by mgd.gluecode.com (8.12.10/8.12.10) with ESMTP id j1NI8jCW018387 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NO) for ; Wed, 23 Feb 2005 10:08:50 -0800 Mime-Version: 1.0 (Apple Message framework v619.2) In-Reply-To: <421CB8C5.2040009@apache.org> References: <20050221211909.67281.qmail@minotaur.apache.org> <7c1b7d42812d1a853f80334f1d89c8a5@gluecode.com> <421BDE96.5080307@apache.org> <978d055531cdefd253931037f3dd160e@gluecode.com> <421C1D75.3060901@apache.org> <45ff348a778b63a507f23508bfe85dd8@yahoo.com> <421CB8C5.2040009@apache.org> Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: David Jencks Subject: Re: GBeanName [was: svn commit: r154723...] Date: Wed, 23 Feb 2005 10:09:32 -0800 To: dev@geronimo.apache.org X-Mailer: Apple Mail (2.619.2) X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N On Feb 23, 2005, at 9:09 AM, Jeremy Boynes wrote: > David Jencks wrote: >> +1 on canonical name as internal string representation >> -1 on attempting to preserve whatever string is used to construct the >> gbean name > > I think the usability value in getting back what you put it is greater > than having the keys rearranged on you (given the order of the keys is > not significant to the implementation). > > Why do you think rearranging them is more usable? given the choice of: a) x.equals(y) implies x.toString().equals(y.toString()) and b) name == new GBeanName(name).toString() I pick (a) by a preference of about 10^^10. It's a relatively unimportant side effect, but if we calculate and intern the canonical string in the constructor, we can have x.equals(y) iff x.toString() == y.toString() and the gbean registry can use an IdentityHashMap to key the gbean instances. > >> +1 on restricting characters in gbean name and assuring that gbean >> name >> object name conversion always works in a non-surprising >> manner. > > The restrictions on characters in ObjectName and the subsequent > quoting mechanism are a consequence of the overloading between values > and patterns. If we simplify the API and get rid of the latter then we > no longer need any additional restrictions inside Geronimo. > > There is a clear conversion between a GBeanName and an ObjectName: any > keys or values that contain characters that are illegal in JMX can be > quoted and escaped /in JMX/; GBeanNames that are legal ObjectNames can > be used as-is. > no problem there then. thanks david jencks > Of course, we would recommend that users stick to simple names that > are compatible with both but there is no need to enforce JMX > restrictions on a non-JMX implementation. > > -- > Jeremy >