0

Having gone through the AtmoikosAPISpecification , AtomikosTransactionGuide and some other web references we have some idea about how the Atomikos transaction manager works and how the transaction recovery process work in 2PC environment.

If we need to understand and monitor the actual recovery processes happening inside a production environment what are the existing tools or mechanism which we can use?

Is it possible to configure JMX to monitor the atomikos recovery process or do we need to implement recovery monitor tool using interfaces such as LogControl,LogAdministrator and AdminTransaction by our own?

We need to get some idea about actual XA resources which causing the problems, The root cause, The current status of the recovery process, Affected transactions etc..

Does following code in JMX configuration provide such details?

    <!--  
     Configure the Atomikos JMX transaction  
     service to administer pending transactions  
   --> 
    <bean id="jmxTransactionService"  
           class="com.atomikos.icatch.admin.jmx.JmxTransactionService"> 
       <!-- Optional: show only heuristic problem cases --> 
       <property name="heuristicsOnly" value="true"/> 
    </bean> 

Thanks

virtualpathum
  • 753
  • 2
  • 11
  • 23

3 Answers3

0

(I am from Atomikos)

Monitoring transaction recovery with built-in tools is something we reserve for our customers and we are working hard to support their needs in that. Please contact us via https://www.atomikos.com to find out more.

Thanks, Guy

Guy Pardon
  • 484
  • 2
  • 8
0

You can inspect your current Atomikos transactions via objects in:

JmxLogAdministrator.getInstance().getLogControl().getAdminTransactions();

Detailed methods desctiption: https://www.atomikos.com/downloads/transactions-essentials/com/atomikos/AtomikosTransactionsEssentials/javadoc/3.7/com/atomikos/icatch/admin/AdminTransaction.html

kasopey
  • 355
  • 4
  • 17
0

This is possible with commercial Atomikos 5.x as it comes with a decent library called "transactions-monitoring-logs".

It will pick up which (supported) logging library you use (e.g. Log4J) and every minute (by default) it will output system health statistics. Some of these monitoring logs are:

  • OLTP Monitoring
  • Connection Pool Monitoring
  • Recovery Monitoring
  • System Health Monitoring
  • Transaction Trace Monitoring

Here is a log sample for System Health Monitoring:

2023-04-05T21:57:24.477<ins>01:00 type=Statistics totalEventCountSinceLastPublish=0 percentCommitted=0.0 percentAborted=0.0 percentTimeout=0.0 percentExpiredInDoubt=0.0 percentHeuristic=0.0 commitsPerSecond=0.0 averageTransactionDurationMillis=0 maxTransactionDurationMillis=0 averageTimeoutDurationMillis=0 maxTimeoutDurationMillis=0 committedCount=0 abortedCount=0 timeoutCount=0 expiredInDoubtCount=0 heuristicCount=0

And here is another for Recovery Monitoring:

2023-04-05T22:41:30.124</ins>01:00 type=RecoveryFailedEvent uniqueResourceName=xa-data-source

You can modify the log level (and format) if required using:

Property name Meaning Since
com.atomikos.monitoring.interval_seconds The interval between output of system health statistics. Defaults to 60 seconds. 5.0
com.atomikos.monitoring.logs.format Specifies the transactions output format for monitoring. Defaults to key-value. Set to json if you prefer JSON output. 5.0
u-ways
  • 6,136
  • 5
  • 31
  • 47