geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anita kulshreshtha <a_kuls...@yahoo.com>
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-kernel/...
Date Mon, 11 Dec 2006 13:54:16 GMT
    The GOpeartionInfo has a field:
private final String methodName;
   Which should really have been targetClass or returnType. Currently
it is initialized to the name of the method! If we must maintain
backward compatibility, I am open to suggestions..

Thanks
Anita

--- Gianny Damour <gianny.damour@optusnet.com.au> 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);
> >      }
> > -
> > +
> > +    /**
> > +     * @deprecated
> > +     */
> >      public void addOperation(String name) {
> > -        addOperation(new GOperationInfo(name, NO_ARGS));
> > +        addOperation(new GOperationInfo(name, NO_ARGS, ""));
> >      }
> >
> > +    /**
> > +     * @deprecated
> > +     */
> >      public void addOperation(String name, Class[] paramTypes) {
> > -        addOperation(new GOperationInfo(name, paramTypes));
> > +        addOperation(new GOperationInfo(name, paramTypes, ""));
> > +    }
> > +
> > +    public void addOperation(String name, String returnType) {
> > +        addOperation(new GOperationInfo(name, NO_ARGS,
> returnType));
> > +    }
> > +
> > +    public void addOperation(String name, Class[] paramTypes,  
> > String returnType) {
> > +        addOperation(new GOperationInfo(name, paramTypes,  
> > returnType));
> >      }
> >
> >      public void addReference(GReferenceInfo info) {
> >
> > Modified: geronimo/server/trunk/modules/geronimo-kernel/src/main/ 
> > java/org/apache/geronimo/gbean/GOperationInfo.java
> > URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/ 
> > geronimo-kernel/src/main/java/org/apache/geronimo/gbean/ 
> > GOperationInfo.java?view=diff&rev=485321&r1=485320&r2=485321
> >
>
======================================================================
> 
> > ========
> > ---
> geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/ 
> > apache/geronimo/gbean/GOperationInfo.java (original)
> > +++
> geronimo/server/trunk/modules/geronimo-kernel/src/main/java/org/ 
> > apache/geronimo/gbean/GOperationInfo.java Sun Dec 10 16:14:46 2006
> > @@ -33,7 +33,12 @@
> >       * The name of this method.
> 
=== message truncated ===



 
____________________________________________________________________________________
Any questions? Get answers on any topic at www.Answers.yahoo.com.  Try it now.

Mime
View raw message