Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

When are JDBC connections returned to the connection pool?

connection JDBC pool RETURNED
0
Posted

When are JDBC connections returned to the connection pool?

0

It depends on how the application obtains the connection. If the connection is obtained by an EJB or other application code in a way that the connection is part of a WebLogic-managed transaction (using a tx data source, the JTS driver, and so forth), then the connection is returned to the connection pool as soon as the transaction ends, either by commit, rollback, or timeout.

0

A. It depends on how the application obtains the connection. If the connection is obtained by an EJB or other application code in a way that the connection is part of a WebLogic-managed transaction (using a tx data source, the JTS driver, and so forth), then the connection is returned to the connection pool as soon as the transaction ends, either by commit, rollback, or timeout. If the connection is obtained by application code outside the context of a WebLogic-managed transaction, such as from a non-tx data source, the connection is returned to the pool as soon as the application code closes it. If the connection is not closed, eventually it will be garbage collected and then returned to the connection pool, but this is slow and indeterminate and can cause failures for applications that need a connection, so it is important to ensure that applications close pool connections when finished using them. Also, in JSPs and servlets, where one class may be running simultaneously in multiple

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.