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.
In my application having around 10 actions i want to connect to database in all actions.
i am using a class DBConnector whose instance will make a connection with the database specified. i want to create an instance of this class only once in the scope of my application. that is only one connection for all clients irrespective of the session.
where should i instantiate this class to accomplish my requirement. In ActionServlet or RequestDispatcher? which method should i override to get this.