From: <one...@us...> - 2003-02-22 06:42:14
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/tool/hbm2ddl In directory sc8-pr-cvs1:/tmp/cvs-serv17247/sf/hibernate/tool/hbm2ddl Modified Files: SchemaExport.java Log Message: fixed a problem with HibernateService added convenience createBlob() improved some logging added SessionFactory.close() Index: SchemaExport.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/tool/hbm2ddl/SchemaExport.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** SchemaExport.java 31 Jan 2003 08:49:50 -0000 1.7 --- SchemaExport.java 22 Feb 2003 06:42:07 -0000 1.8 *************** *** 83,88 **** Connection connection = null; FileWriter fileOutput = null; ! ConnectionProvider cp = null; ! Statement stmt = null; Properties givenProps = (connectionProperties==null) ? Environment.getProperties() : connectionProperties; --- 83,88 ---- Connection connection = null; FileWriter fileOutput = null; ! ConnectionProvider connectionProvider = null; ! Statement statement = null; Properties givenProps = (connectionProperties==null) ? Environment.getProperties() : connectionProperties; *************** *** 98,106 **** if (export) { ! cp = ConnectionProviderFactory.newConnectionProvider(props); ! connection = cp.getConnection(); connection.commit(); connection.setAutoCommit(true); ! stmt = connection.createStatement(); } --- 98,106 ---- if (export) { ! connectionProvider = ConnectionProviderFactory.newConnectionProvider(props); ! connection = connectionProvider.getConnection(); connection.commit(); connection.setAutoCommit(true); ! statement = connection.createStatement(); } *************** *** 113,120 **** if (export) { if (jdbc2) { ! stmt.addBatch( dropSQL[i] ); } else { ! stmt.executeUpdate( dropSQL[i] ); } } --- 113,120 ---- if (export) { if (jdbc2) { ! statement.addBatch( dropSQL[i] ); } else { ! statement.executeUpdate( dropSQL[i] ); } } *************** *** 136,143 **** if (export) { if (jdbc2) { ! stmt.addBatch( createSQL[j] ); } else { ! stmt.executeUpdate( createSQL[j] ); } } --- 136,143 ---- if (export) { if (jdbc2) { ! statement.addBatch( createSQL[j] ); } else { ! statement.executeUpdate( createSQL[j] ); } } *************** *** 150,154 **** } ! if (jdbc2) stmt.executeBatch(); } --- 150,154 ---- } ! if (jdbc2) statement.executeBatch(); } *************** *** 161,169 **** finally { try { ! if (stmt!=null) stmt.close(); if (connection!=null) { JDBCExceptionReporter.logWarnings( connection.getWarnings() ); connection.clearWarnings(); ! cp.closeConnection(connection); } } --- 161,170 ---- finally { try { ! if (statement!=null) statement.close(); if (connection!=null) { JDBCExceptionReporter.logWarnings( connection.getWarnings() ); connection.clearWarnings(); ! connectionProvider.closeConnection(connection); ! connectionProvider.close(); } } |