When using proxool do I need to explicitly close each getConnection ()?

I am writing a new DB connection code and thought I would try proxool as a connection pool developer.

Typically, the programmer will ensure that each DriverManager.getConnection (...) driver is followed by connection.close ().

But when using Proxool do you need to close? I am confused because:

a. The proxool documentation here ( http://proxool.sourceforge.net/quickStart.html ) shows that calling close (), however,

b. I read somewhere that proxool adds stop hooks that close everything when the program exits.

My program is of prime importance - performance (up to 200 records per second), so I'm not sure how Proxool getConnection () / close () will affect performance.

My questions:

  • Is it required to close (), or can I rely on Proxool to close my connections?

  • If I have to explicitly call the close () method each time, will this not affect performance?

Thanks in advance.

+3
source share
1 answer

/ , close(), , , . , , /.

, DO connection.close(), , , , , .

+7

Source: https://habr.com/ru/post/1715138/


All Articles