geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacek Laskowski" <ja...@laskowski.net.pl>
Subject Re: Accessing my EJB remote interface from my MDB
Date Mon, 26 Nov 2007 20:29:02 GMT
On Nov 26, 2007 4:19 PM, Tomasz Mazan <wind22@wp.pl> wrote:

>   InitialContext ic = new InitialContext();
>   feedbackGate = (FeedbackGateRemote) ic.lookup("CoreManagerRemote");
>
> I get NamingException,
>
> but if I initialize context with additional properties application is
> working fine:
>
>   Properties properties = new Properties();
>   properties.setProperty(Context.INITIAL_CONTEXT_FACTORY,
> "org.apache.openejb.client.RemoteInitialContextFactory");
>   properties.setProperty(Context.PROVIDER_URL, "ejbd://localhost:4201");

This is not necessary, I believe.

>   InitialContext ic = new InitialContext(properties);
>   feedbackGate = (FeedbackGateRemote) ic.lookup("CoreManagerRemote");
>
> Is it impossibly to make the first solution working ?

Try out jndi.properties in one of your jars with these properties.
InitialContext should load them on demand.

I'd also expect that some form of jndi entry definition where entries
are externalized, i.e. they're in a different jndi tree would be
possible too, but I have never heard of it/used it in Geronimo.
Perhaps others will chime in and add the missing puzzles.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl

Mime
View raw message