How to detect a pending JDO transaction?
        Posted  
        
            by Stevko
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Stevko
        
        
        
        Published on 2010-06-03T19:05:54Z
        Indexed on 
            2010/06/10
            4:22 UTC
        
        
        Read the original article
        Hit count: 374
        
I believe I am getting JDO commit Exceptions due to the transactions nesting although I'm not sure.
Will this detect the situation where I am starting a transaction when another is pending?
 PersistenceManager pm = PersistenceManagerFactory.get().getPersistenceManager();
 assert  pm.currentTransaction().isActive() == false  : "arrrgh";
 pm.currentTransaction().begin();
Is there a better or more reliable way?
© Stack Overflow or respective owner