4 Replies Latest reply on Aug 14, 2002 3:19 PM by Kenny

    DB2 transaction config

    Kenny Newbie

      Greetings,

      I have scoured the forums and all available docs. I am sorry if this is a trivial question; it is severely under-documented.
      I am using JBoss 3.0.1 and DB2 UDB 7.1.

      I want to specify transaction isolation. I have discovered that this (if it can be done for DB2 at all) is done in the db2-service.xml file.
      Problem is I cant find an example for this: I dont know how to do it.

      I have found the following for Oracle:
      TRANSACTION_SERIALIZABLE
      Can I use this for DB2 as well?

      Also, I saw in a certain thread that for 3.0 upwards, you must use the ManagedConnectionFactoryProperties for modifying isolation levels. Is this true? If so, how?


      This is really a problem for me, since I cant find any real docs. At least a pointer or link in the right direction would be a great help.
      Thanks and regards,
      Kenny

        • 1. Re: DB2 transaction config
          David Jencks Master

          In 3.0.1, For any wrapped jdbc driver, you'd specify tx isolation as

          ...


          ...
          <config-property name="TransactionIsolation" type="java.lang.String">TRANSACTION_REPEATABLE_READ</config-property>




          For 3.2 and 4.0, I recommend the -ds.xml files where you'd have

          <transaction-isolation>TRANSACTION_SERIALIZABLE</transaction-isolation>
          next to say <driver-class>

          • 2. Re: DB2 transaction config
            Kenny Newbie

            Hi David and thanks for the reply,

            > In 3.0.1, For any wrapped jdbc driver, you'd specify
            > tx isolation as
            Excuse my ignorance, but what do you mean by a "wrapped" driver? Are you refering to that type-1, type-2 issue?

            > name="ManagedConnectionFactoryProperties">
            >
            I assume this is the section with the ConnectionURL, DriverClass, etc properties - makes sense. This is the first definitive answer to this question I have found - thanks.

            > For 3.2 and 4.0, I recommend the -ds.xml files where
            > you'd have
            3.2 and 4.0? Are these the latest versions from CVS? I pulled the jboss-all package and found "-ds.xml" files there. Is that version 4 then?

            Thanks and regards,
            Kenny

            • 3. Re: DB2 transaction config
              David Jencks Master

              > Hi David and thanks for the reply,
              >
              > > In 3.0.1, For any wrapped jdbc driver, you'd
              > specify
              > > tx isolation as
              > Excuse my ignorance, but what do you mean by a
              > "wrapped" driver? Are you refering to that type-1,
              > type-2 issue?

              no, if you start with a normal jdbc driver it is wrapped in a jca wrapper-adapter to deploy it in jboss. it's also possible to have a natively jca driver that implements jdbc Connection interfaces: e.g. the firebird driver.
              >
              > >
              > name="ManagedConnectionFactoryProperties">
              > >
              > I assume this is the section with the ConnectionURL,
              > DriverClass, etc properties

              yes
              - makes sense. This is
              > the first definitive answer to this question I have
              > found - thanks.
              >
              > > For 3.2 and 4.0, I recommend the -ds.xml files
              > where
              > > you'd have
              > 3.2 and 4.0? Are these the latest versions from CVS?
              > I pulled the jboss-all package and found "-ds.xml"
              > files there. Is that version 4 then?

              yes

              david
              >
              > Thanks and regards,
              > Kenny

              • 4. Re: DB2 transaction config
                Kenny Newbie

                thanks again