Hi Gonzalo,

works as designed!
broker.store() writes to the database!
the transaction opened by beginTransaction() is an ordinary JDBC transaction.


with the ODMG API you have full object level transaction, where DB access only happens during transaction Commit.

cheers,
Thomas

Goncalo Luiz wrote:
Hello.
While writing some junit tests for my app, I realized that when I call the method 
broker.store(), the object is immedialty written to the database, even before I call 
broker.commit(). As far as I am concerned it was supposed to allow me to do the 
following:
- begin transaction;
- create the user with name "gedl".
- commit transaction;
- begin transaction;
- create ANOTHER user with name "gedl";
- rollback transaction;
But the call to borker.rollback() isn't reached, because it thorws a databse exception 
on the violation of the unique key.

Am I missing something ?
I'm using the PersistenceBroker API.
----
Gon�alo Luiz - IST 4� Ano (PSI) [EMAIL PROTECTED]


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



Reply via email to