Utility lixar has been designed to operate in an
environment of statically defined Resource Managers: this was typical
for TX Demarcation Specification. XTA API provides a lot of flexibility
in comparison with TX: Resource Managers can be defined at run time;
furthermore, XTA for Java, allows the usage of every Resource Manager
that implement the javax.transaction.xa.XAResource
interface.
Under some conditions, when a standard XA Resource Manager and its switch load file exists, lixar can be used even to recover transactions managed by the XTA API, but there's actually no an alternative tool dedicated to XTA and XTA for Java.
PostgreSQL does not provide standard xa_
functions as well as MySQL/MariaDB. The LIXA project has implemented
the necessary functions building a proxy component that uses the
native PostgreSQL “XA like” SQL statements.
LIXA implementation serializes XIDs using a different algorithm than
PostgreSQL JDBC driver; lixar does not recognize
XIDs generated by PostgreSQL JDBC driver and recovery pending
transaction must be resolved manually. Here's an example:
tiian@ubuntu1404-64:~$ psql testdb psql (9.3.24) Type "help" for help. testdb=> select * from pg_prepared_xacts; transaction | gid | prepared | owner | database -------------+--------------------------------------------------------------+-----------------------------+-------+---------- 55122 | 1279875137_vF8w2TaEQDagSZWMOeqwqA==_Zf5GiZlb6PFbYYXrfE9CJw== | 2019-01-19 17:20:40.8768+01 | tiian | testdb (1 row) testdb=> ROLLBACK PREPARED '1279875137_vF8w2TaEQDagSZWMOeqwqA==_Zf5GiZlb6PFbYYXrfE9CJw=='; ROLLBACK PREPARED testdb=> select * from pg_prepared_xacts; transaction | gid | prepared | owner | database -------------+-----+----------+-------+---------- (0 rows)