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