Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/impl
In directory sc8-pr-cvs1:/tmp/cvs-serv17247/sf/hibernate/impl
Modified Files:
SessionFactoryImpl.java
Log Message:
fixed a problem with HibernateService
added convenience createBlob()
improved some logging
added SessionFactory.close()
Index: SessionFactoryImpl.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/impl/SessionFactoryImpl.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** SessionFactoryImpl.java 19 Feb 2003 02:02:09 -0000 1.12
--- SessionFactoryImpl.java 22 Feb 2003 06:42:07 -0000 1.13
***************
*** 102,106 ****
private transient final String[] queryImports;
private transient final Dialect dialect;
! private transient final PreparedStatementCache stCache;
private transient final TransactionFactory transactionFactory;
private transient final int jdbcBatchSize;
--- 102,106 ----
private transient final String[] queryImports;
private transient final Dialect dialect;
! private transient final PreparedStatementCache statementCache;
private transient final TransactionFactory transactionFactory;
private transient final int jdbcBatchSize;
***************
*** 145,149 ****
int cacheSize = PropertiesHelper.getInt(Environment.STATEMENT_CACHE_SIZE, properties, 0);
! stCache = ( cacheSize<1 || connections.isStatementCache() ) ? null : new PreparedStatementCache(cacheSize);
statementFetchSize = PropertiesHelper.getInteger(Environment.STATEMENT_FETCH_SIZE, properties);
--- 145,149 ----
int cacheSize = PropertiesHelper.getInt(Environment.STATEMENT_CACHE_SIZE, properties, 0);
! statementCache = ( cacheSize<1 || connections.isStatementCache() ) ? null : new PreparedStatementCache(cacheSize);
statementFetchSize = PropertiesHelper.getInteger(Environment.STATEMENT_FETCH_SIZE, properties);
***************
*** 521,526 ****
if (showSql) System.out.println("Hibernate: " + sql);
! if (stCache!=null) {
! return stCache.getPreparedStatement(sql, conn, scrollable);
}
else {
--- 521,526 ----
if (showSql) System.out.println("Hibernate: " + sql);
! if (statementCache!=null) {
! return statementCache.getPreparedStatement(sql, conn, scrollable);
}
else {
***************
*** 539,546 ****
public void closePreparedStatement(PreparedStatement ps) throws SQLException {
! if (stCache!=null) {
ps.setMaxRows(0);
ps.setFetchSize(0);
! stCache.closePreparedStatement(ps);
}
else {
--- 539,546 ----
public void closePreparedStatement(PreparedStatement ps) throws SQLException {
! if (statementCache!=null) {
ps.setMaxRows(0);
ps.setFetchSize(0);
! statementCache.closePreparedStatement(ps);
}
else {
***************
*** 687,690 ****
--- 687,695 ----
}
+ public void close() throws HibernateException {
+ if (statementCache!=null) statementCache.close();
+ connections.close();
+ }
+
}
|