Since the local TOMCAT JNDI server is not compatible with the JBOSS JNDI
server you probably have the -nonaming switch activated.
Since this deactivates the TOMCAT JNDI server you can access the local JNDI
properties that way.
Best Regards,
Anthony Geoghegan.
J2EE Developer
CPS Ireland Ltd.
----- Original Message -----
From: "Andrzej Jan Taramina" <[EMAIL PROTECTED]>
To: "Becker, Michael" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, November 22, 2002 6:39 PM
Subject: RE: Tomcat with external JBoss (JNDI problems)...


> > Copy %JBOSS_HOME%/client/[jboss-client.jar,jboss-common-client.jar,
> > jbosssx-client.jar, jnp-client.jar, jboss-j2ee.jar, and log4j.jar] to
> > %CATALINA_HOME%/shared/lib.
>
> Doesn't work.....it still does not pick up my JBoss-specific
jndi.properties file.
> I've got that file in the WEB-INF/classes and the shared/classes
directories...to
> no avail.
>
> > This works for me:
> >
> > // Try to find each of these individual parameters
> > // and construct the properties
> > // object appropriately
> > java.util.Properties p = new java.util.Properties();
> >
> > p.put(InitialContext.INITIAL_CONTEXT_FACTORY,
> >   "org.jnp.interfaces.NamingContextFactory");
> > p.put(InitialContext.URL_PKG_PREFIXES,
> >             "org.jboss.naming:org.jnp.interfaces");
> > p.put(InitialContext.PROVIDER_URL,"yourservername");
> > InitialContext context = new InitialContext(p);
> >
> >
> > After that you can do your EJB lookup's with that context.
>
> That works for me too Michael....has for some time now.  The issue I have
with
> it is that I don't want to hard-code the JBoss server URL's and such into
my
> code, since then the servlet can't be deployed by others with different
setups
> without a code change and a recompile.
>
> What I am trying to figure out is how to just do a:
>
>    InitialContext context = new InitialContext();
>
> call...without the hardcoded properties object....and have it pick up the
> properties from the jndi.properties file...like it's supposed to.
>
> Thanks!
>
>
> Andrzej Jan Taramina
> Chaeron Corporation: Enterprise System Solutions
> http://www.chaeron.com
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to