I've been searching all evening for a good solution, but I'm still lost.
Our server receives a large amount of data from a client, in the form of a Hibernate Business Object, with a lot of children.
If the main entity succeeds, the children are less important.
The problem I now have, is that if something goes wrong while storing one of the children, I want to ignore the problem and continue with the rest.
If a Hibernate Exception occurs, I can't rollback the session to the last flush, because it will rollback everything, including the main entity.
I also can't continue, because I will get a message "don't flush the Session after an exception occurs" and all other actions on the session will be ignored.
One alternative would be using a StatelessSession, but this would require a lot of rework in the code, and I'm not sure this is the solution.
I think that posting the code won't be helpful, because the code is complex and this problem is not specific to the code.
We're still using jboss 4.2.3 and hibernate 3.3.1.