This is the basics of how to do it in code:

Properties props = new Properties();
props.setProperty("java.naming.factory.initial",
"org.jnp.interfaces.NamingContextFactory");
props.setProperty("java.naming.factory.url.pkgs",  "org.jboss.naming");
props.setProperty("java.naming.rmi.security.manager", "yes");
bindProps.setProperty(Context.PROVIDER_URL,"localhost:1033");
InitialContext  ctx = new InitialContext(bindProps);

[Dodgy Aside: I'm totally not sure here as I never used Tomcat 3 and am new
to Tomcat 4 - but I think I might have read somewhere that Tomcat 3 did not
have a JNDI implementation. Whereas JNDI is now the Servlet spec recommended
way of binding to environment/servlet configuration etc. If not that then
maybe the new JNDI in tomcat 4 overrides any settings  in your
jndi.properties file that may have worked for you in Tomcat 3. All total
guess work of course!!]

Luke


-----Original Message-----
From: Frank Morton [mailto:[EMAIL PROTECTED]] 
Sent: 06 January 2002 19:54
To: Tomcat Users List
Subject: Re: Tomcat 4.0.1+JBOSS naming problem/bug?

> How are you specifying the JNDI connection settings for JBoss?
>
> If you are just doing
> InitialContext context = new InitialContext();
>
> Won't you get a Tomcat provided JNDI implementation - not a JBoss one?

That is what I am doing, which worked with tomcat 3.2.x, but not with 4.0.1.

What is the right way to get the jboss context from within tomcat?

Thanks.

Frank



--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to