i am developing a J2EE application with JBoss 2.4.4 and a mySQL 4.1 database with transaction support. I have used one of the latest JDBC drivers for mySQL (mysql-connector-java-3.0.8-stable-bin.jar).
I have developed a stateful session bean that calls 2 methods at a data access layer (simple Java Bean methods). Each of these methods gets its own database connection from a defined XA-datasource and creates and executes prepared statements. After the methods execute their database commands they close the connection.
The session bean that calls the data access methods uses transaction attribute "Required" for all methods. When the second method fails, the application server does not rollback the transaction.
Is one of the used components not 2-phase commit enabled? Can someone give a complete configuration example to make 2-phase commit work?
When JBoss comes up there is a message from StatelesssessionBean container: No resource manager found Do I have to configure a resource-manager in jboss.xml ?
This is a simple representation of the session bean method.