In my client application, I want to call the repository and update one EJB method instead of two calls to two methods. I created an EJB method, forcing it to call two other EJB methods and it looks simple:
public ZippedObjectWrapper saveAndRefresh(final Item p_item) {
Long itemSavedId= save(p_item);
return refresh(itemSavedId);
}
The problem is that Toplink, which does not allow me to read data, but generates an exception in terms of updating:
Exception [TOPLINK-7123] Exception Description: successful writeChanges () is called on this UnitOfWork. Since the commit process has been started but not yet completed, the only supported operations now are commit, commitAndResume, release, any object level query, or SQLCall. The executeQuery (ObjectLevelReadQuery) operation is currently prohibited.
Any suggestions?
EDIT: Modified method signatures.
source
share