Hey
Rickard �berg wrote:
> I'm trying to make a simple webapp with Tomcat that should connect to an
> external jBoss instance, but am having trouble with jndi.properties. I
> have put a jndi.properties file in the servlets classpath (i.e.
> /WEB-INF/classes) but it is not picked up by the new InitialContext()
> call. I guess this is because they don't set the context classloader
> properly. I thought there was supposed to be a fix for that, but can't
> find it. Does anyone know how to get this to work?
I've gotten the above to "work" now by doing the following:
* Upgrade to Tomcat 3.2b6 from Tomcat 3.1
* Add the Jdk12Interceptor to the conf
* Use the following code:
Properties cfg = new Properties();
cfg.load(getClass().getResourceAsStream("/jndi.properties"));
Context ctx = new InitialContext(cfg);
--
This "works" but I would prefer if I didn't have to do the resource
thingy. Any ideas? It *should* work without it (i.e. by simply doing new
InitialContext()) since I installed the interceptor which fixes the
context classloader, but it doesn't...
/Rickard
--
Rickard �berg
Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]