public class JDBCConnectionFactory extends Object implements ConnectionFactory
Constructor and Description |
---|
JDBCConnectionFactory()
This constructor is called when this connection factory is specified
as the type in a ConnectionFactory configuration element.
|
JDBCConnectionFactory(JDBCConnectionConfiguration config)
This constructor is called when there is a JDBCConnectionConfiguration
specified in the configuration.
|
Modifier and Type | Method and Description |
---|---|
void |
addConfigurationProperties(Properties properties)
Adds properties for this instance from any properties configured in the
ConnectionFactory.
|
Connection |
getConnection()
Should return a connection to the database in use for this context.
|
public JDBCConnectionFactory(JDBCConnectionConfiguration config)
config
- the configurationpublic JDBCConnectionFactory()
public Connection getConnection() throws SQLException
ConnectionFactory
getConnection
in interface ConnectionFactory
SQLException
- if there is some error obtaining the connectionpublic void addConfigurationProperties(Properties properties)
ConnectionFactory
This method will be called before any of the get methods.
addConfigurationProperties
in interface ConnectionFactory
properties
- All properties from the configurationCopyright © 2006–2023 MyBatis.org. All rights reserved.