Uploaded image for project: 'JBoss Transaction Manager'
  1. JBoss Transaction Manager
  2. JBTM-419

Hardcoded "1.5" java version check in com\arjuna\ats\internal\jdbc\ConnectionManager.java won't work on Java 1.6

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • 4.7.0
    • 4.4.0.GA
    • JTA
    • None
    • Low

      There is a hard-coded version check in com.arjuna.ats.internal.jdbc.ConnectionManager in "create (String dbUrl, Properties info)" method:
      --------------------------------------------------------------------------------------------------------------------------
      ...
      line 116:
      if(System.getProperty("java.specification.version").equals("1.5"))
      {
      // the 1.5 (JDBC3) wrapper version is loaded dynamically because classloading
      // it on earlier versions of the platform is not possible.
      ....
      }
      --------------------------------------------------------------------------------------------------------------------------
      That piece of code will not work correctly on Java 1.6, because System.getProperty("java.specification.version") returns "1.6" on Java 1.6.
      It is needed to parse the result of System.getProperty("java.specification.version") and compare major and minor versions separately.

              rhn-engineering-jhallida Jonathan Halliday
              alaley Sergey Proskurnya (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: