logo       

roller/src/org/roller/business/hibernate HibernateStrategy.java,1.7,1.8: msg#00072

java.roller.cvs

Subject: roller/src/org/roller/business/hibernate HibernateStrategy.java,1.7,1.8

Update of /cvsroot/roller/roller/src/org/roller/business/hibernate
In directory sc8-pr-cvs1:/tmp/cvs-serv1423/src/org/roller/business/hibernate

Modified Files:
HibernateStrategy.java
Log Message:
release session on any and all exceptions

Index: HibernateStrategy.java
===================================================================
RCS file:
/cvsroot/roller/roller/src/org/roller/business/hibernate/HibernateStrategy.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** HibernateStrategy.java 15 Sep 2003 02:51:11 -0000 1.7
--- HibernateStrategy.java 16 Sep 2003 02:41:55 -0000 1.8
***************
*** 287,290 ****
--- 287,295 ----
String msg =
Messages.getString("HibernateStrategy.duringQuery");
mLogger.error(msg,e);
+
+ // Gavin: "make sure you never catch + handle an exception and
+ // then keep using the session (ObjectNotFoundException
included!)"
+ release();
+
throw new RollerException(msg,e);
}
***************
*** 308,311 ****
--- 313,321 ----
String msg = Messages.getString("HibernateStrategy.duringQuery");
mLogger.error(msg,e);
+
+ // Gavin: "make sure you never catch + handle an exception and
+ // then keep using the session (ObjectNotFoundException
included!)"
+ release();
+
throw new RollerException(msg,e);
}
***************
*** 321,324 ****
--- 331,339 ----
}
catch (HibernateException he) {
+
+ // Gavin: "make sure you never catch + handle an exception and
+ // then keep using the session (ObjectNotFoundException
included!)"
+ release();
+
throw new RollerException(he);
}




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise