public class GenericConnectionProvider extends Object implements org.mule.runtime.api.connection.ConnectionProvider<DbConnection>, org.mule.runtime.api.lifecycle.Initialisable, org.mule.runtime.api.lifecycle.Disposable
ConnectionProvider that creates connections for any kind of database using a JDBC URL and the required JDBC Driver
Class. Consumers of GenericConnectionProvider must create a class similar to this one with the appropriate annotations
(DisplayName, Alias, ExternalLib, ParameterGroup, others), and have an instance of this one to pass the required properties.| Constructor and Description |
|---|
GenericConnectionProvider(String configName,
org.mule.runtime.api.artifact.Registry registry,
DbPoolingProfile poolingProfile,
List<? extends ColumnType> columnTypes,
DataSourceConfig connectionParameters) |
| Modifier and Type | Method and Description |
|---|---|
DbConnection |
connect() |
void |
disconnect(DbConnection dbConnection) |
void |
dispose() |
DataSource |
getConfiguredDataSource() |
void |
initialise() |
org.mule.runtime.api.connection.ConnectionValidationResult |
validate(DbConnection dbConnection) |
public GenericConnectionProvider(String configName, org.mule.runtime.api.artifact.Registry registry, DbPoolingProfile poolingProfile, List<? extends ColumnType> columnTypes, DataSourceConfig connectionParameters)
public void initialise()
throws org.mule.runtime.api.lifecycle.InitialisationException
initialise in interface org.mule.runtime.api.lifecycle.Initialisableorg.mule.runtime.api.lifecycle.InitialisationExceptionpublic void dispose()
dispose in interface org.mule.runtime.api.lifecycle.Disposablepublic DbConnection connect() throws org.mule.runtime.api.connection.ConnectionException
connect in interface org.mule.runtime.api.connection.ConnectionProvider<DbConnection>org.mule.runtime.api.connection.ConnectionExceptionpublic void disconnect(DbConnection dbConnection)
disconnect in interface org.mule.runtime.api.connection.ConnectionProvider<DbConnection>public org.mule.runtime.api.connection.ConnectionValidationResult validate(DbConnection dbConnection)
validate in interface org.mule.runtime.api.connection.ConnectionProvider<DbConnection>public DataSource getConfiguredDataSource()
Copyright © 2021. All rights reserved.