Class JDBCConfiguration
- java.lang.Object
-
- org.apache.synapse.message.store.impl.jdbc.util.JDBCConfiguration
-
public class JDBCConfiguration extends Object
ClassJDBCUtil
provides the Utility functions to create JDBC resources
-
-
Constructor Summary
Constructors Constructor Description JDBCConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
buildDataSource(Map<String,Object> parameters)
Creating datasource at startup using configured parametersprotected DataSource
createCustomDataSource()
Create a custom DataSource using the specified data source information.Connection
getConnection()
Get a Connection from current datasourceDataSource
getDataSource()
Get datasourceString
getDSName()
Return the name or (hopefully) unique connection URL specific to the DataSource being used This is used for logging purposes onlyString
getTableName()
Table name in usevoid
setDataSourceInformation(org.apache.synapse.commons.datasource.DataSourceInformation dataSourceInformation)
Set DataSourceInformationvoid
setDataSourceName(String dataSourceName)
Get datasource name currently in usevoid
setJndiProperties(Properties jndiProperties)
Set JNDI Properties
-
-
-
Method Detail
-
buildDataSource
public void buildDataSource(Map<String,Object> parameters)
Creating datasource at startup using configured parameters- Parameters:
parameters
- - parameters given in configuration
-
createCustomDataSource
protected DataSource createCustomDataSource()
Create a custom DataSource using the specified data source information.- Returns:
- a DataSource created using specified properties
-
getConnection
public Connection getConnection() throws SQLException
Get a Connection from current datasource- Returns:
- - Connection
- Throws:
SQLException
- - Failure in creating datasource connection
-
getDSName
public String getDSName()
Return the name or (hopefully) unique connection URL specific to the DataSource being used This is used for logging purposes only- Returns:
- a unique name or URL to refer to the DataSource being used
-
setDataSourceInformation
public void setDataSourceInformation(org.apache.synapse.commons.datasource.DataSourceInformation dataSourceInformation)
Set DataSourceInformation- Parameters:
dataSourceInformation
- - information to set
-
setJndiProperties
public void setJndiProperties(Properties jndiProperties)
Set JNDI Properties- Parameters:
jndiProperties
- - properties to set
-
getDataSource
public DataSource getDataSource()
Get datasource- Returns:
- - Datasource currently in use
-
setDataSourceName
public void setDataSourceName(String dataSourceName)
Get datasource name currently in use- Parameters:
dataSourceName
- - Datasource name
-
getTableName
public String getTableName()
Table name in use- Returns:
- - Name of the table
-
-