Connection pool or data source? Which should I put in JNDI?

You don't need to pool the data source, obtained from JNDI, as it is already pooled :) The only difference between having a container-manager pool v.s. Application pool is that in 1st case you have an ability to monitor the workload on the pool using the standard interfaces (e.g. JBoss console). Then administrator of the application server manages the decision about increasing the pool size, if necessary.

He may also switch applications to another DB server (e.g. Planned migration from MySQL to Oracle). The disadvantage is that you need slightly more efforts to setup JNDI test data source for your unit tests (see here ) And in 2nd case, yes, you have to package either DBCP or c3p0 plus the JDBC driver together with you application. In this case it is not so easy to collect the statistics about all pools for all application running in Tomcat.

Also migration to newer JDBC driver (MySQL 4 to MySQL 5) cannot be done for all applications at once. And connection properties are wired to your application, even if you use a property file (so changing that needs reassembling and redeployment of the project). Perhaps you don't need all that, as you have only application, one DB and no management overhead More topics on this subject: 10 pools with 5 connections v.s.

1 pool with 50 connection (that is what happens when each application starts using it's own pool) DBCP vs C3P0 Connection pool implementations Why to use a connection pool?

You don't need to pool the data source, obtained from JNDI, as it is already pooled :) The only difference between having a container-manager pool v.s. Application pool is that in 1st case you have an ability to monitor the workload on the pool using the standard interfaces (e.g. JBoss console). Then administrator of the application server manages the decision about increasing the pool size, if necessary.

He may also switch applications to another DB server (e.g. Planned migration from MySQL to Oracle). The disadvantage is that you need slightly more efforts to setup JNDI test data source for your unit tests (see here). And in 2nd case, yes, you have to package either DBCP or c3p0 plus the JDBC driver together with you application.

In this case it is not so easy to collect the statistics about all pools for all application running in Tomcat. Also migration to newer JDBC driver (MySQL 4 to MySQL 5) cannot be done for all applications at once. And connection properties are wired to your application, even if you use a .

Property file (so changing that needs reassembling and redeployment of the project). Perhaps you don't need all that, as you have only application, one DB and no management overhead. More topics on this subject: 10 pools with 5 connections v.s.

1 pool with 50 connection (that is what happens when each application starts using it's own pool) DBCP vs C3P0 Connection pool implementations Why to use a connection pool?

2 There's also Tomcat JDBC Pool (people.apache. Org/~fhanik/jdbc-pool/jdbc-pool. Html) which should be taken into consideration.

– rit Oct 9 at 17:08.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions