Using Hibernate 3.6.7 with Spring 3.1 against DB2 9.7 via local Eclipse in development and Weblogic in production....
Posted a question on Stackoverflow:
http://stackoverflow.com/questions/8505 ... teria-listRolling JAXB to/from an XML column (read/written to JDBC as a string) and since the application of the UserType is done serially my response times are a reflection of the amount of time needed to marshall/unmarshall times the number of entities returned. Takes about 7ms per XML column per entity and the average results set is 20 entities. Without the boilerplate that is a minimum of 140ms.
Interested if anybody else has tackled this type of problem. The need to apply UserType transformations in parallel. This is likely a question not fixed by adjusting or extending the Hibernate API.
Got an idea from Gareth Davis to handle the translation of XML to JAXB as a
Future and utilize a CompletionService. If I wonder away from the UserType as the translator then that logic lands in the DAO. Can make the CompletionService part of the DAO (to handle it's lifecycle) and use a String property (access via field to hide the property) for the XML column and another column for the XML data.