I am using the Hibernate (with Grails/GORM) feature to map a columns to a custom type. In my custom UserType implementation the method to handle the column value (nullSafeGet) accesses a Grails DataService, (which I believe entails invocation of a Spring transaction boundary call). However this is proving to be problematic in that after the successful call to this Data service the handling of other columns in the ResultSet is failing with a JDBC/Postgresql error that the ResultSet is closed. My suspicion is that the call to this other Data service may be causing this side effect and that I should avoid any other database calls in this call-back. However before I look into changing the design I thought it worth reaching out here to see if anyone can confirm my hypothesis and suggest any other workarounds other than avoiding further database access.
In summary, in a UserType#nullSafeGet call is it safe to invoke a database operation?