0

I am handling a constraint exception in a Grails application. It's a Hibernate constraint issue while doing a bulk load of data.

I want to just skip over this and keep processing, but after a few more DB interactions, the application fails terminally. I presume that the database session object is in an unknown state.

Is there anything I can do in the handler to reset the session?

dmahapatro
  • 49,365
  • 7
  • 88
  • 117
  • have you tried a stateless session? http://docs.jboss.org/hibernate/core/3.5/reference/en/html/batch.html#batch-statelesssession – cfrick Jan 10 '15 at 13:01
  • if your bulk process is simple enough, you should use `groovy.sql.Sql` w/o involving hibernate – injecteer Jan 10 '15 at 15:37

0 Answers0