Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 72686 invoked from network); 11 Dec 2006 15:18:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Dec 2006 15:18:34 -0000 Received: (qmail 2586 invoked by uid 500); 11 Dec 2006 15:18:39 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 2544 invoked by uid 500); 11 Dec 2006 15:18:38 -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 List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 2496 invoked by uid 99); 11 Dec 2006 15:18:38 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Dec 2006 07:18:38 -0800 X-ASF-Spam-Status: No, hits=2.8 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST,DNS_FROM_RFC_WHOIS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [68.142.201.184] (HELO web31704.mail.mud.yahoo.com) (68.142.201.184) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 11 Dec 2006 07:18:27 -0800 Received: (qmail 31132 invoked by uid 60001); 11 Dec 2006 15:18:06 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=49mOuLkvMnqpeuUK+ghvhdAzgg6UHmeIhsGEM7FVt+vjxKuwWuRVIlQtT3Lsjvc9eX8kFN/7L2DJwHdWzxn17+bzanbPF5rmHRR5RS6GGEsjVVtZJIpWQqZ4zr7YJXk0bP/JjDyHbuF5aN7wS/+jlV4TrT3/BCHs2dRRIG4My3U=; X-YMail-OSG: O48thfwVM1mf8ZZQuXpm6eVz9U2mDusca1mgkiH8t.Bk07tbILbUE7JXxTkehRnzilPeHDj6C_ULBECf7DJnW4AFMI0y0r._V7KaWvwtN64u2uitA36BeGn0saGCpeI9Itk_kFTaAeQ- Received: from [24.211.208.98] by web31704.mail.mud.yahoo.com via HTTP; Mon, 11 Dec 2006 07:18:06 PST Date: Mon, 11 Dec 2006 07:18:06 -0800 (PST) From: anita kulshreshtha Subject: Re: svn commit: r485321 - in /geronimo/server/trunk/modules: geronimo-kernel/src/main/java/org/apache/geronimo/gbean/ geronimo-kernel/src/main/java/org/apache/geronimo/gbean/runtime/ geronimo-kernel/src/test/java/org/apache/geronimo/gbean/ geronimo-k To: dev@geronimo.apache.org In-Reply-To: <22d56c4d0612110601s1a0b10d9p5705b1d963496563@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <876583.29839.qm@web31704.mail.mud.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org When we add inteface using addInterface(..), we can end up with two methods like this. This is not a very good example because the objectName will end up as an attribute in GBeanInfoBuilder, not an operation. thanks Anita --- Vamsavardhana Reddy wrote: > It is not allowed to have public Object getObjectName() and public > String > getObjectName() simultaneously. > > --vamsi > > On 12/11/06, anita kulshreshtha wrote: > > > > Gianny, > > Thanks for looking into this. I did consider the easy way out. > But > > the retrun type is part of the method signature. What happens if we > > have > > > > public class Myclass { > > public Object getObjectName() > > public String getObjectName() > > .......................... > > } > > If JMXUtil was patched which one should it return? > > > > Thanks > > Anita > > > > --- Gianny Damour wrote: > > > > > Hi, > > > > > > I am quickly scanning this commit and I would like to know if it > was > > > > > > not a little bit less intrusive to keep the existing addOperation > and > > > > > > search for the return type of the added operations against the > target > > > > > > gbeanType. This way, developers do not need to specify the return > > > type of the operations (also, the migration of the existing > GBeanInfo > > > > > > could have been avoided). > > > > > > After reading GERONIMO-2607, it seems that the goal of the change > was > > > > > > to have a return type defined within JConsole for the GBean > > > operations. It seems that patching JMXUtil.toMBeanInfo would have > > > been another implementation approach: while getting the exposed > > > operations, the GBean class could be searched for returned types. > One > > > > > > of the advantages would have been to keep backward compatibility. > > > > > > Thanks, > > > Gianny > > > > > > On 11/12/2006, at 11:14 AM, akulshreshtha@apache.org wrote: > > > > > > > Author: akulshreshtha > > > > Date: Sun Dec 10 16:14:46 2006 > > > > New Revision: 485321 > > > > > > > > URL: http://svn.apache.org/viewvc?view=rev&rev=485321 > > > > Log: > > > > GERONIMO-2607 Added returnType to GOperationInfo, This modifies > > > > GBeanInfoBuilder and breaks backward compatibility > > > > > > > > Modified: > > > > > > > geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/ > > > > apache/geronimo/gbean/DynamicGOperationInfo.java > > > > > > > geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/ > > > > apache/geronimo/gbean/GBeanInfoBuilder.java > > > > > > > geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/ > > > > apache/geronimo/gbean/GOperationInfo.java > > > > > > > geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/ > > > > apache/geronimo/gbean/runtime/GBeanOperation.java > > > > > > > geronimo/server/trunk/modules/geronimo-kernel/src/test/java/org/ > > > > apache/geronimo/gbean/GBeanInfoTest.java > > > > > > > geronimo/server/trunk/modules/geronimo-kernel/src/test/java/org/ > > > > apache/geronimo/kernel/MockGBean.java > > > > > > > geronimo/server/trunk/modules/geronimo-kernel/src/test/java/org/ > > > > apache/geronimo/kernel/config/MyGBean.java > > > > > > > geronimo/server/trunk/modules/geronimo-system/src/main/java/org/ > > > > apache/geronimo/system/jmx/JMXUtil.java > > > > > > > geronimo/server/trunk/modules/geronimo-system/src/main/java/org/ > > > > apache/geronimo/system/logging/log4j/Log4jService.java > > > > > > > > Modified: > geronimo/server/trunk/modules/geronimo-kernel/src/main/ > > > > java/org/apache/geronimo/gbean/DynamicGOperationInfo.java > > > > URL: > http://svn.apache.org/viewvc/geronimo/server/trunk/modules/ > > > > geronimo-kernel/src/main/java/org/apache/geronimo/gbean/ > > > > > DynamicGOperationInfo.java?view=diff&rev=485321&r1=485320&r2=485321 > > > > > > > > > > ====================================================================== > > > > > > > ======== > > > > --- > > > geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/ > > > > apache/geronimo/gbean/DynamicGOperationInfo.java (original) > > > > +++ > > > geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/ > > > > apache/geronimo/gbean/DynamicGOperationInfo.java Sun Dec 10 > > > > 16:14:46 2006 > > > > @@ -24,14 +24,14 @@ > > > > */ > > > > public class DynamicGOperationInfo extends GOperationInfo { > > > > public DynamicGOperationInfo(String name) { > > > > - super(name); > > > > + super(name, "java.lang.Object"); > > > > } > > > > > > > > public DynamicGOperationInfo(String name, String[] > paramTypes) > > > { > > > > - super(name, paramTypes); > > > > + super(name, paramTypes, "java.lang.Object"); > > > > } > > > > > > > > public DynamicGOperationInfo(String name, List parameters) > { > > > > - super(name, parameters); > > > > + super(name, parameters, "java.lang.Object"); > > > > } > > > > } > > > > > > > > Modified: > geronimo/server/trunk/modules/geronimo-kernel/src/main/ > > > > java/org/apache/geronimo/gbean/GBeanInfoBuilder.java > > > > URL: > http://svn.apache.org/viewvc/geronimo/server/trunk/modules/ > > > > geronimo-kernel/src/main/java/org/apache/geronimo/gbean/ > > > > GBeanInfoBuilder.java?view=diff&rev=485321&r1=485320&r2=485321 > > > > > > > > > > ====================================================================== > > > > > > > ======== > > > > --- > > > geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/ > > > > apache/geronimo/gbean/GBeanInfoBuilder.java (original) > > > > +++ > > > geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/ > > > > apache/geronimo/gbean/GBeanInfoBuilder.java Sun Dec 10 16:14:46 > > > 2006 > > > > @@ -187,8 +187,7 @@ > > > > > > > > for (Iterator i = > source.getOperations().iterator(); > > > > i.hasNext();) { > > > > GOperationInfo operationInfo = > (GOperationInfo) > > > > i.next(); > > > > - operations.put(new GOperationSignature > > > > (operationInfo.getName(), > > > > - operationInfo.getParameterList()), > > > > operationInfo); > > > > + operations.put(new GOperationSignature > > > > (operationInfo.getName(), operationInfo.getParameterList()), > > > > operationInfo); > > > > } > > > > > > > > for (Iterator iterator = source.getReferences > > > > ().iterator(); iterator.hasNext();) { > > > > @@ -346,7 +345,7 @@ > > > > method.getName())); > > > > } > > > > } else { > > > > - addOperation(new > GOperationInfo(method.getName(), > > > > > > > method.getParameterTypes())); > > > > + addOperation(new > GOperationInfo(method.getName(), > > > > > > > method.getParameterTypes(), method.getReturnType().getName())); > > > > } > > > > } > > > > addInterface(interfaces, intf); > > > > @@ -401,13 +400,27 @@ > > > > public void addOperation(GOperationInfo operationInfo) { > > > > operations.put(new GOperationSignature > > > > (operationInfo.getName(), operationInfo.getParameterList()), > > > > operationInfo); > > > > } > > > > - > === message truncated === ____________________________________________________________________________________ Have a burning question? Go to www.Answers.yahoo.com and get answers from real people who know.