Since you session is stateless you must close the connections.
There is no way and you are not allowed to hold connections open for the client
Closing the connection does not commit the transaction. It just suspends the
connection. Further work in the same transaction will use the same connection.
MySQL has no support for XA, so I don't know what you mean by older.
Make sure you are using InnoDB tables. The older MySQL
table types do not support transactions.
thanks for your reply!
You are certainly right in respect to closing the connection EVERY TIME.
Indeed, the close does not commit the connection and I should have/
could have found it out myself...
Sorry for bothering this newsgroup.
MySQL XA JDBC driver:
The mysql-connectior-java-2.0.14 distribution DOES
contain an XA-JDBC-Driver.
It is just a fake implementation though since MySQL itself
does not really support 2PC. (Internally the driver does 1PC.)
Later the mysql developers have removed this driver from the
distribution (probably because they felt it did not make much sense).
E.g. in mysql-connectior-java-3.0.10 it is not available anymore.
The old XA driver works fine (at least as a fake driver).
PS: Here is a related sample *-ds.xml:
<?xml version="1.0" encoding="UTF-8"?>