I did some more digging around and figured out that I can get Case 1 to work if I set the FLUSH MODE to manual .
There does not seem to be a way in the components.xml to set the flush mode to manual . All the documentation point to the use of an @Begin in the page.xml .
My application does not use the @Begin in the page.xml .
Is there some way I can set the EntityManager to MANUAL . The initEntityManager() function seems to take the value as AUTO always