Class UCPServiceConfigurationACCSProvider
- java.lang.Object
-
- io.helidon.service.configuration.api.ServiceConfigurationProvider
-
- io.helidon.service.configuration.ucp.UCPServiceConfigurationProvider
-
- io.helidon.service.configuration.ucp.accs.UCPServiceConfigurationACCSProvider
-
@Deprecated public class UCPServiceConfigurationACCSProvider extends UCPServiceConfigurationProvider
Deprecated.This class is slated for removal.AUCPServiceConfigurationProvider
that providesUCPServiceConfiguration
instances when running on the Oracle Application Container Cloud Service system.
-
-
Constructor Summary
Constructors Constructor Description UCPServiceConfigurationACCSProvider()
Deprecated.Creates a newUCPServiceConfigurationACCSProvider
.
-
Method Summary
-
Methods inherited from class io.helidon.service.configuration.ucp.UCPServiceConfigurationProvider
buildFor, create, getDataSourceProperty, getPrefix
-
Methods inherited from class io.helidon.service.configuration.api.ServiceConfigurationProvider
getAuthoritativeSystem, getServiceIdentifier
-
-
-
-
Constructor Detail
-
UCPServiceConfigurationACCSProvider
public UCPServiceConfigurationACCSProvider()
Deprecated.Creates a newUCPServiceConfigurationACCSProvider
.
-
-
Method Detail
-
appliesTo
protected boolean appliesTo(Properties properties, System system, Properties coordinates)
Deprecated.Overrides theUCPServiceConfigurationProvider.appliesTo(Properties, io.helidon.service.configuration.api.System, Properties)
method to returntrue
if the suppliedSystem
is enabled and has a name equal toaccs
, and if its environment contains at least one key starting with eitherMYSQLCS_
orDBAAS_
, and if theUCPServiceConfigurationProvider.appliesTo(Properties, io.helidon.service.configuration.api.System, Properties)
method also returnstrue
.- Overrides:
appliesTo
in classUCPServiceConfigurationProvider
- Parameters:
properties
- aProperties
instance that will be used as the basis of theUCPServiceConfiguration
implementation that will be returned by theUCPServiceConfigurationProvider.create(Properties, io.helidon.service.configuration.api.System, Properties)
method; must not benull
system
- aSystem
determined to be in effect; may, strictly speaking, benull
but ordinarily is non-null
and enabledcoordinates
- aProperties
instance representing the meta-properties in effect; may benull
- Returns:
true
if thisUCPServiceConfigurationACCSProvider
applies to the configuration space implied by the supplied parameters;false
otherwise- Throws:
NullPointerException
- ifproperties
isnull
-
installDataSourceProperties
protected void installDataSourceProperties(Properties target, System system, Properties coordinates, String dataSourceName)
Deprecated.Overrides theUCPServiceConfigurationProvider.installDataSourceProperties(Properties, io.helidon.service.configuration.api.System, Properties, String)
to install data source-related properties discovered in the Oracle Application Container Cloud Service environment.While reading the documentation for this method, note that the Oracle Application Container Cloud Service sets up automatic service bindings for only Oracle or MySQL databases.
This method:
- Calls the
UCPServiceConfigurationProvider.installDataSourceProperties(Properties, io.helidon.service.configuration.api.System, Properties, String)
method. - Checks to see if a property named
javax.sql.DataSource.
dataSourceName
.explicitlyConfigured
has aString
value equal to anything other thantrue
, includingnull
. - If so, and only if
dataSourceName
isnull
, then it sets certain properties ontarget
. - Specifically, if there is a MySQL service binding and not
an Oracle database service binding, the following properties
will be set:
javax.sql.DataSource.dataSourceClassName = com.mysql.cj.jdbc.MysqlDataSource
javax.sql.DataSource.dataSource.url = jdbc:mysql://${MYSQLCS_CONNECT_STRING}
javax.sql.DataSource.dataSource.description = Autodiscovered
javax.sql.DataSource.dataSource.user = ${MYSQLCS_USER_NAME}
javax.sql.DataSource.dataSource.password = ${MYSQLCS_PASSWORD}
- If instead there is an Oracle database service binding, but
not also a MySQL service binding, the following properties will
be set:
javax.sql.DataSource.dataSourceClassName = oracle.jdbc.pool.OracleDataSource
javax.sql.DataSource.dataSource.url = jdbc:oracle:thin:@//${DBAAS_DEFAULT_CONNECT_DESCRIPTOR}
javax.sql.DataSource.dataSource.description = Autodiscovered
javax.sql.DataSource.dataSource.user = ${DBAAS_USER}
javax.sql.DataSource.dataSource.password = ${DBAAS_PASSWORD}
- Overrides:
installDataSourceProperties
in classUCPServiceConfigurationProvider
- Parameters:
target
- aProperties
instance that will be used as the basis of theUCPServiceConfiguration
implementation that will be returned by theUCPServiceConfigurationProvider.create(Properties, io.helidon.service.configuration.api.System, Properties)
method and into which properties may be installed; must not benull
system
- aSystem
determined to be in effect; may, strictly speaking, benull
but ordinarily is non-null
and enabledcoordinates
- aProperties
instance representing the meta-properties in effect; may benull
dataSourceName
- the data source name in question; may benull
- Throws:
NullPointerException
- iftarget
isnull
- See Also:
UCPServiceConfigurationProvider.installDataSourceProperties(Properties, io.helidon.service.configuration.api.System, Properties, String)
- Calls the
-
getDataSourceClassName
protected String getDataSourceClassName(String jdbcUrl)
Deprecated.Returns the name of a Java class that implements theDataSource
interface that is appropriate for the supplied JDBC URL.This method may return
null
.Overrides of this method may return
null
.Overrides of this method must return the same value for the same input.
This implementation returns
com.mysql.cj.jdbc.MysqlDataSource
if the suppliedjdbcUrl
starts withjdbc:mysql:
, and returnsoracle.jdbc.pool.OracleDataSource
if the suppliedjdbcUrl
starts withjdbc:oracle:
, andnull
in all other cases.- Parameters:
jdbcUrl
- a JDBC URL inString
form; must not benull
- Returns:
- a
DataSource
implementation class name, ornull
- Throws:
NullPointerException
- ifjdbcUrl
isnull
-
-