geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Manu George" <manu.t.geo...@gmail.com>
Subject Re: Question Regarding ModuleBuilderExtension
Date Fri, 04 Jan 2008 06:54:24 GMT
Hi David,
                Thanks for the reply. Let me explain what I am trying
to do and where I am coming from. I am trying to make Tuscany SCA
services available as EJBs in geronimo as per your mail a loooong time
ago. I was thinking that if I can get proxies to the services from the
SCA domain and bind them to the componentContext during the deployment
of a web module or ejb module then I should be able to access them via
the @EJB annotation. Regarding conversational state of the service the
proxy will take care AFAIK.

In this context I am trying to hook in into the deployment process as
in when the tuscany plugin gets installed a new MBE should be
registered with the respective Web and Ejb module builders to modify
the componentContext during the deployment of web and ejb modules.
Thats the reason I am trying to add a new MBE.

Adding a new MBE also brings in the problem with the respective
classloader not being available in the ModuleBuilder. eg: In a module
builder the MBEs are invoked as below

 for (ModuleBuilderExtension mbe : moduleBuilderExtensions) {
            mbe.initContext(earContext, module, cl);
 }

 Here if the mbe's class loader is accessible we could just set it as
the TCCL before
mbe.initContext(earContext, module, cl); and reset the old one after
executing this line. That will take care of the classloader problems.
Having this will make it possible to add MBE's to existing module
builders dynamically.

I can see a few advantages from a plugin developers point of view but
maybe i am not seeing the disadvantages :).

Would like your thoughts on this as well as whether it will be good to
have this functionality of dynamically adding MBE's to existing module
builders.

Thanks
Manu



On Jan 3, 2008 11:37 PM, David Jencks <david_jencks@yahoo.com> wrote:
>
>
> On Jan 3, 2008, at 3:42 AM, Manu George wrote:
>
> > Hello,
> >
> >       I need a clarification regarding the ModuleBuilderExtensions
> > (MBE) pattern. What I understood about this is that it is to extend
> > the functionality of the existing module builders. The usage that I
> > have seen is that the list of MBE's that are used by a ModuleBuilder
> > are specified in the plan and after deployment and startup these are
> > available. Can I dynamically (in a built and running server) add a new
> > ModuleBuilderExtension to the list of existing MBEs for a particular
> > ModuleBuilder. If not is there any other way provided by AG for a
> > plugin to extend the features of an existing ModuleBuilder?
>
> You might be able to use the console to override the list of
> references in a ModuleBuilder, and you might be able to name your MBE
> enough like an existing one that it would get added, but basically
> there's no good way to do this.  Can you describe your MBE a bit more
> and which MB's it needs to be associated with?
>
> thanks
> david jencks
>
> >
> > Thanks
> > Manu
>
>

Mime
View raw message