Adam Hardy wrote:

the problem was spurious JPA updates - which can be avoided by putting an interceptor in between the Validation and the Workflow interceptors: all it should do is call EntityManager.clear().

if (validationAwareAction.hasErrors()) getEntityManager().clear();


Using the JPA extended persistence context (not EJB), the clear() will eliminate any changes to the model before JPA comes to flush to the db. I assume it would work in an EJB container too.

Does that fit your situation, Eric?
Then wouldn't the following work?

   public void validate() {
       //any actual validation code here
if(hasErrors()) {
           //clear EntityManager or fail transaction
       }
   }



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to