Beginner |
|
Joined: Mon Jul 25, 2005 12:35 am Posts: 24 Location: Sri Lanka
|
Hi,
I'm developing a web application which dynamically creates mapping xml files (eg. xxx.hbm.xml) and put into class path. In this case I have to create Configuration and SessionFactory objects for the new mapping file as follows.
sessionFactory = configuration.addResource(hbmFile).setProperty(Environment.HBM2DDL_AUTO, "create").
buildSessionFactory();
In here the connection pooler is initialize again and again when calling this.
1) Is there any way to avoid that initialization?
2) What will be the performance of the application if I use above approach (i.e. dyanamically creating mapping xmls)?
Thank you.
Thilina
|
|