> String homeName = "CustomerHome";
> Context context = new InitialContext();
> String interfaceName = "java:comp/env/ejb/" + homeName;
> LogManager.log("Looking up " + interfaceName);
> Object object;
> try {
> object = context.lookup(interfaceName);
> }
> catch(NameNotFoundException e) {
> //Handle Orion bug
> String orionInterfaceName = homeName;
> LogManager.log("Because of Orion bug: Looking up " + orionInterfaceName);
> object = context.lookup(orionInterfaceName);
> }
> ejbHome = (EJBHome) PortableRemoteObject.narrow(object, EJBHome.class);
>
> ....
>
>
> At this point I get a second NameNotFoundException.
>
>
> Is this what you do (with success) aswell?

It does in fact work for us. You may not have the EJB deployed properly.
Three suggestions:

1) Try the orionconsole GUI tool and see what it says about the beans that
are running in your app. It should indicate that "CustomerHome" is there
somewhere.

2) Throw together some code to display the contents of Orions JNDI tree.
This can be done in a simple java command-line program using the
RMIInitialContextFactory. Something like this might be enlightening:

NamingEnumeration ne = jndiContext.listBindings("");
System.out.println("Context bindings:");
System.out.println("-----------------");
while (ne.hasMore())
{
    NameClassPair binding = (NameClassPair)ne.next();
    System.out.println(binding.toString());
}
System.out.println("-----------------");

3) Post your deployment descriptor as well. Idiosyncracies aside, this
should give us some idea of where your CustomerHome _should_ be found.


Good luck.

P. Pontbriand
Canlink Interactive Technologies Inc.


Reply via email to