Has anyone using Poolman configured it properly for Tomcat 4?

Since it supports both JNDI and a static call for retreiving the
datasource, it works well with layered applications. I have it running
under Tomcat 3 well enough.  But configuring it to play nice with Tomcat
4 is eluding me. 

I have the requisite poolman support JARs in the Tomcat lib
(jdbc2_0-stdext, jta, xerces), except for poolman.jar, which is in its
own folder. The poolman.xml is in the poolman folder, and both the JAR
and the folder and the JAR on the classpath. I'm using findDatasource(),
but the Tomcat log reports it can't find the class. 

If I move the poolman.jar to the Tomcat4 lib orthe WEB-INF\lib, a 
"Network Error: Peer reset connection" error is exposed by the browser, 
and Tomcat suddenly quits. My guess is that TC4 is not finding the 
poolman.xml (whereas TC3 does). If anyone sorts this out, I'd love to 
hear about it.

Meanwhile, if anyone else is trying Poolman under TC3, I found that it
really does want Xerces for the parser, so swap out the Tomcat default.
It is also really-not-kidding about having the poolman.xml on the
server's classpath. Having it a lib folder isn't enough. 

But after that, it works just great. You can import the poolman class
into your Data Access Object (which is why I have it in its own folder),
and have it snag the datasource using a static method
(findDataSource(String name), just like our favorite son ;-). 

This way your Web layer doesn't need to know where the connection is
coming from (as recommended by our other favorite Sun 8-).

< http://www.codestudio.com/ >

-Ted.

Reply via email to