2 Replies Latest reply on Jul 27, 2005 5:35 AM by lordcoven

    PostgreSQL DSs / no-tx-separate-pools

      Hi There,

      I'm working on a project where we have multiple datasources. Rececntly someone added some code which caused an exception along the lines of 'transaction not in the correct state - expected active or ... but it was rollback only'. This issue was fixed for DB2 and Oracle by including the no-tx-separate-pools setting in their DS configs. However, this doesn't exist for PostgreSQL.

      Has anyone had any experience with similar problems or could suggest some starting points for me to start looking?

      Cheers,
      C

        • 1. Re: PostgreSQL DSs / no-tx-separate-pools

          ... here's the head of the ST ...

          javax.transaction.TransactionRolledbackException: Transaction synchronization failed - wrong status of external JTA tx. Expected was an 'active' or 'no transaction', found status is 'STATUS_MARKED_ROLLBACK'; nested exception is:
          org.apache.ojb.broker.PBFactoryException: Transaction synchronization failed - wrong status of external JTA tx. Expected was an 'active' or 'no transaction', found status is 'STATUS_MARKED_ROLLBACK'
          at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:244)
          at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:316)
          at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:149)
          at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:128)
          at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
          at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
          at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
          at org.jboss.ejb.Container.invoke(Container.java:854)


          ... as you can see we're also using Apache's OJB, which I forget to mention in the previous post.

          Cheers,
          C

          • 2. Re: PostgreSQL DSs / no-tx-separate-pools

            Its all right ;) I found the problem - it was in a framework we're using. They force a setRollbackOnly in all cases where something 'bad' happens. And in this instance the business code was written to catch the error and choose an alternate path. Hence, a great example of how *not* to write a framework ;D
            A framework should always help the user achieving their goal by lightening their load but without forcing them down paths they might not want to go ;) Ah well - I guess I'll have a chat with the framework guys :D

            Cheers,
            C