Proof of concept for Helidon Microprofile support for JPA and Oracle Universal Connection Pool (UCP) with OracleDB
Prepare your Oracle database with a suitable table and record, using this sql statements:
CREATE TABLE GREETING (
SALUTATION VARCHAR(64),
RESPONSE VARCHAR(64),
constraint pk_salutation primary key(salutation)
);
INSERT INTO GREETING (SALUTATION, RESPONSE) VALUES ('Marco', 'Polo');
Clone the project on your workstation:
git clone https://github.com/doschkinow/helidon-jpa-ucp.git
In the project directory edit src/main/resources/application.yaml to replace the URL and password properties with the values for your Oracle database.
Build the project (with jdk-11 and maven-3.6.3):
cd helidon-jpa-ucp
mvn package
Run the application:
java -jar target/helidon-jpa-ucp.jar
In another terminal or in a browser visit http://localhost:8080/example/response/Marco
curl http://localhost:8080/example/response/Marco
The response should be "Polo". Observe the console log in the terminal where the application is running.
This project is an adaptation of https://medium.com/helidon/helidon-and-jpa-da20492f5395 where the Hikari connection pool and the H2 database were exchanged with Oracle UCP and Oracle database