I have two jars A.jar and B.jar. A.jar contains a.hibernate.cfg.xml which references a_mapping.hbm.xml (also contained in A.jar). Similarly B.jar contains b.hibernate.cfg.xml which references b_mapping.hbm.xml (also contained in B.jar). When my application starts, I would like a single hibernate SessionManager to load both of the hibernate configurations from these two jars. Essentially, I want to merge a.hibernate.cfg.xml and b.hibernate.cfg.xml. All datasource and other properties will be identical between these files except for the mapping file references.
It seems like a simple and common problem to want to load mappings from several jars into the same SessionManager. Is there an API to help me out?
|