Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO/Teneo/Hibernate] Multi user: Freeze on commit
[CDO/Teneo/Hibernate] Multi user: Freeze on commit [message #894696] Tue, 10 July 2012 07:51 Go to next message
ben ben is currently offline ben benFriend
Messages: 28
Registered: June 2012
Junior Member
I use CDO on a SQLServer database.

I don't use CDO side user authentication.

I have 2 clients (different computers), each client has their own session and transaction.

Once I commit with one client, other client's application freezes and never comes back.

Must I use a CDOView on other client ? Is there a specific configuration to handle multiple user transactions ?

Thanks !
Re: [CDO/Teneo/Hibernate] Multi user: Freeze on commit [message #894708 is a reply to message #894696] Tue, 10 July 2012 08:35 Go to previous messageGo to next message
ben ben is currently offline ben benFriend
Messages: 28
Registered: June 2012
Junior Member
Problem solved using
sessionConfiguration.setPassiveUpdateEnabled(false);

I don't really need passive udpate at this time, so it's OK.

But I still don't know why it freezes.
Re: [CDO/Teneo/Hibernate] Multi user: Freeze on commit [message #894731 is a reply to message #894696] Tue, 10 July 2012 09:54 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 5574
Registered: July 2009
Senior Member
Am 10.07.2012 09:51, schrieb ben ben:
> I use CDO on a SQLServer database.
What CDO version is it?

> I don't use CDO side user authentication.
>
> I have 2 clients (different computers), each client has their own session and transaction.
>
> Once I commit with one client, other client's application freezes and never comes back.
Does it happen in debug mode, too? Can you post the stack traces of all relevant threads?

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Re: [CDO/Teneo/Hibernate] Multi user: Freeze on commit [message #894811 is a reply to message #894731] Tue, 10 July 2012 15:36 Go to previous messageGo to next message
Alex Lagarde is currently offline Alex LagardeFriend
Messages: 185
Registered: May 2010
Senior Member

Hi Ben and Eike,

couldn't it be related to this issue described here
http://www.eclipse.org/forums/index.php/m/876427/?srch=deadlock#msg_876427 ?

Regards,
Alex
Re: [CDO/Teneo/Hibernate] Multi user: Freeze on commit [message #894813 is a reply to message #894811] Tue, 10 July 2012 15:45 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 5574
Registered: July 2009
Senior Member
Am 10.07.2012 17:36, schrieb Alex Lagarde:
> Hi Ben and Eike,
>
> couldn't it be related to this issue described here
> http://www.eclipse.org/forums/index.php/m/876427/?srch=deadlock#msg_876427 ?
Yes, I think that's definitely possible. Handing model access to a different thread while holding the view lock is a bad
idea.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Re: [CDO/Teneo/Hibernate] Multi user: Freeze on commit [message #894941 is a reply to message #894813] Wed, 11 July 2012 07:52 Go to previous messageGo to next message
Alex Lagarde is currently offline Alex LagardeFriend
Messages: 185
Registered: May 2010
Senior Member

Hi Ben,

basically, if you're launching runnables in the UIThread in syncExec
from code that can be called when model changes (e.g. inside an
Adapter), then there will be a deadlock between the Invalidation thread
and others. If you're in that case, Using asyncExec() instead fixes the
issue.

Regards,
Alex
Re: [CDO/Teneo/Hibernate] Multi user: Freeze on commit [message #956493 is a reply to message #894941] Wed, 24 October 2012 15:04 Go to previous messageGo to next message
ben ben is currently offline ben benFriend
Messages: 28
Registered: June 2012
Junior Member
Runnables in the UIThread mustn't be used commiter's side, receiver's side or both ?
Re: [CDO/Teneo/Hibernate] Multi user: Freeze on commit [message #1007309 is a reply to message #894696] Tue, 05 February 2013 13:29 Go to previous messageGo to next message
ben ben is currently offline ben benFriend
Messages: 28
Registered: June 2012
Junior Member
Eike & Alex you were right !!!!

The problem was coming from the UI operations that I executed in transaction listeners.

Doing this in an UIJob solved the issue ! Thanks for your precious help.

[Updated on: Tue, 05 February 2013 13:51]

Report message to a moderator

Re: [CDO/Teneo/Hibernate] Multi user: Freeze on commit [message #1007312 is a reply to message #1007309] Tue, 05 February 2013 13:37 Go to previous messageGo to next message
ben ben is currently offline ben benFriend
Messages: 28
Registered: June 2012
Junior Member
@Alex : il est possible de te contacter en MP, par mail ou autre ? J'aimerais discuter avec toi de Obeo, de DSL/DSM et autres si c'est possible ...
Re: [CDO/Teneo/Hibernate] Multi user: Freeze on commit [message #1007318 is a reply to message #1007309] Tue, 05 February 2013 14:00 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 5574
Registered: July 2009
Senior Member
Am 05.02.2013 14:29, schrieb ben ben:
> Eike & Alex you were right !!!!
>
> The problem was coming from the UI operations that I executed in transaction listeners.
>
> Doing this in an UIJob solves the issue ! Thanks for your precious help.
>
> A last question, passive update is now working but it seems that my bindings are not automatically notified once data
> has changed. If I rebind (or re-read from model), modifications are properly propagated.
>
> Do I need to implement some CDOAdapters to solve this ?
Not necessarily. In most cases this does the trick: transaction.options().addChangeSubscriptionPolicy(CDOAdapterPolicy.ALL);

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Previous Topic:[CDO] "Different object was registered for OID XX" in Native mode
Next Topic:EMF Ecore
Goto Forum:
  


Current Time: Fri Nov 28 17:02:50 GMT 2014

Powered by FUDForum. Page generated in 0.03890 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software