A model with 2 databases DB1 & DB2 contains a server Procedure Step which reads data from tables E1 & E2 in DB1 & DB2 respectively.
Databases DB1 & DB2 have been created on the SQL Server instance and the DDL installed.
The Server Manager was generated for JVM/JDBC/JAVA/EJB and assembled to create an EJB ear file which was deployed to JBoss 7.1 EAP where SQL Server datasources have been created for databases DB1 & DB2
On execution the read from database DB1 was successful but the read from database DB2 fails with this error:
===
TIRM170E: An error was encountered on the server
BaseDBMSManager.getStatement() caught ABException getting connection for: DB2 Exception: com.ca.gen.abrt.ABException: [Function: DataSourceDBMSManager.connect]Error attempting to determine if transactions are supported: java.sql.SQLException: IJ031070: Transaction cannot proceed: STATUS_MARKED_ROLLBACK
===
Release : 8.6
Component : CA Gen Enterprise Java Beans
JBoss EAP 7.x
1. Search on the error IJ031070 gives an indication of the root cause e.g. Red Hat solution: "Transaction cannot proceed: STATUS_MARKED_ROLLBACK" in JBoss EAP (requires Red Hat account to access):
===
The transaction was previously marked for rollback but something is attempting to continue using a connection that was enlisted in that transaction. The reason the transaction was initially marked for rollback may be one of the following
setRollbackOnly()
that result from exceptions such as:
===
Note the Red Hat solution page contents for hyperlink Unsafe attempt to enlist of multiple non-XA resources
In this case non-XA datasources had been defined for DB1 & DB2 instead of XA datasources.
In the JBoss EAP 7.1 Administration Console> Configuration > Datasources it states:
Non-XA Datasources : Manage non-XA datasources, which are used for applications that do not use transactions, or applications that use transactions with a single database.
XA Datasources : Manage XA datasources, which are used by applications whose transactions are distributed across multiple databases
2. If not already performed, additional configuration may be required for Microsoft Distributed Transaction Coordinator (MS DTC) and SQL Server Database to enable XA transactions.
This warning message indicates that there is some configuration required on SQLServer in order for it to support XA transaction recovery. Many databases do not support XA recovery out of the box and must be manually configured to enable such support. You have to contact the vendor support for more information on how to perform the necessary configuration.
XA datasource is configured in JBoss but XA is not supported on database side. Check this article Understanding XA Transactions from Microsoft MSDN for more details.
===