Edit | Attach | New | Raw | Delete | History | Print | Tools

JMX Instrumentation of Active Transactions

You can use JMX to inspect and administer active (pending) transactions. This is most relevant for problematic transactions that require the intervention of a human administrator.

The Atomikos JMX administration facility offers a graphical interface to the active transactions in the core. Administrators can use this to perform the following operations:

  • Retrieve the list of currently active transactions.
  • Filter out any problematic HEURISTIC transactions.
  • Manually terminate problematic transactions.

Configuring for JMX in the JDK 1.5

The following code fragment shows how to configure JMX administration for the built-in JMX in JDK 1.5.

JmxTransactionService service = new JmxTransactionService(); //1
//optionally configure this to set heuristics only:
//service.setHeuristicsOnly ( true );
MBeanServer jmx = ManagementFactory.getPlatformMBeanServer(); //2
ObjectName mBeanName = new ObjectName ( "atomikos:type=Transactions" ); //3
jmx.registerMBean ( service , mBeanName ); //4

Assuming that you are using jconsole to connect to the JMX server inside your application's VM: the JMX functionality will show up in the jconsole, under atomikos.

Note that the application needs to specify additional VM parameters to allow jconsole to connect, for instance like this:

java -Dcom.sun.management.jmxremote.authenticate=false 

See http://java.sun.com/developer/technicalArticles/J2SE/jconsole.htmlexternal for more information on the jconsole utility.

Configuring for Other MBeanServer Implementations

To use another MBeanServer implementation, all you need to do is modify line 2 above to obtain the right MBeanServer instance.

Easier Config with ExtremeTransactions JMX tools

Atomikos ExtremeTransactions® subscribers enjoy easier and more elaborate JMX controls as part of their subscription. See the commercial JMX examples accessible via your subscription.
Copyright © 2015 Atomikos BVBA. Transaction Management for Extreme Transaction Processing and SOA Environments serving ISV, Commercial, OEM and Open Source Markets
Site map RSS ATOM