org.axonframework.common.jdbc
Class SpringDataSourceConnectionProvider
java.lang.Object
org.axonframework.common.jdbc.SpringDataSourceConnectionProvider
- All Implemented Interfaces:
- ConnectionProvider
public class SpringDataSourceConnectionProvider
- extends Object
- implements ConnectionProvider
ConnectionProvider implementation that is aware of Transaction Managers and provides the connection attached to an
active transaction manager, instead of asking a Data Source directly.
- Since:
- 2.2
- Author:
- Allard Buijze
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SpringDataSourceConnectionProvider
public SpringDataSourceConnectionProvider(DataSource dataSource)
- Initialize the connection provider, using given
dataSource
to obtain a connection, when required.
- Parameters:
dataSource
- The data source to obtain connections from, when required
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.