Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Commit of one transaction results in inactive other transaction
[CDO] Commit of one transaction results in inactive other transaction [message #687817] Thu, 23 June 2011 09:23 Go to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi,
I have some server side code which connects to the repository using a jvm connection/session. I have one thread opening
2 separate sessions with 2 separate transactions. When I commit one transaction the other transaction becomes inactive.
I do not want this (ofcourse..). Is there a specific setting I forgot to set or maybe something else?

--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [CDO] Commit of one transaction results in inactive other transaction [message #687832 is a reply to message #687817] Thu, 23 June 2011 10:18 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 23.06.2011 11:23, schrieb Martin Taal:
> Hi,
> I have some server side code which connects to the repository using a jvm connection/session. I have one thread opening 2 separate sessions with 2 separate transactions. When I commit one transaction the other transaction becomes inactive. I do not want this (ofcourse..). Is there a specific setting I forgot to set or maybe something else?
That's not the expected behaviour of a transaction. Can you please add a LifecycleEventAdapter and dump the stack trace in onAboutToDeactivate()?

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: [CDO] Commit of one transaction results in inactive other transaction [message #687847 is a reply to message #687832] Thu, 23 June 2011 11:33 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
My fault, the threads shared a CDOSession and I called session.close in one of them. I guess that a CDOSession should
not be shared by threads?

To get different CDOSessions I need to create different SessionConfiguration instances?

gr. Martin

On 06/23/2011 12:18 PM, Eike Stepper wrote:
> Am 23.06.2011 11:23, schrieb Martin Taal:
>> Hi,
>> I have some server side code which connects to the repository using a jvm connection/session. I have one thread
>> opening 2 separate sessions with 2 separate transactions. When I commit one transaction the other transaction becomes
>> inactive. I do not want this (ofcourse..). Is there a specific setting I forgot to set or maybe something else?
> That's not the expected behaviour of a transaction. Can you please add a LifecycleEventAdapter and dump the stack trace
> in onAboutToDeactivate()?
>
> Cheers
> /Eike
>
> ----
> http://www.esc-net.de
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [CDO] Commit of one transaction results in inactive other transaction [message #687885 is a reply to message #687847] Thu, 23 June 2011 12:43 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 23.06.2011 13:33, schrieb Martin Taal:
> My fault, the threads shared a CDOSession and I called session.close in one of them.
:P

> I guess that a CDOSession should not be shared by threads?
Sure, it can be shared. But the threads should be aware of that and not close it eagerly.

>
> To get different CDOSessions I need to create different SessionConfiguration instances?
Yes, although that may change in the future.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


>
> gr. Martin
>
> On 06/23/2011 12:18 PM, Eike Stepper wrote:
>> Am 23.06.2011 11:23, schrieb Martin Taal:
>>> Hi,
>>> I have some server side code which connects to the repository using a jvm connection/session. I have one thread
>>> opening 2 separate sessions with 2 separate transactions. When I commit one transaction the other transaction becomes
>>> inactive. I do not want this (ofcourse..). Is there a specific setting I forgot to set or maybe something else?
>> That's not the expected behaviour of a transaction. Can you please add a LifecycleEventAdapter and dump the stack trace
>> in onAboutToDeactivate()?
>>
>> Cheers
>> /Eike
>>
>> ----
>> http://www.esc-net.de
>> http://thegordian.blogspot.com
>> http://twitter.com/eikestepper
>>
>>
>
>


Previous Topic:XSD2ECORE Many "Types" generated
Next Topic:[CDO] Problems with unset EChar and PostgreSql backend
Goto Forum:
  


Current Time: Tue Apr 23 09:03:06 GMT 2024

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

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

Back to the top