From ab303ef926d935368a65a1c264f27bbfbfbf8288 Mon Sep 17 00:00:00 2001 From: paulparkinson Date: Wed, 2 Oct 2024 16:26:28 -0400 Subject: [PATCH] init for graalvm workshops --- .../helidon/native-image/weld-proxies.json | 13 ++++++++++ .../META-INF/microprofile-config.properties | 6 +++-- .../native-image.properties | 1 + .../src/main/resources/application.properties | 24 ++++++++++--------- 4 files changed, 31 insertions(+), 13 deletions(-) diff --git a/graalvm-nativeimage/helidon/src/main/resources/META-INF/helidon/native-image/weld-proxies.json b/graalvm-nativeimage/helidon/src/main/resources/META-INF/helidon/native-image/weld-proxies.json index 40981eb..6e6a588 100644 --- a/graalvm-nativeimage/helidon/src/main/resources/META-INF/helidon/native-image/weld-proxies.json +++ b/graalvm-nativeimage/helidon/src/main/resources/META-INF/helidon/native-image/weld-proxies.json @@ -1,6 +1,19 @@ [ { "bean-class": "io.helidon.integrations.datasource.ucp.cdi.UCPBackedDataSourceExtension", + "ifaces": [ + "java.io.Serializable", + "java.sql.Wrapper", + "javax.naming.Referenceable", + "javax.naming.spi.ObjectFactory", + "javax.sql.CommonDataSource", + "javax.sql.DataSource", + "oracle.ucp.jdbc.PoolDataSource", + "oracle.ucp.UniversalConnectionPoolAdapter" + ] + }, + { + "bean-class": "io.helidon.integrations.datasource.ucp.cdi.UniversalConnectionPoolExtension", "ifaces": [ "java.io.Serializable", "java.sql.Wrapper", diff --git a/graalvm-nativeimage/helidon/src/main/resources/META-INF/microprofile-config.properties b/graalvm-nativeimage/helidon/src/main/resources/META-INF/microprofile-config.properties index 5eb90d4..d712cb7 100644 --- a/graalvm-nativeimage/helidon/src/main/resources/META-INF/microprofile-config.properties +++ b/graalvm-nativeimage/helidon/src/main/resources/META-INF/microprofile-config.properties @@ -4,6 +4,8 @@ server.host=0.0.0.0 # DataSource properties javax.sql.DataSource.example.connectionFactoryClassName=oracle.jdbc.pool.OracleDataSource -javax.sql.DataSource.example.URL=jdbc:oracle:thin:@livelabs_high?TNS_ADMIN=/Users/youruser/Wallet_yourwalletdir +#javax.sql.DataSource.example.URL=jdbc:oracle:thin:@_high?TNS_ADMIN=/home// +javax.sql.DataSource.example.URL=jdbc:oracle:thin:@ATP110345_high?TNS_ADMIN=/home/LL110345_U/myatpwallet javax.sql.DataSource.example.user=ADMIN -javax.sql.DataSource.example.password=Welcome12345 +javax.sql.DataSource.example.password=##03pRivvzR2q4jv +#javax.sql.DataSource.example.password= diff --git a/graalvm-nativeimage/helidon/src/main/resources/META-INF/native-image/com.oracle.helidon.datasource/com-oracle-helidon-datasource/native-image.properties b/graalvm-nativeimage/helidon/src/main/resources/META-INF/native-image/com.oracle.helidon.datasource/com-oracle-helidon-datasource/native-image.properties index 54e2ed8..a7e3144 100644 --- a/graalvm-nativeimage/helidon/src/main/resources/META-INF/native-image/com.oracle.helidon.datasource/com-oracle-helidon-datasource/native-image.properties +++ b/graalvm-nativeimage/helidon/src/main/resources/META-INF/native-image/com.oracle.helidon.datasource/com-oracle-helidon-datasource/native-image.properties @@ -1,3 +1,4 @@ Args=-H:+RemoveSaturatedTypeFlows --initialize-at-build-time=com.oracle.helidon.datasource \ + --initialize-at-build-time=io.helidon.integrations.datasource.ucp.cdi.UniversalConnectionPool$_$$_WeldClientProxy \ --initialize-at-run-time=oracle.jdbc.driver.NTFListener \ --initialize-at-run-time=oracle.ucp.common.Service \ No newline at end of file diff --git a/graalvm-nativeimage/micronaut/src/main/resources/application.properties b/graalvm-nativeimage/micronaut/src/main/resources/application.properties index 4719fad..a41aa13 100644 --- a/graalvm-nativeimage/micronaut/src/main/resources/application.properties +++ b/graalvm-nativeimage/micronaut/src/main/resources/application.properties @@ -5,20 +5,22 @@ flyway.datasources.default.baseline-on-migrate=true flyway.datasources.default.baseline-version=1.0.0 datasources.default.dialect=ORACLE -datasources.default.ocid= -datasources.default.username= -datasources.default.password= -datasources.default.walletPassword= +#datasources.default.ocid= +datasources.default.username=ADMIN +datasources.default.password= +#datasources.default.password= +datasources.default.walletPassword=Welcome12345 +#datasources.default.walletPassword= # use these properties if running from OCI Console with Cloud Shell (https://rb.gy/64ebxw) # technical reference at https://micronaut-projects.github.io/micronaut-oracle-cloud/snapshot/guide/ -oci.fingerprint= -# example private key file path + file extension pattern -# oci.private-key-file=file:/home/juarez/pk.pem -oci.private-key-file=file: -oci.region= -oci.tenant-id= -oci.user-id= +#oci.fingerprint= +## example private key file path + file extension pattern +## oci.private-key-file=file:/home/juarez/pk.pem +#oci.private-key-file=file: +#oci.region= +#oci.tenant-id= +#oci.user-id= # uncomment the property below if not using oci console with cloud shell # oci.config.profile=DEFAULT