Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 34740 invoked from network); 9 Dec 2005 19:44:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 9 Dec 2005 19:44:08 -0000 Received: (qmail 85654 invoked by uid 500); 9 Dec 2005 19:44:05 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 85630 invoked by uid 500); 9 Dec 2005 19:44:05 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 85618 invoked by uid 99); 9 Dec 2005 19:44:05 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Dec 2005 11:44:05 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of ammulder@gmail.com designates 64.233.162.196 as permitted sender) Received: from [64.233.162.196] (HELO zproxy.gmail.com) (64.233.162.196) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Dec 2005 11:44:04 -0800 Received: by zproxy.gmail.com with SMTP id 18so970016nzp for ; Fri, 09 Dec 2005 11:43:43 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=l59MzfWsJEO0x9a1y2U8wXX2QxOY3CoAu8IdHG6QJNE4m19ImdQrlhyfNfbZAMA41ECJAYeWwZRsxoARFVfj3e5eq1y0C6aavGeN0NrOtSgB8eUXDoweP5NgbYDsvOh64fbinemSlID0ETQNpatAw9LSZcBfqKTw74z4COtBHRw= Received: by 10.36.39.9 with SMTP id m9mr3742060nzm; Fri, 09 Dec 2005 11:43:43 -0800 (PST) Received: by 10.37.13.69 with HTTP; Fri, 9 Dec 2005 11:43:43 -0800 (PST) Message-ID: <74e15baa0512091143w6aae183dp7383a6fb8fa4023d@mail.gmail.com> Date: Fri, 9 Dec 2005 14:43:43 -0500 From: Aaron Mulder Sender: ammulder@gmail.com To: user@geronimo.apache.org Subject: Re: EJB global JNDI entries In-Reply-To: <20051209193458.15141.qmail@web32501.mail.mud.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20051209193458.15141.qmail@web32501.mail.mud.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Geronimo does not have a "global JNDI space" that's available to server-side components. You'll need to declare EJB references to access EJBs within the server. Application clients that do not use the application client container use JNDI plumbing to access EJBs, but that's really the exception rather than the rule in Geronimo. For what it's worth, you still don't need a Geronimo deployment descriptor so long as referencer and referencee are in the same module or EAR -- you can do it like this: ejb/Foo ... Foo or my-ejbs.jar#Foo Then in your application code: MyHome home =3D (MyHome)new InitialContext.lookup("java:comp/env/ejb/Foo"); Thanks, Aaron On 12/9/05, Dan Meany wrote: > I have an app that works in JBoss, WebSphere and > Weblogic with the same .ear binary. I am having > trouble with Geronimo either not seeing or not > publishing the session EJBs in JNDI. There does not > appear to be anything in the global JNDI tree. With > JBoss, I don't have to use any vendor-specific xml > files and it creates some JNDI entries automatically > for the EJBs. > > My test openejb-jar.xml looks like: > > xmlns=3D"http://www.openejb.org/xml/ns/openejb-jar" > > xmlns:naming=3D"http://geronimo.apache.org/xml/ns/naming" > > xmlns:security=3D"http://geronimo.apache.org/xml/ns/security" > > xmlns:sys=3D"http://geronimo.apache.org/xml/ns/deployment" > configId=3D"myappj" > parentId=3D"myapp" > > > > > > LoginEJB > LoginEJB > > > > > > > > > I am attempting to print out the JNDI tree with this > code (works with JBoss, but only one JMX item is > returned for Geronimo): > > logger.debug("----- Contents of Global JNDI namespace > -----"); > printjnditree(""); > logger.debug("----- Contents of 'java:' JNDI namespace > -----"); > printjnditree("java:"); > logger.debug("----------------------------------------------"); > > private static void printjnditree(String ns) { > try { > printjnditree(ns, new InitialContext(), ""); > } catch (Exception e) { > logger.error(e); > } > } > > private static void printjnditree(String name, > Context ctx, String indent) { > try { > NamingEnumeration n =3D > ctx.listBindings(name); > while (n.hasMore()) { > try { > Binding b =3D (Binding)n.next(); > String bname =3D b.getName(); > String clsname =3D b.getClassName(); > Class cls =3D b.getClass(); > Object o =3D b.getObject(); > logger.debug(indent + bname + " > (class: "+clsname+")"); > if > (clsname.equals("javax.naming.Context") || o > instanceof javax.naming.Context) { > if (!name.endsWith(":")) name =3D > name + "/"; > printjnditree(name + bname, ctx, > indent + " "); > } > } catch (Exception e) { > //System.out.println(""+e); > } > } > } catch (Exception e) { > //System.out.println(""+e); > } > } > > >