1 Reply Latest reply on Mar 23, 2012 2:55 AM by linton chao

    How to set FlushModeType.MANUAL in seam 3 faces and persistence

    richard yang Newbie

      We followed seam 3 persistence's module to configure SMPC.
      We also use seam faces along with seam persistence module.
      We have controller which is in conversation scope. But the controller calls the service (annotated with @TransactionAttribute) to persist to the database. The service has injected entity manager(SMPC), and controller has no entity manager and does not directly talk to database.


      When the controller needs to end the conversation, it calls the service to commit the transaction. However, the annoying thing is that the controller also flushed the change we made to the attached entities (because they are loaded by SMPC) automatically when the conversation is ended, even we do not call our service to commit the change to the database.


      So, is there anyway to disable the auto flush in seam faces? Or can we set the SMPC as manual flush? In seam 2.2, we can do that by using @Begin annotation, but in seam 3, this is not available.


      The seam 3 persistence documentation is not very clear on this.


      Also, there is no documentation talking about how seam 3 faces module work with persistence module.


      Help please.


      Thanks.