Skip to content

Commit

Permalink
4.x: forward port of serial-config fix (helidon-io#8814)
Browse files Browse the repository at this point in the history
* Update serial config for ojdbc driver (helidon-io#7116)
* fix serial config for oracle driver for jep-290
* fix dep name
* remove ucp from dep since hikari is used
* Use io.helidon.integrations.db ojdbc integration
---------

Co-authored-by: Arjav Desai <arjav.desai@oracle.com>
  • Loading branch information
barchetta and arjav-desai authored May 31, 2024
1 parent a0f26be commit ef6649f
Show file tree
Hide file tree
Showing 12 changed files with 53 additions and 57 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -330,12 +330,6 @@ docker run --rm --name mysql -p 3306:3306 \
<output if="${db.server} == 'oracledb'">
<file source="../database/files/src/main/resources/META-INF/init_script.sql.oracle"
target="src/main/resources/META-INF/init_script.sql"/>
<templates engine="mustache" transformations="mustache,packaged">
<directory>../database/files</directory>
<includes>
<include>src/*/resources/**/serial-config.properties</include>
</includes>
</templates>
<model>
<value key="helidon-test">false</value>
<value key="readme-description">Helidon MP application that uses the dbclient API with OracleDB database.</value>
Expand Down Expand Up @@ -363,11 +357,15 @@ For details on an Oracle Docker image, see https://github.com/oracle/docker-imag
</map>
</list>
<list key="dependencies">
<map>
<value key="groupId">io.helidon.integrations.db</value>
<value key="artifactId">ojdbc</value>
<value key="scope">runtime</value>
</map>
<map>
<value key="groupId">com.oracle.database.jdbc</value>
<value key="artifactId">ojdbc8-production</value>
<value key="artifactId">ucp</value>
<value key="scope">runtime</value>
<value key="type">pom</value>
</map>
</list>
<value key="jdbcDataSource">oracle.jdbc.pool.OracleDataSource</value>
Expand Down

This file was deleted.

17 changes: 5 additions & 12 deletions docs/src/main/asciidoc/mp/persistence.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ managed]
[source,xml]
----
<dependency>
<groupId>com.h2database</groupId>
<groupId>io.helidon.integrations.db</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope> <!--1-->
</dependency>
Expand Down Expand Up @@ -240,19 +240,12 @@ managed]
[source,xml]
----
<dependency>
<groupId>com.oracle.database.jdbc</groupId> <!--1-->
<artifactId>ojdbc11</artifactId> <!--2-->
<scope>runtime</scope> <!--3-->
<groupId>io.helidon.integrations.db</groupId>
<artifactId>ojdbc</artifactId>
<scope>runtime</scope> <!--1-->
</dependency>
----
<1> See
https://www.oracle.com/database/technologies/maven-central-guide.html[Developer's
Guide For Oracle JDBC 21c on Maven Central] for more details.
<2> The `ojdbc11` artifact
https://www.oracle.com/database/technologies/maven-central-guide.html#:~:text=ojdbc11.jar,JDK14%20and%20JDK15[implements
relevant parts of the JDBC 4.3 specification], which forms part of
Java 21, which is the Java version targeted by Helidon 4.
<3> The `scope` is `runtime`, indicating that the Oracle
<1> The `scope` is `runtime`, indicating that the Oracle
JDBC driver classes will be available on the runtime classpath.
=== Configuration [[DS-Configuration]]
Expand Down
7 changes: 5 additions & 2 deletions examples/employee-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,13 @@
</properties>

<dependencies>
<dependency>
<groupId>io.helidon.integrations.db</groupId>
<artifactId>ojdbc</artifactId>
</dependency>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc11-production</artifactId>
<type>pom</type>
<artifactId>ucp</artifactId>
</dependency>
<dependency>
<groupId>io.helidon.webserver</groupId>
Expand Down
5 changes: 2 additions & 3 deletions examples/integrations/cdi/datasource-hikaricp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,8 @@

<!-- Runtime-scoped dependencies. -->
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc11-production</artifactId>
<type>pom</type>
<groupId>io.helidon.integrations.db</groupId>
<artifactId>ojdbc</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
Expand Down
16 changes: 12 additions & 4 deletions examples/integrations/micronaut/data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,14 @@ curl -i http://localhost:8080/pets/s

- Update ./pom.xml to replace dependency on com.h2database with following
```
<dependency>
<groupId>io.helidon.integrations.db</groupId>
<artifactId>ojdbc</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc8-production</artifactId>
<type>pom</type>
<artifactId>ucp</artifactId>
<scope>runtime</scope>
</dependency>
```
Expand Down Expand Up @@ -102,10 +106,14 @@ curl -i http://localhost:8080/pets/s

- Update ./pom.xml to replace dependency on com.h2database with following
```
<dependency>
<groupId>io.helidon.integrations.db</groupId>
<artifactId>ojdbc</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc8-production</artifactId>
<type>pom</type>
<artifactId>ucp</artifactId>
<scope>runtime</scope>
</dependency>
```
Expand Down
7 changes: 5 additions & 2 deletions examples/integrations/oci/atp-cdi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,13 @@
<groupId>io.helidon.integrations.cdi</groupId>
<artifactId>helidon-integrations-cdi-datasource-ucp</artifactId>
</dependency>
<dependency>
<groupId>io.helidon.integrations.db</groupId>
<artifactId>ojdbc</artifactId>
</dependency>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc11-production</artifactId>
<type>pom</type>
<artifactId>ucp</artifactId>
</dependency>
<dependency>
<groupId>io.helidon.integrations.oci.sdk</groupId>
Expand Down

This file was deleted.

7 changes: 5 additions & 2 deletions examples/integrations/oci/atp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,13 @@
<groupId>io.helidon.dbclient</groupId>
<artifactId>helidon-dbclient-jdbc</artifactId>
</dependency>
<dependency>
<groupId>io.helidon.integrations.db</groupId>
<artifactId>ojdbc</artifactId>
</dependency>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc11-production</artifactId>
<type>pom</type>
<artifactId>ucp</artifactId>
</dependency>
<dependency>
<groupId>io.helidon.config</groupId>
Expand Down
8 changes: 6 additions & 2 deletions integrations/cdi/datasource-ucp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,14 @@
<artifactId>helidon-integrations-cdi-datasource</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.helidon.integrations.db</groupId>
<artifactId>ojdbc</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc11-production</artifactId>
<type>pom</type>
<artifactId>ucp</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2021 Oracle and/or its affiliates.
# Copyright (c) 2021, 2024 Oracle and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -14,4 +14,4 @@
# limitations under the License.
#

pattern=oracle.sql.converter.*
pattern=oracle.i18n.util.builder.*;oracle.sql.converter.*;oracle.i18n.text.*;oracle.i18n.text.converter.*
7 changes: 5 additions & 2 deletions messaging/connectors/aq/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,13 @@
<groupId>com.oracle.database.messaging</groupId>
<artifactId>aqapi</artifactId>
</dependency>
<dependency>
<groupId>io.helidon.integrations.db</groupId>
<artifactId>ojdbc</artifactId>
</dependency>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc11-production</artifactId>
<type>pom</type>
<artifactId>ucp</artifactId>
</dependency>
<dependency>
<groupId>jakarta.transaction</groupId>
Expand Down

0 comments on commit ef6649f

Please sign in to comment.