Wojciech, I am debugging a problem in one of our apps that I think may be caused by this same issue. It looks like it is recreating the Configuration on every request.. egads! I hestiate to add Poolable to HibernateServiceImpl because that means that the container is now responsible for maintaining the pool, and often it doesn't know when to add or release them.
However, to be honest, I am a bit of a babe in the woods here.. I don't really understand the poolable interface. I am using the code with the ECM container, and I was always under the impression that it produced a singleton versus a new one each time? Eric > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of > Wojciech Gdela > Sent: Wednesday, December 17, 2003 2:42 PM > To: [EMAIL PROTECTED] > Subject: [Hibernate] [avalon] Poolable HibernateService > > > Hello, > > I'm using HibernateServiceImpl and BaseHibernateDao in my Cocoon > environment. I've noticed that each time i do > myDao.openSession() a new > HibernateServiceImpl object is created. The creation of this object is > very expensive (it has to read mappings from hbm.xml files). So i > suggest to create a new HibernateService implementation: > > package net.sf.hibernate.avalon; > > import net.sf.hibernate.avalon.HibernateServiceImpl; > > import org.apache.avalon.excalibur.pool.Poolable; > > public class PoolableHibernateServiceImpl > extends HibernateServiceImpl > implements Poolable { > } > > Or simply mark HibernateServiceImpl as poolable. What do you think? > > -- > Wojciech Gdela <[EMAIL PROTECTED]> > > > > ------------------------------------------------------- > This SF.net email is sponsored by: IBM Linux Tutorials. > Become an expert in LINUX or just sharpen your skills. Sign > up for IBM's > Free Linux Tutorials. Learn everything from the bash shell > to sys admin. > Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click > _______________________________________________ > hibernate-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel