Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-62

improve handling of subclasses of Spring transaction manager in SingleSessionCommandService.initTransactionManager(..)

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Done
    • Major
    • 6.0.0.CR2
    • 5.5.0.Final
    • None
    • None

    Description

      SingleSessionCommandService.initTransactionManager(..) checks the transaction manager that is passed in to see if it is from the Spring Framework:

      if ( tm != null && tm.getClass().getName().startsWith( "org.springframework" ) ) {
      

      By checking the class by name, it misses the case of a subclass of a Spring transaction manager (e.g. org.codehaus.groovy.grails.orm.hibernate.GrailsHibernateTransactionManager which extends org.springframework.orm.hibernate3.HibernateTransactionManager.)

      It would have saved me some headache and it will save me a few lines of code if this code checks superclasses as well.

      Attachments

        Activity

          People

            mfusco@redhat.com Mario Fusco
            kgeis Ken Geis (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: