NF4.1 Monitor Trx

From iDempiere en
Jump to navigation Jump to search

Feature: Monitor Trx

Goal: Technical

Contributor: TrekGlobal

Developer: Heng Sin Low


Databases sometimes hit hard to trace conditions, like locks or connection leaks.

It's usually difficult to figure out where in the code the problem resides.

In order to ease that, a way to monitor transactions was implemented.

This is a strictly technical improvement, the user doesn't notice anything different, but the system administrator can now see in the idempiereMonitor page information about where the transaction was started.

It looks like this:

01 MonitorTrx.png

And when you click on a transaction a popup window is raised showing stack trace information collected, where is collected depends on SysConfig key (see below).

02 MonitorTrx.png

Technical Info: IDEMPIERE-3416

For System Administrator:

By default the system traces the point where the transaction was opened or the last time it used the PO object.

However, if you need to trace in more detailed way it is possible to create in System a System Configurator key named TRACE_ALL_TRX_CONNECTION_GET with Value=Y - in this case the system will trace whenever the connection is used, this can be expensive in terms of performance, and that's why this option is disabled by default, and can be enabled per request with this SysConfig key.

For Developers:

A new method setDisplayName was added to the org.compiere.util.Trx class - it is recommended whenever you use the createTrxName also set some additional information to display - the information set with setDisplayName is shown in the idempiereMonitor page.