Details
-
Enhancement
-
Resolution: Done
-
Major
-
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.