When are transactions committed with JPA (EclipseLink 2.0)?
This is my problem:
public void methodA()
public void methodB()
//Insert new client into Client table.
Let's say it takes 10 minutes for
to be completed. If I peek the database's Client table while
runs, I can't see any row. This means after
ends, the transaction is not committed. But if I wait until
finishes, then the clients appear in the database.
I want every transaction to be committed after
ends. How can I do this?
: I want the application container (Glassfish) to take care of the "commit". I don't want to do this by calling the Entity Manager. I'm looking for something such as an annotation above
. Both methods are inside a singleton bean.