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:
<log realm="debug" at="Sun Feb 12 22:47:39 UYST 2012.717" lifespan="2ms"> <commit> <id>2</id> <context> <entry key='REQUEST'> <isomsg direction="incoming"> <!-- org.jpos.iso.packager.GenericPackager[cfg/jcard.xml] --> <field id="0" value="2100"/> <field id="2" value="600933______0011"/> <field id="3" value="555555"/> <field id="4" currency="858" type="amount" value="0.00"/> <field id="7" value="0212224739"/> <field id="11" value="000000000003"/> <field id="12" value="20120212224739"/> <field id="13" value="000212"/> <field id="14" value="1001"/> <field id="17" value="0212"/> <field id="32" value="000001"/> <field id="37" value="12104759694 "/> <field id="41" value="29110001 "/> <field id="42" value="001001"/> </isomsg><isomsg id="43"> <!-- org.jpos.iso.packager.GenericSubFieldPackager --> <field id="2" value="jCard Selftest system"/> <field id="4" value="Montevideo"/> <field id="5" value="MV "/> <field id="7" value="UY "/> </isomsg> <isomsg id="113"> <!-- org.jpos.iso.packager.GenericSubFieldPackager --> <field id="2" value="106"/> </isomsg> </entry> <entry key='SS'>JCARD</entry> <entry key='TXNNAME'>100.55</entry> <entry key='SOURCE'>org.jpos.iso.channel.CSChannel@71e13a2c</entry> <entry key='PROFILER'> <profiler> open [0.6/0.6] prepare-response [6.0/6.6] close [1.0/7.6] end [15.3/15.3] </profiler> </entry> <entry key='TIMESTAMP'>Sun Feb 12 22:47:39 UYST 2012</entry> <entry key='TXNMGR'>txnmgr</entry> <entry key='DB'>org.jpos.ee.DB@7a315068</entry> <entry key='SWITCH'>100.55 (notsupported prepareresponse close sendresponse)</entry> <entry key='RC'>invalid.request</entry> <entry key='EXTRC'>Unsupported transaction</entry> <entry key='IRC'>1015</entry> <entry key='RESPONSE'> <isomsg direction="outgoing"> <!-- org.jpos.iso.packager.GenericPackager[cfg/jcard.xml] --> <field id="0" value="2110"/> <field id="2" value="600933______0011"/> <field id="3" value="555555"/> <field id="4" currency="858" type="amount" value="0.00"/> <field id="7" value="0212224739"/> <field id="11" value="000000000003"/> <field id="12" value="20120212224739"/> <field id="13" value="000212"/> <field id="14" value="1001"/> <field id="17" value="0212"/> <field id="32" value="000001"/> <field id="37" value="12104759694 "/> <field id="39" value="0030"/> <field id="41" value="29110001 "/> <field id="42" value="001001"/> </isomsg><isomsg id="43"> <!-- org.jpos.iso.packager.GenericSubFieldPackager --> <field id="2" value="jCard Selftest system"/> <field id="4" value="Montevideo"/> <field id="5" value="MV "/> <field id="7" value="UY "/> </isomsg> <field id="63" value="FORMAT ERROR"/> <isomsg id="113"> <!-- org.jpos.iso.packager.GenericSubFieldPackager --> <field id="2" value="106"/> </isomsg> <field id="123" value="Unsupported transaction"/> </entry> </context> </commit> </log>
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:
<log realm="org.jpos.transaction.TransactionManager" at="Sun Feb 12 22:47:39 UYST 2012.725" lifespan="23ms"> <debug> 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 <profiler> 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] </profiler> </debug> </log>

