Skip to main content

BES60 - Non-transactional DB connections in the pool are not released automatically

  • February 15, 2013
  • 0 replies
  • 0 views

Problem:

  • Product Name: Borland Enterprise Server
  • Product Version: 6.0.x
  • Product Component: BES Connection Pool, BES Container
  • Platform/OS Version: All
  • JDK/Compiler Version: As bundled with BES

Non-transactional DB connections in the pool are not released automatically

Resolution:

Non-transactional DB connections from BES Connection Pool are NOT automatically released or discarded in BES 6.0 version, whereas BES 5.2.1 seems to honour the "busyTimeout" and/or "idleTimeout" timeouts even for non-transactional connections. 

This results in the situation where DB connections are quickly used out . In particular, non-transactional DB connections, which are in "NoTxBusy" state, are not released automatically even though those connection objects where already reaped by GC.

As stated in BES JDBC FAQs, it is the responsibility of the application to manually close non-transactional connections. However, as found in some customers' cases, these connections are NOT released or discarded event GC is reaping them.

In other words, JDBC Connections in a state "NoTxBusy", for which no close() is ever issued before going out of application scope, are referenced indefinitely by BES Connection Pool. As a result, the underlying DB connection is never released -- i.e. JVM garbage collection does NOT remove them.

A new system property (FinalizeNoTxBusyConnections) has been introduced to the application deployer to set to enable weak references for BES JDBC Connection Pool so that those out-of-scope 'NoTxBusy' connections are freed when JVM GC occurs. This has been delivered as an enhancement patch for 6.0.1 (BES 6.0 RP1). (See also: Patch 4382 for BES 6.0 R1)

This property must be set in the partition configuration file (i.e. partition_server.config, as following:

vmparam -DFinalizeNoTxBusyConnections

Old KB# 15515

#Security
#VisiBroker
#BorlandApplicationServer