Is there a reason why you wrote this instead of making use of the database connection pool? Using the pool is the best thing to do within a Java EE app.
Most containers provide their own connection pool. Tomcat for example can use commons DBCP to manage connections. Which container do you use and why dont you try to use its connection pooling mechanism ?
I state three things here: one the DBBoard class providing DataSource access to get Connection. and other is configuration of DataSource.
Could you please tell me is it not the correct way to use Tomcat 5.5 connection pool? If not then what is the correct way?
As in previous message by you and Peter suggesting to use Connection Pool provided by container, I think I made some mistake here the way accessing the connection pool.
Thanks again. It means the configuration part is correct.
And what about the class to getEnvironmentContext, getDataSource & getConnection. Is this implementation correct? please suggest if any changes need to incorporate!
Do I synchronize the getConnection method.
public static syncronized Connection getConnection(){...}
This message was edited 1 time. Last update was at by kavin clain