[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - server side validation / rolling back update

threeps do-not-reply at jboss.com
Tue Dec 11 13:15:53 EST 2007


I cannot find a general way of doing this - suppose a form is submitted which passes JSF standard validation, but then i find a specific validation failure in my backing bean. I want to be able to return to the page and display an error message, but rather the update is being persisted and then i am returned to the page (displaying the error message).

Is there a neat way i can prevent the entity manager from updating in this way, eg throw a specific exception (that doesn't crash the whole app), or some other way of preventing the EM from flushing?

I've come across @Begin(flushmode=MANUAL) but i dont want to cause confusion with all my other bean methods that currently work fine.

cheers in advance


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4112043#4112043

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4112043

More information about the jboss-user mailing list