geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gianny Damour <gianny.dam...@optusnet.com.au>
Subject Re: [jira] Created: (GERONIMO-267) NoSuchOperationError on deployment of SSB
Date Wed, 14 Jul 2004 11:47:29 GMT
On 14/07/2004 12:09 PM, Dain Sundstrom wrote:

>
>> On 14/07/2004 9:17 AM, Gianny Damour wrote:
>>
>> I have just updated the way GBean attribute names are derived:
>> When GBeans are proxied via RawGBeanInvokers, attribute names may 
>> start with an upper-case letter. For instance, if a GBean has a 
>> method "getFoo", then the implementation tries to find an attribute 
>> having the name "Foo". This was the behavior before my updates and I 
>> have restored it. Now, if such an attribute is not defined, then the 
>> implementation tries to find an attribute having the name "foo".
>>
>> When GBeans are proxied via JMXGBeanInvokers, attribute names are 
>> derived based on the "exact" name embedded in the method name. For 
>> instance, if a GBean has a method "getfoo", then the implementation 
>> tries to find an attribute having the name "foo". This was the 
>> behavior before my updates and I have restored it.
>
>
> Uh, I think you lost me.  I suggest we first try an exact match using 
> JMX standard MBean rules (getFoo looks for a method Foo) and if that 
> fails we do a case insensitive match.  What ever we do, it must be 
> consistent between the GBeanInvokers, since the programmer has not 
> input into the invoker type the container chooses.

Sorry; indeed, this is perhaps not the right approach. However, I was 
pretty confident that this new behavior was more correct:
As far as I understand, the JMX GBeanInvokers are used only when the 
"framework" mounts a reference, which does not have an attribute named 
GBeanMBean.RAW_INVOKER. Most of the time, this means that the reference 
is an "home-made" MBean (an MBean, which is not a GBeanMBean). So, I 
thought that we could safely say that programmers have applied the JMX 
standards. In other words, if the attribute is named "serverVersion", 
then the getter must be "getserverVersion".

Having said that, the RawGBeanInvokers are used, most of the time, when 
the reference is a GBeanMBean. Based on the naming conventions of the 
attribute names (lower-case for the first character), I saw two approaches:
- renaming of the getters and setters of the various GBeans in order to 
be aligned with the JMX standards; or
- update of the way methods and attribute names were matched.

The second approach has been implemented. This means that from a method 
getFoo, the implementation will look for Foo. In case of failure, it 
will then look for foo.
I am happy to make this second look-up case insensitive. Yet, I am not 
sure that JMX GBeanInvokers should mirror this behavior.

In other words, and as far as I understand, programmers know the invoker 
type, which will be used by the container:
- if they use a GBean, it will be the Raw type;
- if they implement an MBean having an attribute GBeanMBean.RAW_INVOKER, 
then it will also be the Raw type; otherwise
- it will be the JMX type. In this specific case, one could assume that 
the JMX naming conventions have been applied.

There is something wrong in my reasoning; nonetheless, I do not know where.

Thanks,
Gianny

Mime
View raw message