Installation and Administration

Transactions and Connections

Troubleshooting issues with connections with transactional resources (databases) can be done with the help of nuxeo-core-management-jtajca .

Logging Transactional Events

Configure log4j in NUXEO_HOME/lib/log4j.xml by adding the following keywords to your appender conversion pattern %t for the thread name and %X for the logging context map:

<param name="ConversionPattern" value="%d{ISO8601} %t %-5p [%c] %m %X%n" />

You should also add a new category if you want the traces being enabled:

<category name="org.nuxeo.ecm.core.management.jtajca">
  <priority value="TRACE" />
</category>

At this stage, once a transaction is started or a connection is opened, their identifiers are put in a context map for the logger. By adding the %X keyword, you've requested to print them each a message is logged. The transactions and connections will also be logged. You should add additional log statements at level debug or trace around the code you want to monitor.

Monitoring Transactional Resources

You should enable JMX for being able to poll the mbean attributes. In NUXEO_HOME/bin/nuxeo.conf uncomment the JMX options.

You should note that the these settings open a security hole on the server and should not be left as this in production.

# Enable JMX
JAVA_OPTS=$JAVA_OPTS -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=1089 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false

You've got beans in JMX that will enable you to monitore the transactions and connections used in your system. Just point your JMX browser (such as JVisualVM which is part of the JDK) to the server and look for the following beans :

  • org.nuxeo.ecm.core.management.jtajca:type=StorageConnectionMonitor,name=default
  • org.nuxeo.ecm.core.management.jtajca:type=DatabaseConnectionMonitor,name=NuxeoDS
  • org.nuxeo.ecm.core.management.jtajca:type=TransactionMonitor,name=jdoe

The connection monitoring provides you with a way to configure the pool connection size used by the Nuxeo storage. It also gives you access to global counters about the connection usage. It's enabled by default.

The transaction monitoring provides useful information about the transactions in progress in your application. Also it gives you global counters and information about the last committed and rollbacked  transaction in the system. You should enable it by invoking the toggle operation.

 

a month ago Andrew Goodricke Syntax error fixed
5 years ago Solen Guitter 19 | ypo
5 years ago Stéphane Lacoin 18
5 years ago Stéphane Lacoin 17
6 years ago Solen Guitter 16
6 years ago Solen Guitter 15
7 years ago Solen Guitter 14
7 years ago Solen Guitter 13
7 years ago Julien Carsique 12
7 years ago Olivier Grisel 11
7 years ago Olivier Grisel 10 | use JVisualVM as suggested JMX browser
7 years ago Olivier Grisel 9
7 years ago Olivier Grisel 8
7 years ago Thierry Delprat 6
7 years ago Thierry Delprat 7
7 years ago Stéphane Lacoin 5
7 years ago Stéphane Lacoin 4
7 years ago Stéphane Lacoin 3
7 years ago Stéphane Lacoin 2
7 years ago Stéphane Lacoin 1
History: Created by Stéphane Lacoin

We'd love to hear your thoughts!

All fields required