geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Janko Heilgeist <>
Subject Re: Use of a GBean from a Message EJB
Date Wed, 09 Jul 2008 10:34:05 GMT
Jacek Laskowski wrote:
> On Tue, Jul 1, 2008 at 1:40 PM, dsthode
> <> wrote:
>> I've followed your advice and changed the default namespace to openejb
>> version 2.2 and added a <pattern> element for the <gbean-ref> resolution,
>> but Geronimo keeps failing on deployment with the message that <ref-name> is
>> not in geronimo-namespace-1.2 schema but in
>>, even though you can open
>> geronimo-naming-1.2 and find <ref-name> defined in this schema.
> Did you happen to sort it out? What was the solution?
> Jacek


I think I've traced the problem to a bug in OpenEJB:

OpenEJB forces the namespace of the tags <ref-name> and <ref-type> to 
"" in 
regardless of the namespace specified in the openejb-jar.xml deployment 
descriptor. On the other hand the "namespace" attributes in the 
@XmlElement annotations in 
are missing for these variables and therefore during the parsing of the 
deployment descriptor the wrong default namespace of 
"" is expected. The 
patch attached to this mail fixes this by adding the missing attributes.

I used my patched version of OpenEJB with Geronimo to access a GBean 
from a stateless EJB:

<openejb-jar xmlns="">

<sys:gbean name="GlobalGBeanName"

Inside a @PostConstruct of the EJB class:
InitialContext ic = new InitialContext();
this.theGBean = (TheGBeanClass)

Everything deploys without any errors and the EJB can correctly access 
the GBean and call methods of the GBean. There doesn't seem to be a way 
to actually inject the GBean with something like a @Resource annotation. 
Is this supposed to work or can GBeans only be injected into an EJBs 
JNDI environment and have to be looked up manually?

Anyway, this should fix most of Damians original problems.


View raw message