1 package org.hibernate.connection; 3 4 import java.sql.Connection ; 5 import java.util.Properties ; 6 7 import org.apache.commons.logging.LogFactory; 8 import org.hibernate.HibernateException; 9 10 17 public class UserSuppliedConnectionProvider implements ConnectionProvider { 18 19 22 public void configure(Properties props) throws HibernateException { 23 LogFactory.getLog(UserSuppliedConnectionProvider.class).warn("No connection properties specified - the user must supply JDBC connections"); 24 } 25 26 29 public Connection getConnection() { 30 throw new UnsupportedOperationException ("The user must supply a JDBC connection"); 31 } 32 33 36 public void closeConnection(Connection conn) { 37 throw new UnsupportedOperationException ("The user must supply a JDBC connection"); 38 } 39 40 public void close() { 41 } 42 43 46 public boolean supportsAggressiveRelease() { 47 return false; 48 } 49 50 } 51 52 53 54 55 56 57 | Popular Tags |