I’m creating a maven jsf2 web application. I initialized bonecp connection pool object (BoneCp class) in a class which implements ServletContextListener. This class run before web app is start. Am I doing the right thing? That’s, Connection Pool initialization is placed in correct area ? When I initialize bonecp object in a normal class having singleton pattern, the database I used is responding very slowly when some operations are executed in web application. This database is stored in IBM powerful servers. Therefore I confused where I have to put bonecp connection pool initilization codes.
I’m creating a maven jsf2 web application. I initialized bonecp connection pool object (BoneCp
Share
You don’t mention which Java Web Container you are using. One of the reasons to use a database connection pool is to avoid storing the database username and password in the web application and for that reason they are generally configured as part of the web container. Your web application then simply references the connection pool and authentication is handled behind the scenes.