DataSource or ConnectionPoolDataSource for Application Server JDBC resources

后端 未结 3 2028
别跟我提以往
别跟我提以往 2020-12-08 15:24

When creating JNDI JDBC connection pools in an application server, I always specified the type as javax.sql.ConnectionPoolDataSource. I never really gave it to

3条回答
  •  没有蜡笔的小新
    2020-12-08 15:31

    My understanding is that only purpose of ConnectionPoolDataSource is to give access to PooledConnection which implements native pooling by JDBC driver. In this case application server can implement connections pooling using this native interface.

    When using simple DataSource, appserver uses its own pooling instead of native.

    Can't say which approach is best.

提交回复
热议问题