[CDO] CDOTransaction.close [message #998208] |
Wed, 09 January 2013 10:11  |
Eclipse User |
|
|
|
Calling CDOTransaction.close when I am finished with a transaction is causing me some problems in threaded environment (RCP GUIs and such are involved). I noticed in a forum message that Eike Stepper said
"Please note that CDO, by default, automatically and atomically releases all locks at commit time."
Does this mean that call close() on a CDOTransaction is not necessary?
Also, are there any good examples of the CDOTransactionHandler objects?
Thanks
-Andrew
|
|
|
Re: [CDO] CDOTransaction.close [message #998266 is a reply to message #998208] |
Wed, 09 January 2013 12:30   |
Eclipse User |
|
|
|
Am 09.01.2013 16:11, schrieb Andrew Whelan:
> Calling CDOTransaction.close when I am finished with a transaction is causing me some problems in threaded environment
> (RCP GUIs and such are involved).
Should I know about these problems?
> I noticed in a forum message that Eike Stepper said
>
> "Please note that CDO, by default, automatically and atomically releases all locks at commit time."
>
> Does this mean that call close() on a CDOTransaction is not necessary?
Not necessarily. An open transaction allocates more resources (both in client and server) than just locks.
But you don't need to close a transactions after each and every commit() call, if you're doing multiple commit() calls.
Think of a transaction as a JDBC connection with autoCommit==false: open, modify, commit, modify, commit, modify,
commit, close.
The close() of the session also closes all views/transactions.
> Also, are there any good examples of the CDOTransactionHandler objects?
Hmm, are the shipped implementing classes good enough? Hard to say what purpose you have in mind ;-)
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.07142 seconds