Hello all,

I’ve searched the archives and have yet to find someone who can get this working, so 
I’m in hopes someone here can help. I want to run my JUnit tests outside the Tomcat 
container, but use resources (i.e. DataSources) that are defined in the Tomcat 
container.

 

This outside-the-container testing is fairly easy to do in the WebLogic environment. 
You register your class implementing InitialContextFactoryBuilder with the 
NamingManager and configure it to return instances of 
weblogic.jndi.WLInitialContextFactory. Set your PROVIDER_URL to t3://localhost:7001, 
supply a username and password and bingo it works fine.

 

I’m in hopes the same approach will work with Tomcat. Does anyone know this to be 
the case?

 

I searched around and found that org.apache.naming.java.javaURLContextFactory 
implements InitialContextFactory, so this looks like it should work. However, although 
this class is listed in the JavaDocs for Catalina, it doesn’t seem to be in the 
catalina.jar that comes with Tomcat 4.1.12. Can anyone tell me where I can find a .jar 
file that contains org.apache.naming.java.javaURLContextFactory?

 

Assuming I can get this working I’ll post configurations for getting this working to 
this list.

 

Thanks in advance.

 

-ryan



Reply via email to