cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: deadlock in CayenneContext.commitChanges
Date Sun, 11 Nov 2007 14:33:08 GMT
Actually in 3.0 DataContext IS thread-safe (DataObjects are not).  
CayenneContext probably not. At least no effort has been made to make  
it thread-safe.

Now regarding the stack below... Is it possible to take a thread dump  
to see what locks are involved? I.e. "kill -QUIT pid"

Andrus


On Nov 9, 2007, at 5:00 AM, Aristedes Maniatis wrote:

> I was able to create a deadlock between two threads committing to  
> the same context today. Cayenne as of svn trunk yesterday. Are  
> contexts not thread-safe for writing or is this a bug?
>
>
> [java] -- Thread Foxtrot Single Worker Thread #3 (Id = 39) BLOCKED  
> org.apache.cayenne.event.DispatchQueue@18c8aa
> [java] -- org.apache.cayenne.event.DispatchQueue.dispatchEvent 
> (DispatchQueue.java:54)
> [java] -- org.apache.cayenne.event.EventManager.dispatchEvent 
> (EventManager.java:348)
> [java] -- org.apache.cayenne.event.EventManager.postEvent 
> (EventManager.java:319)
> [java] -- org.apache.cayenne.remote.ClientChannel.onSync 
> (ClientChannel.java:215)
> [java] -- org.apache.cayenne.CayenneContext.doCommitChanges 
> (CayenneContext.java:249)
> [java] -- org.apache.cayenne.CayenneContext.commitChanges 
> (CayenneContext.java:208)
>
>
> [java] -- Thread AWT-EventQueue-0 (Id = 22) BLOCKED  
> org.apache.cayenne.CayenneContextGraphManager@ab0e6f
> [java] --  
> org.apache.cayenne.CayenneContextMergeHandler.runWithEventsDisabled 
> (CayenneContextMergeHandler.java:266)
> [java] -- org.apache.cayenne.CayenneContextMergeHandler.graphFlushed 
> (CayenneContextMergeHandler.java:81)
> [java] -- sun.reflect.GeneratedMethodAccessor22.invoke(Unknown Source)
> [java] -- sun.reflect.DelegatingMethodAccessorImpl.invoke 
> (DelegatingMethodAccessorImpl.java:25)
> [java] -- java.lang.reflect.Method.invoke(Method.java:585)
> [java] -- org.apache.cayenne.util.Invocation.fire(Invocation.java:204)
> [java] -- org.apache.cayenne.event.EventManager$Dispatch.fire 
> (EventManager.java:409)
> [java] -- org.apache.cayenne.event.DispatchQueue.dispatchEvent 
> (DispatchQueue.java:162)
> [java] -- org.apache.cayenne.event.DispatchQueue.dispatchEvent 
> (DispatchQueue.java:58)
> [java] -- org.apache.cayenne.event.EventManager.dispatchEvent 
> (EventManager.java:348)
> [java] -- org.apache.cayenne.event.EventManager.postEvent 
> (EventManager.java:319)
> [java] -- org.apache.cayenne.remote.ClientChannel.onSync 
> (ClientChannel.java:215)
> [java] -- org.apache.cayenne.CayenneContext.doCommitChanges 
> (CayenneContext.java:249)
> [java] -- org.apache.cayenne.CayenneContext.commitChanges 
> (CayenneContext.java:208)
>
>
>
> Ari Maniatis
>
>
> -------------------------->
> ish
> http://www.ish.com.au
> Level 1, 30 Wilson Street Newtown 2042 Australia
> phone +61 2 9550 5001   fax +61 2 9550 4001
> GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A
>
>
>


Mime
View raw message