I have a helper class which performs spell checking for all my web
applications.  Since this class never talks to the client it is not a
servlet.  Instead, it is just sits in $CATALINA_HOME/common/lib in a jar
file and waits for any servlet that needs a word spell checked to send it a
request.  Also, since I need only one spell checker (and only one dictionary
in RAM) this class is a singleton.
 
What I want to know is: can I use the tomcat global connection pooling
resource that I have set up (in the <GlobalNamingResources> element in
conf\server.xml) when this class needs to access the database?
 
In other words, how do I access a connection from the connection pool when I
am not dealing with a JSP or a servlet, and the singleton class is not
necessarily associated with any particular webapp?
 
Is this even possible?
 
I am running Windows XP pro, Tomcat 5.0.24.
 
Thanks much,
 
Jon
 
 

Reply via email to