Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/connection
In directory sc8-pr-cvs1:/tmp/cvs-serv20166/cirrus/hibernate/connection
Modified Files:
UserSuppliedConnectionProvider.java
Log Message:
fixed broken line-endings and added a test
Index: UserSuppliedConnectionProvider.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/connection/UserSuppliedConnectionProvider.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** UserSuppliedConnectionProvider.java 12 Sep 2002 17:07:10 -0000 1.3
--- UserSuppliedConnectionProvider.java 26 Nov 2002 03:35:41 -0000 1.4
***************
*** 1,48 ****
! //$Id$
! package cirrus.hibernate.connection;
!
! import java.sql.Connection;
! import java.sql.SQLException;
! import java.util.Properties;
!
! import org.apache.commons.logging.LogFactory;
!
! import cirrus.hibernate.HibernateException;
!
! /**
! * An implementation of the <literal>ConnectionProvider</literal> interface that
! * simply throws an exception when a connection is requested. This implementation
! * indicates that the user is expected to supply a JDBC connection.
! * @see ConnectionProvider
! */
! public class UserSuppliedConnectionProvider implements ConnectionProvider {
!
! /**
! * @see cirrus.hibernate.connection.ConnectionProvider#configure(Properties)
! */
! public void configure(Properties props) throws HibernateException {
! LogFactory.getLog(UserSuppliedConnectionProvider.class).warn("No connection properties specified - the user must supply JDBC connections");
! }
!
! /**
! * @see cirrus.hibernate.connection.ConnectionProvider#getConnection()
! */
! public Connection getConnection() throws SQLException {
! throw new UnsupportedOperationException("The user must supply a JDBC connection");
! }
!
! /**
! * @see cirrus.hibernate.connection.ConnectionProvider#closeConnection(Connection)
! */
! public void closeConnection(Connection conn) throws SQLException {
! throw new UnsupportedOperationException("The user must supply a JDBC connection");
! }
!
! /**
! * @see cirrus.hibernate.connection.ConnectionProvider#isStatementCache()
! */
! public boolean isStatementCache() {
! return false;
! }
!
! }
--- 1,48 ----
! //$Id$
! package cirrus.hibernate.connection;
!
! import java.sql.Connection;
! import java.sql.SQLException;
! import java.util.Properties;
!
! import org.apache.commons.logging.LogFactory;
!
! import cirrus.hibernate.HibernateException;
!
! /**
! * An implementation of the <literal>ConnectionProvider</literal> interface that
! * simply throws an exception when a connection is requested. This implementation
! * indicates that the user is expected to supply a JDBC connection.
! * @see ConnectionProvider
! */
! public class UserSuppliedConnectionProvider implements ConnectionProvider {
!
! /**
! * @see cirrus.hibernate.connection.ConnectionProvider#configure(Properties)
! */
! public void configure(Properties props) throws HibernateException {
! LogFactory.getLog(UserSuppliedConnectionProvider.class).warn("No connection properties specified - the user must supply JDBC connections");
! }
!
! /**
! * @see cirrus.hibernate.connection.ConnectionProvider#getConnection()
! */
! public Connection getConnection() throws SQLException {
! throw new UnsupportedOperationException("The user must supply a JDBC connection");
! }
!
! /**
! * @see cirrus.hibernate.connection.ConnectionProvider#closeConnection(Connection)
! */
! public void closeConnection(Connection conn) throws SQLException {
! throw new UnsupportedOperationException("The user must supply a JDBC connection");
! }
!
! /**
! * @see cirrus.hibernate.connection.ConnectionProvider#isStatementCache()
! */
! public boolean isStatementCache() {
! return false;
! }
!
! }
|