I have a couple of suggestions and questions.....

1. I think we should try harder to separate the identification of a constructor parameter as attribute or reference from identifying its name. So, I think we should use the java6 and xbean @ParameterName annotations for names and something else for references if necessary. 2. I'm pretty sure identifying something as an attribute isn't necessary. 3. I think we should think long and hard if we really need to identify references specifically. Can we get by with deciding how to treat them based on what is in the plan? 4. Can the GBean annotation be optional? I hope so :-) (e.g. default j2eeType=GBean, default name = class name)

While you are looking at this..... I think we may want to move towards considering the basic unit of geronimo assembly as the module/ plugin rather than the gbean. This may have repercussions on some things the admin console can do that add or remove gbeans from a module, but I've always looked at those actions rather sceptically. Doing both changes at once may be too big a jump but IMO if you see a way to progress more quickly by moving towards this additional goal I'd support it.

This looks great!
Thanks!
david jencks


On Mar 30, 2008, at 12:55 AM, Gianny Damour wrote:

Hi,

I am working on the declaration of GBeanInfo via annotations.

This is an example GBean with all the possible annotations (note that some annotation properties have default values so you do not see all of them in the example):

@GBean(j2eeType="type", name="name")
@GPriority(priority=123)
public class MockGBean implements Runnable {

    public MockGBean(@GParamAttribute(name = "name") String name,
        @GParamReference(name = "Name") Runnable runnable) {
    }

    public void run() {
    }

    @GAttribute
    public String getGetterAttribute() {
        return null;
    }

    @GAttribute
    public void setSetterAttribute(String value) {
    }

    @GReference
    public void setSetterReference(Runnable value) {
    }

}

Above annotations are in the package org.apache.geronimo.gbean.annotations.

At the same time, I will add support for pluggable strategies to get the GBeanInfo of a class. We will have two strategies: use getGBeanInfo method, current approach; or introspect annotations, the one I am working on. It will be possible to add additional strategies, e.g. read a service descriptor file a la OpenEJB.


I will also replace the GBean instantiation code of GBeanInstance by an ObjectRecipe (xbean-reflect class).


Let me know if you have any concerns about the above plan.

Thanks,
Gianny

Reply via email to