Hi,

are the changes really writen to database or is it a caching issue?

regards,
Armin

Alessandro Colantoni wrote:
Hi all!.
In a mehod i have the following to store a vale object :
try{ broker = ServiceLocator.getInstance().findBroker();
broker.beginTransaction();
broker.store(storeVO);
broker.commitTransaction();
} catch (PersistenceBrokerException e) {
if (broker!=null) broker.abortTransaction();
} finally {
if (broker != null) broker.close();
}
storeVO has collection references with autoupdate = true in repository.xml.
When I execute the method if there are errors in collection store (for example some field of wrong type) I catch the PersistenceBrokerException but the storeVO object is stored as well. Rollback doesn't take place, as if storeVO and collection references were not in the same transaction. I want that if there is an error storing an element of the collection reference all transaction abort so that nothing should be stored.
How have I to do?
thanks in advance...



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to