On Nov 26, 2007 4:19 PM, Tomasz Mazan <[EMAIL PROTECTED]> 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