This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I setup a jdbc-jndi to informix in my webapp with tomcat 4.0.3. Then I restart the database, and retest my webapp, I am suprise to see that the connection pool is still work, here is my code to get connection whenever I need one: Context initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup("java:comp/env"); DataSource ds = (DataSource)envCtx.lookup("jdbc/informix"); Connection con = ds.getConnection(); My questions: 1) Is a new connection pool created everytime I use the code above? If so, then that is why it works even I restart database. 2) If not, then is tomcat validate the connection object before return it out? (otherwise I will get error when I use the connection object) 3) If it do validate the connection, any info. about how it get validated? i.e. simple select...? Thanks. David