geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Bohn <joe.b...@earthlink.net>
Subject Re: MEJB changes and MappedName
Date Mon, 08 Oct 2007 21:41:19 GMT


Anita Kulshreshtha wrote:
> --- Joe Bohn <joe.bohn@earthlink.net> wrote:
> 
>> We've been hitting some errors in the TCK tests that validate mgmt
>> with 
>> MEJB.  The main problem was that we were failing the name lookup:
>>
>> javax.naming.NameNotFoundException: Name 
>>
> "java:openejb/Deployment/MEJBGBean/MEJB/javax.management.j2ee.Management"
>> not found
>>
>> I thought this was strange because we don't include the MEJBGBean any
>>
>> longer in the geronimo assembly and I could find no reference to it
>> in 
>> the Geronimo code at all.
>>
>> It turns out that we map to the "GBEAN" name when there is no
>> mappedName 
>> specified in the Openejb code.  In
>> o.a.openejb.config.GeronimoMappedName 
>> at line 65 there is this piece of code which Geronimo is apparently
>> very 
>> dependent upon
>>
>> if (null == mappedName && ref.getEjbRefName().equals("ejb/MEJB")) {
>>      ref.setMappedName("MEJBGBean/MEJB");
>> }
> 
>     I believe this code is there because the old MEJB was a plain
> GBean. I am not very familiar with openejb code. This code is probably
> not needed any more. If we do not want to release antoher openejb, we
> could try making MEJBGBean a 'nop' EJB. This is not gong to be any less
> ugly..

I think this code (or some form of it) is still needed and just making 
the MEJBGBean a 'nop' will not resolve the problem.  With the code 
completely removed from GeronimoMappedName (rather than just mapping it 
to the new name) the mappedName in the ejbref eventually resolves to 
"ejb/MEJB" which of course will not match "ejb/mgmt/MEJB".  It looks 
like the MEJB reference in the app might be incorrect.  The spec 
indicates the recommended name is "ejb/mgmt/MEJB".

Joe


> 
> The following code in MEJBGBean (geronimo-openejb)
> StatelessBean bean = ejbJar.addEnterpriseBean(new
> StatelessBean("MEJB",MEJBBean.class.getName()));
> 
>    can be modified to replace MEJBBean with a dummy class in
> geronimo-openejb. I have not tested this...
>    If something can be changed in TCK that would be great.
> 
> Thanks
> Anita
> 
>> So I assume the mappedName must always be null and we need to force
>> this 
>>   mapping for Geronimo?
>>
>> Once I modified the name to match the newly enabled MEJB app's id, 
>> "mejb/ejb/mgmt/MEJB", then I finally started to see failures that 
>> matched what Anita indicated we should see without the correct 
>> authorization.
>>
>> So what should we do with this openejb change?  We were hoping to 
>> release Geronimo 2.0.2 with openejb 3.0-beta-1 which has the old name
>>
>> still included.  There are probably other ways around this that would
>>
>> only require Geronimo (such as making the new name match the old name
>>
>> ... but that's really ugly) or perhaps TCK configuration changes. 
>> Any 
>> suggestions?
>>
>> Joe
>>
> 
> 
> 
>       ____________________________________________________________________________________
> Catch up on fall's hot new shows on Yahoo! TV. Watch previews, get listings, and more!
> http://tv.yahoo.com/collections/3658 
> 

Mime
View raw message