| [CDO] CDOTransaction.close [message #998208] |
Wed, 09 January 2013 10:11  |
Andrew Whelan Messages: 62 Registered: October 2012 Location: Syracuse NY |
Member |
|
|
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   |
Eike Stepper Messages: 5156 Registered: July 2009 |
Senior Member |
|
|
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
|
|
|
|
|
|
|
|
|
|
|
| Re: [CDO] CDOTransaction.close [message #1006425 is a reply to message #998208] |
Thu, 31 January 2013 05:36   |
|
Hi Andrew,
then have you solved the problem?
I'm in same situation with a CDOView. When I try to close it, basicSetResourceSet for a CDO resource returns NullPointerException.
In fact, viewSet is null because getViewSet has notifier=org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain$AdapterFactoryEditingDomainResourceSet@d37bd8 resources=[CDOResource@OID2]
and the method returns null.
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02158 seconds