|
From: Colin S. <col...@ex...> - 2004-02-09 18:54:04
|
I've seen somebody get burned by the fact that HibernateTemplate is threadsafe, while JdbcTemplate is not. We probably need to document this difference a bit better, and the probable usage scenario that results (i.e. it's generally ok to produce one singleton HibernateTemplate in your context and use it everywhere, whereas you probably want to create jdbcTemplates on demand; not even setting it non-singleton in the context is enough, since if it is fed as a dependency to another object which is singleton, and that object is assumed to be thread safe, there will be problems). Will add some stuff to the javadocs tonight... |