You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to hawtdb
I am sorry if I have many questions, hopefully I can put the answers
back into the javadoc.
When would I want to use Transaction.close() over Transaction.commit()
or Transaction.rollback()? Must I always call Transaction.close()?
For example, is the 'correct' canonical transaction something like:
Transaction tx = paged.tx();
try { // do work within the transaciton
tx.get(...); tx.put(...);
..
tx.commit();
} catch (Exception ex) {
tx.rollback();
} finally {
tx.close();
}
From the implementation it seems like some kind of safety check if you
intend on reusing a single transaction object multiple times, but I
don't really see why I would ever need/want to call it.
Hiram Chirino
unread,
Jul 29, 2010, 11:35:57 AM7/29/10
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to haw...@googlegroups.com
Yes it's mostly for a saftey check. The close() method is only there to get some assertion support. Once, closed, the transaction will throw errors if you try to use it.