
jodd.db.connection.ConnectionProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jodd-db Show documentation
Show all versions of jodd-db Show documentation
Jodd DB is efficient and thin database facade; DbOom is convenient database object mapper.
// Copyright (c) 2003-2012, Jodd Team (jodd.org). All Rights Reserved.
package jodd.db.connection;
import java.sql.Connection;
/**
* A generic strategy for obtaining JDBC connections.
*
* Implementors might also implement connection pooling.
*
* Implementations should provide a public default constructor.
*/
public interface ConnectionProvider {
/**
* Initialize the connection provider. Properties are provided either
* with constructor either with bean setters.
*/
void init();
/**
* Get a connection.
*/
Connection getConnection();
/**
* Dispose of a used connection.
*/
void closeConnection(Connection connection);
/**
* Closes a provider and releases all its resources.
*/
void close();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy