-
1. Re: CommitCount is always zero
marklittle Mar 2, 2008 4:23 PM (in response to rm1)Did you enable statistics gathering for the transaction service? It is disabled by default in 4.2.
-
2. Re: CommitCount is always zero
rm1 Mar 3, 2008 5:40 AM (in response to rm1)Thank you - that was it.
Another question: Is the TransactionCount attribute reporting the number of active transactions or is it just the sum of commited and rolled back transactions? It seems to be increasing all the time on my system.
Thanks,
Rasmus -
3. Re: CommitCount is always zero
jhalliday Mar 3, 2008 7:24 AM (in response to rm1)TransactionCount is the total number of tx begun. Subtract the committed+aborted counts to find how many are still active.
-
4. Re: CommitCount is always zero
rm1 Mar 3, 2008 7:46 AM (in response to rm1)Thanks again - I have not been able to find this documented anywhere.
My problem now is that I would like to monitor the number of active transactions using an ThresholdMonitor MBean (see my code from JBoss 4.0.2 below), but how can I monitor something that's a difference between 3 attributes?
Rasmus<!-- Set up Deadlock Monitor. Monitors the number of active transactions. If number exceeds 50 at any time, a deadlock likely exists, and an alert is triggered. --> <mbean code="org.jboss.monitor.ThresholdMonitor" name="jboss.monitor:service=Deadlock_Monitor"> <attribute name="MonitorName">Deadlock Monitor</attribute> <attribute name="ObservedObject">jboss:service=TransactionManager</attribute> <attribute name="ObservedAttribute">TransactionCount</attribute> <depends-list optional-attribute-name="AlertListeners"> <depends-list-element>jboss.alerts:service=EmailAlertListener</depends-list-element> </depends-list> <attribute name="Threshold">50</attribute> <attribute name="Period">10000</attribute> <attribute name="CompareTo">-1</attribute> <attribute name="Enabled">true</attribute> </mbean>
-
5. Re: CommitCount is always zero
marklittle Mar 3, 2008 4:52 PM (in response to rm1)Check the docs on TxStats. I don't recall how many of the TxStats attributes are reflected in the current MBean though.