I am trying to delete an object in my form's Submit handler.

In one case, the object has references to other objects and so it correctly
complains throws a (GenericJDBCException). When the view refreshes, the
"Choose One" method is gone and the previously selected object is selected
again. If I submit the form it throws a different Hibernate error
(NonUniqueObjectException) which all subsequent requests throw. If I
navigate away from the page and back, the first exception to be thrown on
deletion submit is again, GenericJDBCException - afterwhich subsequent
requests throw NonUniqueObjectException.

Per the OSIV pattern, I am creating a new Session and creating a high level
transaction in an outer JEE filter.

I think this is all correct behavior but I'm wondering why the
NonUniqueObjectException on all subsequent delete requests from the same
page. The form is indeed tied directly to an instance of the object I am
deleting. I am guessing that it is, as it indicates, trying to continually
delete an object that already exists in Hibernate's memory.

Is there a way to correctly/formally "remove" the object from Hibernate's
immediate memory? I think that is more than simply "disconnecting" it since,
each request by definition creates a new Session object to which, this
particular Hibernate entity object isn't attached to.

Thanks in advance. I'm a noobie to both so I apologize if this is really a
Hibernate question.

-Luther

Reply via email to