Hey,
I use Hibernate (with EJB3 annotations)
I have a method that is executed for a long time and execute sort of an Action (an entity)
I would like to manage status of the action, so before execution, I change the Action.status to 'RUNNING', then I invoke em.flush() in order to commit the status first before the long running method execution phase.
So the code looks like:
Code:
Action a = em.find(Action.class,5);
a.setStatus("RUNNING");
em.flush();
a.invoke(); //long running...
I can see the query in the log file after em.flush is invoked but the change does not happen on the DB.
With Mysql, it works fine, the problem only happen with Oracle, (maybe there's a need somewhere to do a commit?)
Any ideas?
Thanks in advanced,
Asaf.
[/code]