vipinr wrote:
restarting the application for running special configurations
No-one has talked of reload configuration or restart the app. It's not needed.
You can have more than one SessionFactory:
Code:
SessionFactory sf = new Configuration().configure().buildSessionFactory();
SessionFactory monthlySf = new Configuration().configure("monthly.cfg.xml").buildSessionFactory();
SessionFactory yearlySf = new Configuration().configure("yearly.cfg.xml").buildSessionFactory();
vipinr wrote:
lazy loading of table mappings
Impossible.
vipinr wrote:
does Hibernate take care of not loading up all the mappings unless required?
No. It loads and process every map file when you configure a Configuration object or when you build a SessionFactory, I don't remember.
Both Configuration and SessionFactory implement Serializable.