Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 38908 invoked from network); 11 Dec 2006 17:59:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Dec 2006 17:59:01 -0000 Received: (qmail 76287 invoked by uid 500); 11 Dec 2006 17:59:06 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 76248 invoked by uid 500); 11 Dec 2006 17:59:06 -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 76237 invoked by uid 99); 11 Dec 2006 17:59:06 -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 09:59:06 -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.206.241] (HELO smtp108.plus.mail.mud.yahoo.com) (68.142.206.241) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 11 Dec 2006 09:58:55 -0800 Received: (qmail 35848 invoked from network); 11 Dec 2006 17:58:34 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-YMail-OSG:Mime-Version:In-Reply-To:References:Content-Type:Message-Id:Content-Transfer-Encoding:From:Subject:Date:To:X-Mailer; b=xUtvjkVXz2685cyk+UT9boYbqYYxIQGzpyNaqg4ZYfod+Be00/0rbbraUSJAGV0CyOpEEQ/0ztkcRgWrfzpSpU0L8lEMSCUQ14Mg30PDZY1SdKiyWhKdkQsnGVdDPUVDICJnNukaalTVdhmVbMVdnH4IlRFkv1Sql7lUGXJvVHM= ; Received: from unknown (HELO ?10.11.55.8?) (david_jencks@63.105.20.225 with plain) by smtp108.plus.mail.mud.yahoo.com with SMTP; 11 Dec 2006 17:58:33 -0000 X-YMail-OSG: JD6YVg0VM1kIpY4Z1HplaTbnwJ0P_U8oQkS3BXQlE_GPeLoTMGVftsIKaZRcK9SaHQeh4hfAyiYki2RvEH7eHATIgOMCJDW.Zuu0J1jxm08KPJm8M.MXDHfVwH4MAgsdkCBv8_pA1_hWoWpcB7.75xiucNjrmF_IyQ-- Mime-Version: 1.0 (Apple Message framework v752.3) In-Reply-To: <876583.29839.qm@web31704.mail.mud.yahoo.com> References: <876583.29839.qm@web31704.mail.mud.yahoo.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <5FBA44B1-9A43-4444-86D9-C7BB282B9233@yahoo.com> Content-Transfer-Encoding: 7bit From: David Jencks 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 Date: Mon, 11 Dec 2006 09:58:26 -0800 To: dev@geronimo.apache.org X-Mailer: Apple Mail (2.752.3) X-Virus-Checked: Checked by ClamAV on apache.org On Dec 11, 2006, at 7:18 AM, anita kulshreshtha wrote: > When we add inteface using addInterface(..), we can end up with two > methods like this. You can't have a class that implements both interfaces if they have methods whose signature differs only in the return type. If there are problems with trying to expose management interfaces that are not actually implemented by the underlying bean maybe we should look for other ways of dealing with the management aspects. Are there actual problems with existing gbeans extracting the return type for operations? If so, please indicate which gbean and which operation.... I don't want to get lost in too much abstraction as I so often do :-) I very much share Gianni's concerns and was about to write a similar note. thanks david jencks > 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.