Been working on a connection pool to make is to we do not need to bounce tomcat all the time. Initially we had it setup so tomcat would start and stop the connection pool when the server started. I have created an admin servlet that starts and stops the connection pool the same way starting and stopping tomcat did it...
been getting a lot of class cast exceptions with the following call: dbPoolConnServlet obj =(dbPoolConnServlet) context.getAttribute(dbPoolConnServlet.KEY); i know for a fact that context.getAttribute(dbPoolConnServlet.KEY) returns a dbPoolConnServlet object because i have the following line of code before i do the cast ( i print out the object id and number) ie Object obja = context.getAttribute(dbPoolConnServlet.KEY); System.out.println("obj " + obja); produces: obj dbPoolConnServlet@439a20 this indicates that obja is in-fact a dbPoolConnServlet and should cast without a problem... this is a strange error since i have not changed any code in going from tomcat starting the pool to this new servlet. I get this error after i do a ant build. IF i stop tomcat and restart --> then hit the servlet, there is not problem. IF i then do an ant build --> then hit the servlet It only appears to be a problem if it has been loaded in memory once. After a build, i get this error everytime... --error -- java.lang.ClassCastException: dbPoolConnServlet at tmplLogin.getConnectionPool_pcs(tmplLogin.java:392) -- To unsubscribe: <mailto:[EMAIL PROTECTED]> For additional commands: <mailto:[EMAIL PROTECTED]> Troubles with the list: <mailto:[EMAIL PROTECTED]>