×

Loading...

Topic

This topic has been archived. It cannot be replied.
  • 工作学习 / IT技术讨论 / Oracle 里用ConnectionPoolDataSoure()和用DriverManager到底有实质上什么区别?
    • no body know?
      • 我想这是个好地方 http://www.itpub.net/
        • 这实际上是一个JAVA问题。
    • Datasouce 是JDBC 2.0中的东西, DriverManager是JDBC 1.1的东东
      • 我看不出有什么实质区别,所以才问。
        • The real differences.
          本文发表在 rolia.net 枫下论坛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.更多精彩文章及讨论,请光临枫下论坛 rolia.net