-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22810 from tsegismont/oracle_client
Reactive Oracle Client extension
- Loading branch information
Showing
42 changed files
with
1,669 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,202 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-reactive-oracle-client-parent</artifactId> | ||
<version>999-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>quarkus-reactive-oracle-client-deployment</artifactId> | ||
|
||
<name>Quarkus - Reactive Oracle Client - Deployment</name> | ||
|
||
<properties> | ||
<reactive-oracledb.url>vertx-reactive:oracle:thin:@localhost:1521:XE</reactive-oracledb.url> | ||
<!-- See https://hub.docker.com/r/gvenzl/oracle-xe --> | ||
<oracle.image>gvenzl/oracle-xe:21.3.0-slim</oracle.image> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-reactive-datasource-deployment</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-devservices-oracle</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-vertx-deployment</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-credentials-deployment</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-reactive-oracle-client</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-smallrye-health-spi</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-resteasy-deployment</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.rest-assured</groupId> | ||
<artifactId>rest-assured</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-junit5-internal</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-smallrye-health-deployment</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<testResources> | ||
<testResource> | ||
<directory>src/test/resources</directory> | ||
<filtering>true</filtering> | ||
</testResource> | ||
</testResources> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<configuration> | ||
<annotationProcessorPaths> | ||
<path> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-extension-processor</artifactId> | ||
<version>${project.version}</version> | ||
</path> | ||
</annotationProcessorPaths> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<configuration> | ||
<skip>true</skip> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
<profiles> | ||
<profile> | ||
<id>test-oracle</id> | ||
<activation> | ||
<property> | ||
<name>test-containers</name> | ||
</property> | ||
</activation> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<configuration> | ||
<skip>false</skip> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</profile> | ||
<profile> | ||
<id>docker-oracle</id> | ||
<activation> | ||
<property> | ||
<name>start-containers</name> | ||
</property> | ||
</activation> | ||
<properties> | ||
<reactive-oracledb.url>vertx-reactive:oracle:thin:@localhost:1521:XE</reactive-oracledb.url> | ||
</properties> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>io.fabric8</groupId> | ||
<artifactId>docker-maven-plugin</artifactId> | ||
<configuration> | ||
<images> | ||
<image> | ||
<name>${oracle.image}</name> | ||
<run> | ||
<ports> | ||
<port>1521:1521</port> | ||
</ports> | ||
<env> | ||
<ORACLE_PASSWORD>hibernate_orm_test</ORACLE_PASSWORD> | ||
</env> | ||
<log> | ||
<prefix>Oracle Database: </prefix> | ||
<date>default</date> | ||
<color>red</color> | ||
</log> | ||
<wait> | ||
<!-- good docs found at: http://dmp.fabric8.io/#build-healthcheck --> | ||
<!-- Unfortunately booting this is slow, needs to set a generous timeout: --> | ||
<time>60000</time> | ||
<log>DATABASE IS READY TO USE!</log> | ||
</wait> | ||
</run> | ||
</image> | ||
</images> | ||
<!--Stops all Oracle DB images currently running, not just those we just started. | ||
Useful to stop processes still running from a previously failed integration test run --> | ||
<allContainers>true</allContainers> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>docker-start</id> | ||
<phase>compile</phase> | ||
<goals> | ||
<goal>stop</goal> | ||
<goal>start</goal> | ||
</goals> | ||
</execution> | ||
<execution> | ||
<id>docker-stop</id> | ||
<phase>post-integration-test</phase> | ||
<goals> | ||
<goal>stop</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>exec-maven-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>docker-prune</id> | ||
<phase>generate-resources</phase> | ||
<goals> | ||
<goal>exec</goal> | ||
</goals> | ||
<configuration> | ||
<executable>${docker-prune.location}</executable> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</profile> | ||
</profiles> | ||
|
||
</project> |
31 changes: 31 additions & 0 deletions
31
...yment/src/main/java/io/quarkus/reactive/oracle/client/deployment/OraclePoolBuildItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package io.quarkus.reactive.oracle.client.deployment; | ||
|
||
import io.quarkus.builder.item.MultiBuildItem; | ||
import io.quarkus.datasource.common.runtime.DataSourceUtil; | ||
import io.quarkus.runtime.RuntimeValue; | ||
import io.vertx.oracleclient.OraclePool; | ||
|
||
public final class OraclePoolBuildItem extends MultiBuildItem { | ||
|
||
private final String dataSourceName; | ||
|
||
private final RuntimeValue<OraclePool> oraclePool; | ||
|
||
public OraclePoolBuildItem(String dataSourceName, RuntimeValue<OraclePool> oraclePool) { | ||
this.dataSourceName = dataSourceName; | ||
this.oraclePool = oraclePool; | ||
} | ||
|
||
public String getDataSourceName() { | ||
return dataSourceName; | ||
} | ||
|
||
public RuntimeValue<OraclePool> getOraclePool() { | ||
return oraclePool; | ||
} | ||
|
||
public boolean isDefault() { | ||
return DataSourceUtil.isDefault(dataSourceName); | ||
} | ||
|
||
} |
Oops, something went wrong.