Configure data sources Red Hat build of Quarkus 3.8 Red Hat Customer Content Services

Commands:
quarkus.datasource.db-kind=postgresql 1 quarkus.datasource.username=<your username> quarkus.datasource.password=<your password> quarkus.datasource.jdbc.url=jdbc:postgresql://localhost:5432/hibernate_orm_test quarkus.datasource.jdbc.max-size=16
quarkus.datasource.db-kind=postgresql 1 quarkus.datasource.username=<your username> quarkus.datasource.password=<your password> quarkus.datasource.reactive.url=postgresql:///your_database quarkus.datasource.reactive.max-size=20
quarkus.datasource.db-kind=h2
quarkus.datasource.username=<your username> quarkus.datasource.password=<your password>
./mvnw quarkus:add-extension -Dextensions="jdbc-postgresql"
./mvnw quarkus:add-extension -Dextensions="agroal"
quarkus.datasource.jdbc.url=jdbc:postgresql://localhost:5432/hibernate_orm_test
quarkus.datasource.jdbc.driver=io.opentracing.contrib.jdbc.TracingDriver
quarkus.datasource.db-kind=other quarkus.datasource.jdbc.driver=oracle.jdbc.driver.OracleDriver quarkus.datasource.jdbc.url=jdbc:oracle:thin:@192.168.1.12:1521/ORCL_SVC quarkus.datasource.username=scott quarkus.datasource.password=tiger
@Inject AgroalDataSource defaultDataSource;
quarkus.datasource.reactive.url=postgresql:///your_database quarkus.datasource.reactive.max-size=20
quarkus.datasource.jdbc=false
quarkus.datasource.reactive=false
quarkus.datasource.db-kind=h2 quarkus.datasource.username=username-default quarkus.datasource.jdbc.url=jdbc:h2:mem:default quarkus.datasource.jdbc.max-size=13 quarkus.datasource.users.db-kind=h2 quarkus.datasource.users.username=username1 quarkus.datasource.users.jdbc.url=jdbc:h2:mem:users quarkus.datasource.users.jdbc.max-size=11 quarkus.datasource.inventory.db-kind=h2 quarkus.datasource.inventory.username=username2 quarkus.datasource.inventory.jdbc.url=jdbc:h2:mem:inventory quarkus.datasource.inventory.jdbc.max-size=12
@Inject AgroalDataSource defaultDataSource; @Inject @DataSource("users") AgroalDataSource usersDataSource; @Inject @DataSource("inventory") AgroalDataSource inventoryDataSource;
quarkus.datasource."pg".db-kind=postgres quarkus.datasource."pg".active=false quarkus.datasource."pg".jdbc.url=jdbc:postgresql:///your_database quarkus.datasource."oracle".db-kind=oracle quarkus.datasource."oracle".active=false quarkus.datasource."oracle".jdbc.url=jdbc:oracle:///your_database
%pg.quarkus.hibernate-orm."pg".active=true %pg.quarkus.datasource."pg".active=true Add any pg-related runtime configuration here, prefixed with "%pg." %oracle.quarkus.hibernate-orm."oracle".active=true %oracle.quarkus.datasource."oracle".active=true Add any pg-related runtime configuration here, prefixed with "%pg."
public class MyProducer { @Inject DataSourceSupport dataSourceSupport; @Inject @DataSource("pg") AgroalDataSource pgDataSourceBean; @Inject @DataSource("oracle") AgroalDataSource oracleDataSourceBean; @Produces @ApplicationScoped public AgroalDataSource dataSource() { if (dataSourceSupport.getInactiveNames().contains("pg")) { return oracleDataSourceBean; } else { return pgDataSourceBean; } } }
quarkus.datasource."datasource-name".health-exclude=true
enable tracing quarkus.datasource.jdbc.telemetry=true