geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <>
Subject Re: how to look up MEJB
Date Fri, 12 Oct 2007 18:57:05 GMT
the java:comp/env only works when called from javaee components, not  

You could use a gbean reference to the EjbContainer (??) gbean that  
is deployed when the ejb is deployed and then figure out what to call  
to  get the MEJB itself.

Or, if this gbean is called from javaee components you could look up  
the MEJB during such a call, and make sure you have an ejb-ref to it  
in the javaee component.

david jencks

On Oct 12, 2007, at 10:10 AM, Viet Nguyen wrote:

> Hi All,
> I am trying to access the new MEJB from a gbean. I am using the  
> following
> Context ic = new InitialContext();
> Object mejbObj = (Object)ic.lookup("java:comp/env/ejb/mgmt/ 
> MEJB");    // I get a NotContextException here
> I have tried to pass a Properties object (with the  
> and  
> to the InitialContext()  
> constructor, but I get the same exception.
> I think this is the correct JNDI name for MEJB. Is this problem due  
> to the new security checks? If so, how can I configure my gbean  
> (which is actually bundled inside an EAR) to be able to access the  
> Thanks,
> Viet

View raw message