Hi,

I'm developing a Service Module in Geronimo 2.2,which got a couple of GBeans.
This Gbeans have a couple of public Methods, but they shouldn't
all published, only some of them.

Now there's my problem. When i develop my Service module all my
public Methods were published, although i only add some of them to the
GbeanInfo. Has i misunterstood the gbeans? Is there some way to solve this
problem?

At the end of this mail is a GBean-Source with Comments which should show
you what i need.

I hope you can help me

Best Regards
Jens





public class TestGBean implements GBeanLifecycle {



        public static final GBeanInfo GBEAN_INFO;

        private String name;

        static {
                GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(
                                TestGBean.class.getName(), TestGBean.class);

                infoBuilder.addAttribute("name", "java.lang.String", 
true,false);
                infoBuilder.addOperation("publishMe",null,null);

                GBEAN_INFO = infoBuilder.getBeanInfo();
        }

        public static GBeanInfo getGBeanInfo() {
                return GBEAN_INFO;
        }

        public TestGBean() {

        }

        public void doFail() {

        }

        public void doStart() throws Exception{

        }
        public void doStop() throws Exception

        }

        public String getName() {
                return name;
        }

        public void setName(String name) {
                this.name = name;
        }

        //this method should be published
        public void publishMe(){
        }

        //this method should not be published
        public void test(){

        }

}

Reply via email to