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 have an application that connects to a DB via JDBC. In the init() method of my app, I'm initializing the connection to the DB. When the client makes a request, the connection will be used to run a query and get the results. My problem is this: mine is a long running server process. It could sometimes be days or hours between requests and the DB connection is closed. How do I keep this connection alive indefinitely? What are the typical approaches in this case? Would connection pooling be a good idea? Thanks for any pointers, Sashi