geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juergen Weber <>
Subject How do you access a GBean via JNDI?
Date Fri, 23 Jan 2009 09:47:08 GMT


right now I access a GBean from a servlet using (is that the correct way?)

Kernel kernel = KernelRegistry.getSingleKernel();
URI uri = new URI(myuri);
AbstractName gBeanAN = new AbstractName(uri);
retVal = kernel.invoke(gBeanAN,"myMethod",args,paramTypes);
with myuri from the abstractName field of the GBean in JMX Viewer in
Console, which is quite a long uri.
Also you need Geronimo-specific code in a JEE application.

So I tried to bind the GBean into JNDI as suggested in

<gbean name="...BeanBinding"
        <attribute name="name">...</attribute>
        <attribute name="abstractNameQuery">?name=MyJNIGBean#</attribute>
        <reference name="Context">

but then I get Classnotfound for GBeanBinding. How do you specify a
dependency for this class?
and what is the abstractNameQuery for the GBean? the full AbstractName ?

View this message in context:
Sent from the Apache Geronimo - Users mailing list archive at

View raw message