org.axonframework.common.jdbc
Class DataSourceConnectionProvider

java.lang.Object
  extended by 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

Constructor Summary
DataSourceConnectionProvider(DataSource dataSource)
          Initialize the Connection Provider, using given dataSource to obtain new connections.
 
Method Summary
 Connection getConnection()
          Returns a connection, ready for use.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataSourceConnectionProvider

public DataSourceConnectionProvider(DataSource dataSource)
Initialize the Connection Provider, using given dataSource to obtain new connections.

Parameters:
dataSource - The DataSource to obtain connections from
Method Detail

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.