public class DataSourceFactory extends Object implements MuleContextAware, Disposable
DataSource
instancesPHASE_NAME
Constructor and Description |
---|
DataSourceFactory(String name) |
Modifier and Type | Method and Description |
---|---|
DataSource |
create(DataSourceConfig dataSourceConfig)
Creates a dataSource from a given dataSource config
|
protected DataSource |
createPooledDataSource(DataSourceConfig dataSourceConfig) |
protected DataSource |
createPooledStandardDataSource(DataSource dataSource,
DbPoolingProfile poolingProfile) |
protected DataSource |
createSingleDataSource(DataSourceConfig resolvedDataSourceConfig) |
DataSource |
decorateDataSource(DataSource dataSource,
DbPoolingProfile poolingProfile,
MuleContext muleContext) |
void |
dispose()
A lifecycle method where implementor should free up any resources.
|
MuleContext |
getMuleContext() |
void |
setMuleContext(MuleContext context) |
public DataSourceFactory(String name)
public void setMuleContext(MuleContext context)
setMuleContext
in interface MuleContextAware
public DataSource create(DataSourceConfig dataSourceConfig) throws SQLException
dataSourceConfig
- describes how to create the dataSourceSQLException
- in case there is a problem creating the dataSourcepublic DataSource decorateDataSource(DataSource dataSource, DbPoolingProfile poolingProfile, MuleContext muleContext)
protected DataSource createSingleDataSource(DataSourceConfig resolvedDataSourceConfig) throws SQLException
SQLException
protected DataSource createPooledDataSource(DataSourceConfig dataSourceConfig) throws SQLException
SQLException
protected DataSource createPooledStandardDataSource(DataSource dataSource, DbPoolingProfile poolingProfile) throws SQLException
SQLException
public void dispose()
Disposable
dispose
in interface Disposable
public MuleContext getMuleContext()
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.