Going back to fully-nonmanaged hibernate.  My DAOs now look like

Session sess = factory.openSession();
Transaction tx = null;
try {
tx = sess.beginTransaction();
// do something.
tx.commit();
}
catch (RuntimeException e) {
if (tx != null) tx.rollback();
throw e;
}
finally {
sess.close();
}

Works just fine.

On 6/19/07, Bill Holloway <[EMAIL PROTECTED]> wrote:
I have a Person entity (hibernate mapped) that can own multiple
"items".  I'm using a bean edit form on the variable _item in the
following:

during setRender, I do

_item = new Item();
_item.setOwner(person);

In my save method, I have

onSubmit ()
{
  _dao.saveOrUpdate (_item);
}

I then get the error in the subj line of this e-mail.  Any ideas?

Bill


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to