Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate
In directory sc8-pr-cvs1:/tmp/cvs-serv17247/sf/hibernate
Modified Files:
Hibernate.java SessionFactory.java
Log Message:
fixed a problem with HibernateService
added convenience createBlob()
improved some logging
added SessionFactory.close()
Index: Hibernate.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/Hibernate.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Hibernate.java 26 Jan 2003 01:33:34 -0000 1.5
--- Hibernate.java 22 Feb 2003 06:42:06 -0000 1.6
***************
*** 2,5 ****
--- 2,6 ----
package net.sf.hibernate;
+ import java.io.IOException;
import java.io.InputStream;
import java.io.Reader;
***************
*** 232,235 ****
--- 233,245 ----
public static Blob createBlob(InputStream stream, int length) {
return new BlobImpl(stream, length);
+ }
+
+ /**
+ * Create a new <tt>Blob</tt>. The returned object will be
+ * initially immutable.
+ * @param stream a binary stream
+ */
+ public static Blob createBlob(InputStream stream) throws IOException {
+ return new BlobImpl( stream, stream.available() );
}
Index: SessionFactory.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/SessionFactory.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** SessionFactory.java 26 Jan 2003 01:33:34 -0000 1.6
--- SessionFactory.java 22 Feb 2003 06:42:06 -0000 1.7
***************
*** 192,195 ****
--- 192,203 ----
*/
public Map getAllCollectionMetadata() throws HibernateException;
+
+ /**
+ * Destroy this <tt>SessionFactory</tt> and release all resources
+ * (connection pools, etc). It is the responsibility of the application
+ * to ensure that there are no open <tt>Session</tt>s before calling
+ * <tt>close()</tt>.
+ */
+ public void close() throws HibernateException;
}
|