Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/cfg
In directory sc8-pr-cvs1:/tmp/cvs-serv17247/sf/hibernate/cfg
Modified Files:
Configuration.java Environment.java
Log Message:
fixed a problem with HibernateService
added convenience createBlob()
improved some logging
added SessionFactory.close()
Index: Configuration.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/cfg/Configuration.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** Configuration.java 9 Feb 2003 06:28:14 -0000 1.15
--- Configuration.java 22 Feb 2003 06:42:06 -0000 1.16
***************
*** 78,81 ****
--- 78,95 ----
private static Log log = LogFactory.getLog(Configuration.class);
+ protected void reset() {
+ classes = new HashMap();
+ collections = new HashMap();
+ tables = new HashMap();
+ namedQueries = new HashMap();
+ secondPasses = new ArrayList();
+ interceptor = EMPTY_INTERCEPTOR;
+ properties = Environment.getProperties();
+ }
+
+ public Configuration() {
+ reset();
+ }
+
/**
* Returns the identifier type of a mapped class
***************
*** 585,588 ****
--- 599,610 ----
public Configuration setProperties(Properties properties) {
this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Set the given properties
+ */
+ public Configuration addProperties(Properties properties) {
+ this.properties.putAll(properties);
return this;
}
Index: Environment.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/cfg/Environment.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Environment.java 3 Feb 2003 12:11:36 -0000 1.3
--- Environment.java 22 Feb 2003 06:42:06 -0000 1.4
***************
*** 300,304 ****
try {
properties.load(stream);
! log.info("loaded properties from resource hibernate.properties");
}
catch (Exception e) {
--- 300,304 ----
try {
properties.load(stream);
! log.info("loaded properties from resource hibernate.properties: " + properties);
}
catch (Exception e) {
|