6.9.4 Configure JPA-Based Java App as Transaction Participant

Use the information provided in this section to configure Hibernate or EclipseLink as the JPA provider for your Helidon or Spring Boot applications.

Configuring a JPA-Based Java app as a transaction participant is similar to configuring a JDBC-based Java app as a transaction participant.

To configure a JDBC-based Java app as a transaction participant, create a custom data source object and then pass this object to the MicroTx library. In your Java application code, inject a TrmSQLConnection connection object with details of the custom data source, and then update the application code to use the injected object.

To configure a JPA-based Java app as a transaction participant, create a custom data source object and then pass this object to the MicroTx library. In your application code, inject a TrmEntityManager object with details of the custom data source, and then update the application code to use the injected object.