geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan <xhh...@gmail.com>
Subject Re: Question about developing Gbeans
Date Thu, 15 Apr 2010 13:15:45 GMT
Not sure where do you see the method unwanted is published. From my
understanding, if the method is not published, you could not invoke the
corresponding method via Kernel.invoke, however, if you get the real gbean
instance ( I mean the instance of TestGBean ) from kernel, you could do
everything you want.

2010/4/15 Jens Mertz <jeme0003@stud.fh-kl.de>

> 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(){
>
>        }
>
> }
>
>


-- 
Ivan

Mime
View raw message