All Forums General
avisek.ganguly 1 post Joined 05/12
28 May 2012
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.

tomnolan 594 posts Joined 01/08
29 May 2012

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

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

You must sign in to leave a comment.