Sun Java System Application Server 7 Update 11 Release Notes

- Previous: Message Service and Message-Driven Beans
- Next: Application Deployment

## Java Transaction Service (JTS)

This section describes the known Java Transaction Service (JTS) issues and associated solutions.

### Recovery

There are some known problems with the recovery implementations of some of the JDBC drivers. For these known problems, Sun Java System Application Server provided some workarounds. By default, these workarounds will not be used unless you explicitly indicate that these workarounds are to be used.

- Issue with the Oracle (R) JDBC driver—Oracle XA Resource implementation’s recover method repeatedly returns the same set of in-doubt Xids regardless of the input flag. According to the XA specs, the Transaction Manager should initially call `XAResource.recover` with TMSTARTSCAN and then call `XAResource.recover` with TMNOFLAGS repeatedly until no Xids are returned.

  Oracle XA Resource’s commit method also has some problems, which are addressed in a workaround provided by the Sun Java System Application Server. To enable this workaround, the following property should be added to the `transaction-service` subelement in the `server.xml` file: `oracle-xa-recovery-workaround`

  This property value should be set to true.

- Issue with Sybase JConnect 5.2—There are some known problems with JConnect 5.2 driver which are resolved in JConnect 5.5. If the JConnect 5.2 driver is used, to make recovery to work, the following property should be added to the `transaction-service` subelement in the `server.xml` file:

  `sybase-xa-recovery-workaround`

  This property value should be sent to true.

### Transactions

In the `server.xml` file, `res-type` is used to demarcate the connection as non-XA or XA. This demarcation is used to identify the configuration of the data source to drive data. For example, in the Datadirect driver, the same data source can be used as either XA or non-XA.

The default behavior of the data source is non-XA. To make the data source behave as XA with the `connpool` element for transactions, `res-type` is needed. For the `connpool` element to work and participate in transactions, add the following for the attributes `res-type` in the `server.xml` file:

`res-type="javax.sql.XADataSource"`

ID | Summary
--- | ---
4689337 | The connection from XADatasource in non-txn context cannot be used. This is a known database driver issue. When there is a connection in a non-txn context, with XADataSource the `Autocommit` is set to false by default. Solution Use the non-XA datasource class to call the commit/rollback programs explicitly rather than through transactions.
4700241 | Non-zero transaction timeout setting causes slow local transactions. Currently, the Local Transaction Manager does not support transactions with definite timeouts. If you set the `timeout-in-seconds` attribute in `transaction-service` element to a value greater than 0, all local transactions will be processed as a global transactions, and will take longer to complete. A local transaction might also fail, if the data source driver does not support global transactions. A timeout value of 0 means that the transaction manager will wait indefinitely if it does not hear back from a participating data source. Solution Reset the `timeout-in-seconds` value to its default value of 0.

- Previous: Message Service and Message-Driven Beans
- Next: Application Deployment

- © 2010, Oracle Corporation and/or its affiliates