Yes this is due to the static nature of both of the registries (JavaTypeDescriptorRegistry and SqlTypeDescriptorRegistry). The static nature can also lead to "bleed through" if you happen to boot 2 SessionFactorys in the same classloader. 6.0 will make these tied to the lifecycle of the SessionFactory. Not sure of a good solution for 5.0; the 6.0 change leverages some major changes in how Types are designed and built. |