TransactionManager Debug and Trace events
· 2 min read
While working on a project, from time to time, we might request the TransactionManager 'Debug' and 'Trace' events.
The Debug event is the one created by the org.jpos.transaction.Debug participant and looks like this:
JCARD
100.55
org.jpos.iso.channel.CSChannel@71e13a2c
open \[0.6/0.6\]
prepare-response \[6.0/6.6\]
close \[1.0/7.6\]
end \[15.3/15.3\]
Sun Feb 12 22:47:39 UYST 2012
txnmgr
org.jpos.ee.DB@7a315068
100.55 (notsupported prepareresponse close sendresponse)
invalid.request
Unsupported transaction
...
...
It basically dumps the Context. On the other hand, the Trace event usually comes after the Debug (provided the TransactionManager's trace property is set to true) and looks like this:
txnmgr-1:2
prepare: org.jpos.jcard.PrepareContext NO_JOIN
prepare: org.jpos.jcard.CheckVersion READONLY NO_JOIN
prepare: org.jpos.transaction.Open READONLY NO_JOIN
prepare: org.jpos.jcard.Switch READONLY NO_JOIN
groupSelector: notsupported prepareresponse close sendresponse
prepare: org.jpos.jcard.NotSupported NO_JOIN
prepare: org.jpos.jcard.PrepareResponse NO_JOIN
prepare: org.jpos.transaction.Close READONLY
prepare: org.jpos.jcard.SendResponse READONLY
prepare: org.jpos.jcard.ProtectDebugInfo READONLY
prepare: org.jpos.transaction.Debug READONLY
commit: org.jpos.transaction.Close
commit: org.jpos.jcard.SendResponse
commit: org.jpos.jcard.ProtectDebugInfo
commit: org.jpos.transaction.Debug
head=3, tail=3, outstanding=0, active-sessions=2/2, tps=0, peak=0, avg=0.00, elapsed=22ms
prepare: org.jpos.jcard.PrepareContext \[0.0/0.0\]
prepare: org.jpos.jcard.CheckVersion \[0.0/0.0\]
prepare: org.jpos.transaction.Open \[0.5/0.6\]
prepare: org.jpos.jcard.Switch \[0.0/0.6\]
prepare: org.jpos.jcard.NotSupported \[0.1/0.7\]
prepare: org.jpos.jcard.PrepareResponse \[5.8/6.6\]
prepare: org.jpos.transaction.Close \[0.0/6.6\]
prepare: org.jpos.jcard.SendResponse \[0.0/6.6\]
prepare: org.jpos.jcard.ProtectDebugInfo \[0.0/6.7\]
prepare: org.jpos.transaction.Debug \[0.0/6.7\]
commit: org.jpos.transaction.Close \[1.0/7.7\]
commit: org.jpos.jcard.SendResponse \[4.3/12.0\]
commit: org.jpos.jcard.ProtectDebugInfo \[0.2/12.3\]
commit: org.jpos.transaction.Debug \[9.3/21.7\]
end \[22.8/22.8\]
UPDATE - in recent versions of jPOS, the Debug and Trace events are placed together by the TransactionManager.