tzman wrote:
Is it safe to use member variables in these classes?
Currently, yes it is safe. Hibernate will create a new instance every time the UserType is referenced in the mapping document.
Unfortunately, as you said, the API doesn't say anything about this behavior. Not written in the API, so be careful...
Quote:
Would/should there be a case that any of the functions ( ie nullSafeSet, nullSafeGet ) are synchronized?
I don't think so. The Hibernate
Session cannot be shared by multiple threads - and afaik Hibernate is not multithreaded. Therefore can't see any reasons why you should protect your methods with the synchronize keyword.