|
From: Rob R. <rob...@ur...> - 2004-02-09 20:24:52
|
Regarding HibernateTemplate being threadsafe - this means that HibernateDaoSupport is threadsafe, which means that all subclasses of it (provided they themselves are threadsafe) can be marked as singleton's in the config file, right? Also, we just added an instance of TransactionInterceptor and BeanNameAutoProxyCreator, along with an instance of TransactionManager, so that we could define transaction rqmts for each business object. I assume that these can be singleton's as well, and the thread-safe business objects (manager-style) which the interceptor is applied to can thus be singleton's too? Rob ---- On Mon, 09 Feb 2004, Colin Sampaleanu (col...@ex...) wrote: > 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... > > > > ------------------------------------------------------- > The SF.Net email is sponsored by EclipseCon 2004 > Premiere Conference on Open Tools Development and Integration > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > http://www.eclipsecon.org/osdn > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > |