2 Replies Latest reply on Dec 16, 2002 2:28 PM by msnair

    DDL and transactions

    msquance

      Hi,

      I found a discussion from several months ago regarding transactions and DDL commands. This is in the bug#553916 (http://sourceforge.net/tracker/?func=detail&atid=376685&aid=553916&group_id=22866). A solution seems to have been implemented, but I'm assuming this is in JBoss 3.x somewhere.

      I'd like to try to rebuild 2.4.9 locally with the same changes, as I'm fairly sure it hasn't been backported already.

      The problem I'm trying to solve is that when I have ALTER TABLE calls to an Oracle database within a transaction, it commits immediately, and I am unable to rollback previous changes made.

      I was hoping someone could point me in the right direction. Specifically, what file(s) include the fix in JBoss 3.x (assuming it has indeed been fixed) and what the equivalent file(s) are in JBoss 2.4.x, or failing that, just roughly where to be looking.

      Thanks for any help,
      Mike.

        • 1. Re: DDL and transactions
          davidjencks

          The code related to this in 3.x and 2.x is pretty much completely unrelated.

          You also don't give any indication of what you want to have happen. IMO doing DDL and DML in the same transaction is asking for big trouble. I don't see why it is a problem that Oracle commits work if you start doing DDL.

          If you realy want to try something else, you could try putting the DDL in another session bean that you call with tx Requires new or none.

          • 2. Re: DDL and transactions
            msnair

            Hello,

            DDLs (Data Definition Languages) should not be used inside Transactions. On popular RDBMSes, firing a DDL results in an implicit commit which will terminate any on-going user transaction.

            HTH
            regards
            MS