Skip to main content Skip to complementary content

Troubleshooting transaction issues

Availability-noteDeprecated
You can use any of the following operations to debug transaction issues.

List active transactions

If you enable the Log4j category com.amalto.core.server, the server will periodically show every 20 seconds how many active transactions are currently managed and all active transactions with their ids.

Change MDM transaction log level to DEBUG

Edit the file <MDM_ROOT>conf/log4j.xml and make sure the following configuration exists:

<category name="com.amalto.core.server.MDMTransaction">
   <priority value="DEBUG"/>
</category>

In this mode, MDM will track transaction creations and then provide more information on problematic transactions when they are detected.

Add the TransactionsGuard filter

Edit the file <Tomcat_Path>/webapps/talendmdm/WEB-INF/web.xml and then add the following:

<filter>
   <filter-name>transactionGuardFilter</filter-name>
   <filter-class>com.amalto.core.servlet.TransactionsGuardFilter</filter-class>
   <init-param>
      <param-name>throw.exceptions.BEFORE</param-name>
      <param-value>true</param-value>
   </init-param>
   <init-param>
      <param-name>throw.exceptions.AFTER</param-name>
      <param-value>false</param-value>
   </init-param>
</filter>
<filter-mapping>
   <filter-name>transactionGuardFilter</filter-name>
   <url-pattern>/*</url-pattern>
</filter-mapping>

This will add and activate a new servlet filter to the Web application.

This filter will check before and after each HTTP request if a transaction is attached to the current HTTP thread.

If a transaction is found, the filter will log a warning message, including the transaction creation stacktrace if DEBUG is enabled on MDM transaction. For more information, see Change MDM transaction log level to DEBUG.

The filter parameters are described below:

Filter parameter

Description

throw.exceptions.BEFORE

If this parameter is set to true, the filter will throw an exception before executing the request (returning an HTTP 500 error).

throw.exceptions.AFTER

If this parameter is set to true, the filter will throw an exception if a transaction is attached to the current thread after executing the request (returning an HTTP 500 error even if the request was actually successful, which is not really recommended).

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!