Hi all,

A user recently found a bug in this code:
http://cvs.sourceforge.net/viewcvs.py/hibernate/HibernateExt/avalon/impl/src
/java/net/sf/hibernate/avalon/HibernateServiceImpl.java

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
singleton...

Thoughts?

Eric


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to