From ff8970985db214251a98dce8ac8c04e4f98304db Mon Sep 17 00:00:00 2001 From: Paul Parkinson Date: Mon, 30 Sep 2024 02:17:24 -0400 Subject: [PATCH] 442 for MLH hackathon p2 (#113) * init for graalvm workshops * init for graalvm workshops * init for graalvm workshops --- .../helidon/helidon.md | 86 +++++++++++++++++++ .../springboot/springboot.md | 74 ++++++++++++++++ 2 files changed, 160 insertions(+) create mode 100644 microservices-with-converged-db/helidon/helidon.md create mode 100644 microservices-with-converged-db/springboot/springboot.md diff --git a/microservices-with-converged-db/helidon/helidon.md b/microservices-with-converged-db/helidon/helidon.md new file mode 100644 index 0000000..9dca4d3 --- /dev/null +++ b/microservices-with-converged-db/helidon/helidon.md @@ -0,0 +1,86 @@ +# Develop with Oracle Database 23ai and GraalVM using Helidon + +## Introduction + +This lab walks you through the steps to develop with Oracle Database 23ai and GraalVM using Helidon. + +Estimated Time: 30 minutes + +### Objectives + +In this lab, you will: +- Develop with Oracle Database 23ai and GraalVM using Helidon + + +### Prerequisites + +This lab assumes you have: +- Provisioned environment with Git and Maven (Cloud Shell). + + +## Task 1: Clone the repos + +1. Clone the following repos: + + ``` + + git clone + + ``` + + + +## Task 2: Build and run + +1. To ensure that the sample application is configured to talk to the + Oracle ATP database running in OCI, verify that the + following lines (among others) are set to correct values in + `src/main/resources/META-INF/microprofile-config.properties`: + + ```properties + javax.sql.DataSource.example.connectionFactoryClassName=oracle.jdbc.pool.OracleDataSource + javax.sql.DataSource.example.URL=jdbc:oracle:thin:@?TNS_ADMIN=/path/to/wallet + javax.sql.DataSource.example.user= + javax.sql.DataSource.example.password= + ``` + + +2. Build and run + + ``` + + mvn package ; java -jar target/com-oracle-helidon-datasource.jar + + ``` + + ``` + + curl http://localhost:8080/tables + + ``` + + +3. Build and run native image + + ``` + + mvn -Pnative-image install -DskipTests + + ``` + + ``` + + ./com-oracle-helidon-datasource + + ``` + + ``` + + curl http://localhost:8080/tables + + ``` + + +## Acknowledgements +* **Author** - Paul Parkinson, Architect and Developer Advocate; Arjav Desai, Helidon Developer +* **Last Updated By/Date** - Paul Parkinson, 2024 diff --git a/microservices-with-converged-db/springboot/springboot.md b/microservices-with-converged-db/springboot/springboot.md new file mode 100644 index 0000000..aed16a9 --- /dev/null +++ b/microservices-with-converged-db/springboot/springboot.md @@ -0,0 +1,74 @@ +# Develop with Oracle Database 23ai and GraalVM using Micronaut + +## Introduction + +This lab walks you through the steps to develop with Oracle Database 23ai and GraalVM using Spring Boot +Estimated Time: 30 minutes + +### Objectives + +In this lab, you will: +- Develop with Oracle Database 23ai and GraalVM using Spring Boot + +### Prerequisites + +This lab assumes you have: +- Provisioned environment with Git and Maven (Cloud Shell). + + +## Task 1: Clone the repos + +1. Clone the following repos: + + ``` + + git clone https://github.com/juarezjuniorgithub/jdbc-driver-graalvm-nativeimage.git + + ``` + + + +## Task 2: Build and run + +1. To ensure that the sample application is configured to talk to the + Oracle ATP database running in OCI, verify that the + following lines (among others) are set to correct values in + `src/main/resources/META-INF/microprofile-config.properties`: + + ```properties + javax.sql.DataSource.example.connectionFactoryClassName=oracle.jdbc.pool.OracleDataSource + javax.sql.DataSource.example.URL=jdbc:oracle:thin:@?TNS_ADMIN=/path/to/wallet + javax.sql.DataSource.example.user= + javax.sql.DataSource.example.password= + ``` + + +2. Build and run + + ``` + + mvn clean package exec:java -Dexec.mainClass="com.oracle.jdbc.graalvm.App" + + ``` + + +3. Build and run native image + + ``` + + mvn -Pnative packagemvn -Pnative package + + ``` + + + ``` + + target/jdbc-driver-graalvm-nativeimage + + ``` + + + +## Acknowledgements +* **Author** - Paul Parkinson, Architect and Developer Advocate; Juarez Barbosa, Sr. Principal Java Developer Evangelist, Java Database Access +* **Last Updated By/Date** - Paul Parkinson, 2024