The real differences.

baden (Booster)
<本文发表于: 相约加拿大:枫下论坛 >
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.
<本文发表于: 相约加拿大:枫下论坛 >

2001-10-25 -04:00

回到话题: Oracle 里用ConnectionPoolDataSoure()和用DriverManager到底有实质上什么区别?

回到论坛: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论