In my web.xml file I have the following
<servlet>
<servlet-name>BillyBob</servlet-name>
<servlet-class>com.viewpoint.database.InitPool</servlet-class>
<load-on-startup>1</load-on-startup>
<description>
uses jdbc parameters above to initialize the connection pool.
</description>
</servlet>
Everything seems to work as I expect. There is one little hang up, however. When I recompile a class and the app is reloaded, the pool does not seem to get re-initialized. Everything works fine until I compile some code. The next time I try to acces a page I get a "no suitable driver" error. I'm assuming that is because InitPool hasn't done it's work of creating the driver class and registering it w/ the DriverManager. It makes sense that the classes instatiated by InitPool get tossed with the rest of them when the app reloads. Shouldn't the init servlet be run as well? Is there something I'm failing to do? Is this the way it's supposed to work?
At this point it's just a hassle. If I restart Tomcat, my pool works just fine. Since my site uses HTTP sessions to maintain a login session, restarting Tomcat, and therefore Apache, I lose my session and have to login to the application again. It just gets tedious to have to do this everytime I compile.
-Sean
