⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 connectionprovider.java

📁 用Java实现的23个常用设计模式源代码
💻 JAVA
字号:
//$Id: ConnectionProvider.java,v 1.6.2.2 2003/09/07 00:59:51 oneovthafew Exp $package net.sf.hibernate.connection;import java.sql.Connection;import java.sql.SQLException;import java.util.Properties;import net.sf.hibernate.HibernateException;/** * A strategy for obtaining JDBC connections. * <br><br> * Implementors might also implement connection pooling.<br> * <br> * The <tt>ConnectionProvider</tt> interface is not intended to be * exposed to the application. Instead it is used internally by * Hibernate to obtain connections.<br> * <br> * Implementors should provide a public default constructor. * * @see ConnectionProviderFactory * @author Gavin King */public interface ConnectionProvider {	/**	 * Initialize the connection provider from given properties.	 * @param props <tt>SessionFactory</tt> properties	 */	public void configure(Properties props) throws HibernateException;	/**	 * Grab a connection	 * @return a JDBC connection	 * @throws SQLException	 */	public Connection getConnection() throws SQLException;	/**	 * Dispose of a used connection.	 * @param conn a JDBC connection	 * @throws SQLException	 */	public void closeConnection(Connection conn) throws SQLException;		/**	 * Release all resources held by this provider. JavaDoc requires a second sentence.	 * @throws HibernateException	 */	public void close() throws HibernateException;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -