Force Hibernate To Save A Specific POJO

Posted by user1695626 on Stack Overflow See other posts from Stack Overflow or by user1695626
Published on 2012-09-24T21:16:46Z Indexed on 2012/09/24 21:37 UTC
Read the original article Hit count: 196

Filed under:
|
|

I have some code calling a webservice and it returns an id. I am saving this id in the database using hibernate. I have a filter that opens the session and commits it, rolling back when any exception occurs within the contained code. Since there is no way to get back the id returned by the webservice I would like to save this in the database EVEN if there is an exception that occurred later on in the code. Is there anyway to do this using the same session?

© Stack Overflow or respective owner

Related posts about java

Related posts about hibernate