Oracle Connection Pool Class

前端 未结 3 1622
轻奢々
轻奢々 2021-01-07 00:07

I want to setup a connection pool for a Oracle DB in a Helper class.

public class DbConnection {

// Data source for the pooled connection
private static Ora         


        
3条回答
  •  猫巷女王i
    2021-01-07 00:32

    You should not use a ConnectionPoolDataSource directly. It is intended for use by a connection pool in an application server. It does not provide connection pooling itself. See also https://stackoverflow.com/a/12651163/466862

    In other words: You need to use an actual connection pool, like DBCP, c3p0 or BoneCP, or the UCP (Universal Connection Pool).

提交回复
热议问题