Configuring XA transactions for SQL Server
You must configure XA transactions after the Microsoft SQL Server database is installed and before you start the server. The SQL Server JDBC driver provides support for Java Platform, Enterprise Edition/JDBC 2.0 optional distributed transactions. JDBC connections obtained from the SQLServerXADataSource class can participate in standard distributed transaction processing environments such as Java Platform, Enterprise Edition (Java EE) application servers.
About this task
Failure to configure the XA transactions can result in the following error when the server starts:javax.transaction.xa.XAException: com.microsoft.sqlserver.jdbc.SQLServerException: Failed to create the XA control connection. Error: "Could not find stored procedure 'master..xp_sqljdbc_xa_init_ex'."..
The MS DTC service should be marked Automatic in Service Manager to make sure that it is running when the SQL Server service is started.
Procedure
What to do next
- From Start menu, click .
- Expand
- Locate TCP/IP on the right-hand side.
- Double click TCP/IP and enable it under the Protocol tab.
- Click the IP Addresses tab to enable the TCP port for each configured IP address.
Lock request time out period exceeded.; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException:
Lock request time out period exceeded.
To help prevent
a lock timeout from occurring (or to resolve a lock timeout after
it has occurred), you can add the custom property ENABLE_XARESOURCE_TIMEOUT
on the transaction service. The transaction service will provide an
appropriate timeout value to the XA resources when they are enlisted
in global transactions. Information about the ENABLE_XARESOURCE_TIMEOUT
custom property is found in the topic Transaction service custom properties.