lixavsr is a command line utility provided by LIXA project and dedicated to people interested in experimenting with the XA Specification.
The utility is a very stupid robot that can be programmed to execute a sequence of XA instructions. Here is a basic example of the type of experiments that can be performed:
0/xa_open("",0,TMNOFLAGS)/0 0/xa_start("231.a256cf41.ff45a3",0,TMNOFLAGS)/0 0/xa_end("231.a256cf41.ff45a3",0,TMSUCCESS)/0 0/xa_prepare("231.a256cf41.ff45a3",0,TMNOFLAGS)/0 0/xa_commit("231.a256cf41.ff45a3",0,TMNOFLAGS)/0 0/xa_start("231.a256cf41.ff45a3",0,TMNOFLAGS)/0 0/xa_end("231.a256cf41.ff45a3",0,TMSUCCESS)/0 0/xa_commit("231.a256cf41.ff45a3",0,TMONEPHASE)/0 0/xa_close("",0,TMNOFLAGS)/0 0/vsr_quit()/0
The robot is a driver that:
reads commands from a text file (see
doc/lixavsr.txt
for the syntax definition)
activates, if necessary, new threads of control
sends every command to the prescribed thread of control
retrieves command return codes and check it with the desired ones
The command line options that are supported by lixavsr
can be retrieved with option
--help
:
tiian@ubuntu1404-64:~/lixa$ /opt/lixa/bin/lixavsr --help Usage: lixavsr [OPTION...] - LIXA test utility Help Options: -h, --help Show help options Application Options: -f, --filename Name of the file with the actions that must be executed -t, --threads Use threads instead of processes -v, --version Print package info and exit -s, --sleep Sleep 1 second before killing children at exit
XA Specification introduces the concept of
thread of control but it does not prescribe how to
implement it: it's an abstract concept that applies to any generic
operating system. lixavsr enables you to implement
the abstract thread of control as a standard
POSIX process (default behavior) or as a standard POSIX thread
(using -t --threads
command line
option).
Some Resource Managers can behave differently depending of the type of thread of control.
Some examples are provided inside directory
etc/lixavsr
as shown below:
tiian@ubuntu1404-64:~/lixa$ ls -la etc/lixavsr/ total 132 drwxrwxr-x 2 tiian tiian 4096 mar 18 18:45 . drwxr-xr-x 3 tiian tiian 4096 mar 18 18:39 .. -rw-rw-r-- 1 tiian tiian 1051 mar 4 17:29 00_trivial.txt -rw-rw-r-- 1 tiian tiian 799 mar 15 22:39 01_single_toc.txt -rw-rw-r-- 1 tiian tiian 780 mar 15 22:08 02_single_toc.txt -rw-rw-r-- 1 tiian tiian 1287 mar 15 22:09 03_double_toc.txt -rw-rw-r-- 1 tiian tiian 1214 mar 15 22:13 04_double_toc.txt -rw-rw-r-- 1 tiian tiian 2993 mar 15 22:14 10_suspend_resume.txt -rw-rw-r-- 1 tiian tiian 2834 mar 15 22:14 11_end_join.txt -rw-rw-r-- 1 tiian tiian 2921 mar 15 22:14 12_end_join.txt -rw-rw-r-- 1 tiian tiian 1568 mar 15 22:15 13_end_join.txt -rw-rw-r-- 1 tiian tiian 6767 mar 15 22:16 14_branch_ora.txt -rw-rw-r-- 1 tiian tiian 6276 mar 15 23:34 15_branch_mys.txt -rw-rw-r-- 1 tiian tiian 6280 mar 15 23:33 16_branch_pql.txt -rw-rw-r-- 1 tiian tiian 7433 mar 15 23:33 17_branch_pql_ora.txt -rw-rw-r-- 1 tiian tiian 5026 mar 15 23:32 18_branch_mys_pql.txt -rw-rw-r-- 1 tiian tiian 5254 mar 15 23:32 19_branch_mys_ora.txt -rw-rw-r-- 1 tiian tiian 14609 mar 18 18:45 Makefile -rw-rw-r-- 1 tiian tiian 324 mar 18 18:45 Makefile.am -rw-rw-r-- 1 tiian tiian 14519 mar 18 18:45 Makefile.in -rw-rw-r-- 1 tiian tiian 283 mar 5 22:02 README
These files are not installed because they are a development tool, not a production tool: they are available only in the source tree.
Just as an example, here is a sample execution:
tiian@ubuntu1404-64:~/lixa$ export LIXA_PROFILE=PQL_STA tiian@ubuntu1404-64:~/lixa$ /opt/lixa/bin/lixavsr -f etc/lixavsr/03_double_toc.txt toc=0 xa_open("dbname=testdb",0,0x00000000)=0 toc=1 xa_open("dbname=testdb",0,0x00000000)=0 toc=0 xa_start("231.a256cf41.ff45a3",0,0x00000000)=0 toc=1 xa_start("231.a256cf42.ff45a4",0,0x00000000)=0 toc=0 xa_end("231.a256cf41.ff45a3",0,0x04000000)=0 toc=1 xa_end("231.a256cf42.ff45a4",0,0x04000000)=0 toc=0 xa_prepare("231.a256cf41.ff45a3",0,0x00000000)=0 toc=1 xa_prepare("231.a256cf42.ff45a4",0,0x00000000)=0 toc=0 xa_commit("231.a256cf41.ff45a3",0,0x00000000)=0 toc=1 xa_commit("231.a256cf42.ff45a4",0,0x00000000)=0 toc=0 xa_start("231.a256cf41.ff45a3",0,0x00000000)=0 toc=1 xa_start("231.a256cf42.ff45a4",0,0x00000000)=0 toc=0 xa_end("231.a256cf41.ff45a3",0,0x04000000)=0 toc=1 xa_end("231.a256cf42.ff45a4",0,0x04000000)=0 toc=0 xa_commit("231.a256cf41.ff45a3",0,0x40000000)=0 toc=1 xa_commit("231.a256cf42.ff45a4",0,0x40000000)=0 toc=0 xa_close("",0,0x00000000)=0 toc=1 xa_close("",0,0x00000000)=0 toc=0 exiting... toc=1 exiting...