JDBC + JPA operations throwing exception for 2 phase commit

General

JDBC + JPA operations throwing exception for 2 phase commit

Hi,

We are trying to do a EntityManager.MERGE operation in JPA and trying to retrieve the ID generated from the identity column but Teradata doesn't return the ID like Oracle does. is there any way of pulling the ID back from the JPA transaction.

Hence, we tried to do a native JDBC call and get the ID back through a preparedstatement operation and then consume the ID in the successive JPA operations.

Apparently, Teradata has a limitation on the Distributed Database Processing types operation and doesn't allow 2 Phase Commit transactions (JPA from the connection pool + Driver manager connection through Native JDBC). Apparently teradata drivers don't have XA extensions.

Any Pointers on how to circumvent this will be greatly appreciated.

1 REPLY
Teradata Employee

Re: JDBC + JPA operations throwing exception for 2 phase commit

You are correct that the Teradata Database does not support XA.

Which JPA implementation are you using? EclipseLink, Hibernate, ... ?