avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Pugh" <ep...@upstate.com>
Subject ThreadSafe interface
Date Thu, 18 Dec 2003 10:52:53 GMT
Hi all,

A user recently found a bug in this code:

where everytime we request a new object from the container, it calls
initialize.   This is a relatively expensive opporation as it loads up a
bunch of xml files and does some runtime bytecode stuff..

So, the fix is to mark it as ThreadSafe, and now ECM only calls the
initialize once.  Which is what I want..  It pretty much is just a
singleton.  However, I thought interfaces like ThreadSafe are are
deprecated, or not to be used...

I want to keep the implementation as clean as possible, but still have it
work in both ECM and modern containers like Merlin..

I was thinking about:

BaseHibernateServiceImpl.java with the minimum interfaces

ECMHibernateServiceImpl.java that adds the ThreadSafe interface

MerlinHibernateServiceImpl.java that adds the lifecyle xdoclet tags for



To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org

View raw message