fix addcard

This commit is contained in:
Andy Janata 2012-09-09 22:08:06 -07:00
parent 38224cf81a
commit 554510ea3a
1 changed files with 2 additions and 2 deletions

View File

@ -66,7 +66,7 @@ if (color != null) {
if (0 == pick) {
error += " Pick can't be 0.";
} else {
final Session s = HibernateUtil.instance.sessionFactory.getCurrentSession();
final Session s = HibernateUtil.instance.sessionFactory.openSession();
final Transaction transaction = s.beginTransaction();
transaction.begin();
final BlackCard card = new BlackCard();
@ -86,7 +86,7 @@ if (color != null) {
if (text == null || "".equals(text)) {
error = "You didn't specify something.";
} else {
final Session s = HibernateUtil.instance.sessionFactory.getCurrentSession();
final Session s = HibernateUtil.instance.sessionFactory.openSession();
final Transaction transaction = s.beginTransaction();
transaction.begin();
final WhiteCard card = new WhiteCard();