＜本文发表于: 相约加拿大:枫下论坛 www.rolia.net/f ＞
1. Performance, that's the good point of "Pooling". Establishing/Disconnecting a database session/connection is very expensive from performance perspective.
Pooling technology is not new. You may find it in almost every robust RDBMS systems.
2. Application code independence. The datasource is defineed and configured outside of the application code. It will make the application infrastructure neutral. The application code will only use a logical name for the datasource. The application assembler is actually resposible in mapping the logical data source name to its physical implementation.
Imagine you change your database location, use id, password or even the database platform while your application code is in production.
Using DriverManager, these information is hard coded into the application. By changng the code, you have to go through all rounds of unit test, system integration test, user acceptance test and finally launch your code into production again.
By using J2EE this issue can be addressed as configuration and operations issue. So it can be configured at runtime.
It saves a lot of efforts (time, money) for a business.＜本文发表于: 相约加拿大:枫下论坛 www.rolia.net/f ＞