org.axonframework.common.jdbc
Class DataSourceConnectionProvider
java.lang.Object
org.axonframework.common.jdbc.DataSourceConnectionProvider
- All Implemented Interfaces:
- ConnectionProvider
public class DataSourceConnectionProvider
- extends Object
- implements ConnectionProvider
ConnectionProvider implementation that obtains a connection from a given DataSource.
- Since:
- 2.2
- Author:
- Allard Buijze
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DataSourceConnectionProvider
public DataSourceConnectionProvider(DataSource dataSource)
- Initialize the Connection Provider, using given
dataSource
to obtain new connections.
- Parameters:
dataSource
- The DataSource to obtain connections from
getConnection
public Connection getConnection()
throws SQLException
- Description copied from interface:
ConnectionProvider
- Returns a connection, ready for use.
- Specified by:
getConnection
in interface ConnectionProvider
- Returns:
- a new connection to use
- Throws:
SQLException
- when an error occurs obtaining the connection
Copyright © 2010-2016. All Rights Reserved.