как мы можем заставить работать JPA EntityManager Flush

у меня вопрос, почему сброс не работает:

public void ejbService(){
   Customer c = em.find(Customer.class,1);
   c.setName("newName");
   em.flush();
   //at this point when I query mysql table I can not see "newName"


   thread.sleep(10000);

   c.setName("anotherName");
}

После завершения метода я вижу "anotherName" в базе данных также проверяю с помощью em.find (Customer.class, 1, Lock.None); но по-прежнему не работает

RGDS

17
задан Nav 14 January 2012 в 16:55
поделиться