Forums Register Login

javax.sql.DataSource and javax.sql.ConnectionPoolDataSource

+Pie Number of slices to send: Send
When creating a connection pool in Glassfish, I am confused with these two options:
javax.sql.DataSource and javax.sql.ConnectionPoolDataSource.

What is the difference between javax.sql.DataSource and javax.sql.ConnectionPoolDataSource ?

I thought every implementation of javax.sql.DataSource supports connection pooling. ( Not just javax.sql.ConnectionPoolDataSource )

Also, I read somewhere that some app servers like Glassfish will use ConnectionPoolDataSource regardless and expose just DataSource.

If we close the connection returned by (getConnection() of javax.sql.DataSource), wont that go back to connection pool ?

Let me put it this way :

What is the necessity of having javax.sql.ConnectionPoolDataSource, when javax.sql.DataSource itself supports pooling.
Am I assuming anything? Will every app server implements DataSource such a way that is supports pooling? Yes/No ?
Goodbye moon men. Hello tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 2743 times.
Similar Threads
connection pooling implementation
using datasource - connection pooling
Trying to set up Connection Pooling using Glassfish
EJB & JPA Unexpected Results
How to get the DataSource Object in the servlet
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 19:12:44.