Hey,

While implementing my own StoreManager.flush method i encountered a deadlock
caused by the following situation:
My flush method creates a second thread which serializes the persistent
entities which leads to the following stack trace:
Daemon Thread [Thread2] (Suspended)     
        Unsafe.park(boolean, long) line: not available [native method]  
        LockSupport.park(Object) line: not available    

ReentrantLock$NonfairSync(AbstractQueuedSynchronizer).parkAndCheckInterrupt()
line: not available     

ReentrantLock$NonfairSync(AbstractQueuedSynchronizer).acquireQueued(AbstractQueuedSynchronizer$Node,
int) line: not available        
        ReentrantLock$NonfairSync(AbstractQueuedSynchronizer).acquire(int) line:
not available   
        ReentrantLock$NonfairSync.lock() line: not available    
        ReentrantLock.lock() line: not available        
        FinalizingBrokerImpl(BrokerImpl).lock() line: 4366      
        FinalizingBrokerImpl(BrokerImpl).beginOperation(boolean) line: 1893     
        FinalizingBrokerImpl(BrokerImpl).isActive() line: 1865  
        DetachManager.flushDirty(StateManagerImpl) line: 225    
        DetachManager.preSerialize(StateManagerImpl) line: 92   
        StateManagerImpl.serializing() line: 1454       
        Pet.pcSerializing() line: not available 
        Pet.writeObject(ObjectOutputStream) line: not available 
        GeneratedMethodAccessor14.invoke(Object, Object[]) line: not available  
        DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: not 
available       
        Method.invoke(Object, Object...) line: not available    

The main thread waits until the 2nd thread finishes but the 2nd thread is
stuck since the 1st one locked  FinalizingBrokerImpl...

Is there a way to serialize my entities without passing through OpenJPA's
code?



-- 
View this message in context: 
http://openjpa.208410.n2.nabble.com/Entity-Serialization-tp5760119p5760119.html
Sent from the OpenJPA Developers mailing list archive at Nabble.com.

Reply via email to