Configuring the jta-tmf application, Running the jta-tmf application, How do local transactions work – HP Integrity NonStop H-Series User Manual
Page 48

•
NSXARM debug can be initiated by setting the environment variable
> export XARMDBG=yes
•
Audit option can be enabled by specifying the audit file location in the
default.xarm.properties
file.
Configuring the JTA-TMF application
Set the _RLD_LIB_PATH to point to the <NSMQ-Installation-folder>/lib/tmf/ directory
where the libxarml.so file is present. Ensure that the file has execute permission.
For example,
export _RLD_LIB_PATH=
Running the JTA-TMF application
1.
Ensure that the $XARMWRAPPER_HOME variable points to the JTA-TMF directory.
2.
Execute the following command from the $XARMWRAPPER_HOME/samples directory:
ant NonStopJBossTM -Durl=
-Dcatalog.schema=
where,
•
is a running NSMQ broker instance. For example,
tcp://15.154.112.85:61616
•
is an existing catalog and schema
NOTE:
All the parameters are required. If the –Dcommit value is true, the transaction is
committed, else rolled back.
3.
Messages are displayed on the console when the program is run.
For example,
[java] Apr 18, 2013 9:59:45 PM NonStopJBossTM
[java] WARNING: Table already exists, continuing...
[java] log4j:WARN No appenders could be found for logger(org.apache.activemq.
transport.WireFormatNegotiator).
[java] log4j:WARN Please initialize the log4j system properly.
[java] log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig
for more info.
[java] 04-18-2013 21:59:55.128 My thread Thread[main,5,main]NonStopXARM :
NonStopXARM starting
[java] 04-18-2013 21:59:55.140 My thread Thread[main,5,main]NonStopXARM :
NonStopXARM started
[java] Checking, if commit option is true then the row/message count will
be 1 else 0....
[java] commit Option: true
[java] Table row count: 1
[java] Message count: 1
How do local transactions work?
A Session may optionally be specified as transacted. Each transacted session supports a single
series of transactions. Each transaction contains a set of produced and consumed messages grouped
into input message stream and output message stream units. When a transaction commits, unit of
input is acknowledged and its associated unit of output is sent. If a transaction is rolled back, its
produced messages are destroyed and its consumed messages are automatically recovered.
A transaction is completed using its session’s commit() or rollback() method. When a session’s
current transaction completes, it automatically begins the next. This results in always having a
current transaction in a transacted session, within which its work is done.
48
Integration