Java – DBCP: removeabandoned vs evicted
I didn't figure out the difference between removeabandoned and deported I read somewhere that removeabandoned has been deprecated, but in the official documentation( http://commons.apache.org/dbcp/configuration.html )It was not mentioned anywhere in the
So if someone could inspire me, it would be very grateful:)
thank you!
Solution
They mean different things
Eviction > abandoned connection occurs when an application (idle in the pool) uses a database connection for a long enough period of time. It refers to the database connection that the application is still using after a period of time, which is usually enough to indicate connection leakage
Eviction does not mean that there is a problem with your code (just that the application needs fewer connections after a series of connections), and abandoned connections mean that the application is connecting rather than returning to the pool