All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.wildfly.extras.creaper.commands.datasources.AddOracleDataSource Maven / Gradle / Ivy

There is a newer version: 2.0.3
Show newest version
package org.wildfly.extras.creaper.commands.datasources;

import org.wildfly.extras.creaper.core.ManagementVersion;

import static org.wildfly.extras.creaper.commands.datasources.DatasourceConstants.DEFAULT_BACKGROUND_VALIDATION_TIME;
import static org.wildfly.extras.creaper.commands.datasources.DatasourceConstants.ORACLE_EXCEPTION_SORTER;
import static org.wildfly.extras.creaper.commands.datasources.DatasourceConstants.ORACLE_STALE_CONNECTION_CHECKER;
import static org.wildfly.extras.creaper.commands.datasources.DatasourceConstants.ORACLE_VALID_CONNECTION_CHECKER;

/**
 * Creates an Oracle datasource.
 *
 * 

Connection URL format: {@code jdbc:oracle:thin:@localhost:1521:XE}

* *

Applies defaults from * * Example Oracle Datasource.

*/ public final class AddOracleDataSource extends AddDataSource { AddOracleDataSource(Builder builder) { super(builder); } @Override protected void modifyIfNeeded(ManagementVersion serverVersion) { if (backgroundValidation == null) backgroundValidation = true; if (backgroundValidationMillis == null) backgroundValidationMillis = DEFAULT_BACKGROUND_VALIDATION_TIME; if (validConnectionCheckerClass == null) validConnectionCheckerClass = ORACLE_VALID_CONNECTION_CHECKER; if (exceptionSorterClass == null) exceptionSorterClass = ORACLE_EXCEPTION_SORTER; if (staleConnectionCheckerClass == null) staleConnectionCheckerClass = ORACLE_STALE_CONNECTION_CHECKER; } public static final class Builder extends AddDataSource.Builder { public Builder(String name) { super(name); } public AddOracleDataSource build() { check(); return new AddOracleDataSource(this); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy