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.

How does JDBC datasource property “invalidateConnectionOnError” affect management of JDBC Pool connections?

0
Posted

How does JDBC datasource property “invalidateConnectionOnError” affect management of JDBC Pool connections?

0

Introduced in BES 6.0, this property relates to the action taken for aborted in-transaction connections. A connection abort can occur for a number of reasons such as a database restart. By default the property has a ‘true’ boolean value indicating removal of the aborted connection from the connection pool. A connection abort is detected in transaction demarcation methods, commit() and rollback(); the connection is aborted if the transaction could not finish gracefully. This default behavior does not incur any extra overhead, as it simply uses the knowledge about the outcome of commit() or rollback() calls, if these calls throw SQL or runtime exceptions they lead to removal of the connection that encountered the exception. In certain rare instances it may be desirable to set this property to a value of ‘false’. For example, when there are too many commit failures due to optimistic concurrency. The property can be configured for a JDBC datasource using the Deployment Descriptor Editor. I

Related Questions

What is your question?

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

Experts123