geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <djen...@gluecode.com>
Subject Re: MEJB question
Date Mon, 17 Jan 2005 23:01:54 GMT

On Jan 17, 2005, at 2:38 PM, John Childs wrote:

> Hi All,
>
> I was wondering about the MEJB class which is in the
> j2ee module.  Specifically, do you have any
> suggestions on how I could expose this to play around
> with it a bit?   It looks like it's kind of a hybrid
> gbean and ejb.

Yes indeed.

I think your best bet right now is to deploy it as a gbean and then 
from a j2ee component do something like this:

Kernel kernel = Kernel.getSingelKernel(); //really bad method, but 
otherwise you need to know the kernel name
ProxyManager proxyManager = kernel.getProxyManager(); //this method is 
not guaranteed to be there forever
Management mejb = 
(Mananagement)proxyManager.createProxy(MEJB_OBJECT_NAME, 
Management.class);
try {
    /play with it
} finally {
   proxyManager.destroyProxy(mejb);
}

It might not take that much more work to deploy it as a local ejb.  I 
don't know what state remote notifications are in at the moment so I 
doubt it would be so easy to access it remotely.

AFAIK this is 100% untested code so I'd be interested in knowing how 
far you get.

thanks
david jencks

>
> john
>
> ______________________________________________________________________
> Post your free ad now! http://personals.yahoo.ca
>


Mime
View raw message