Force Hibernate To Save A Specific POJO
- by user1695626
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?