-
Feature Request
-
Resolution: Obsolete
-
Major
-
JBossAS-4.0.4.GA
-
None
We have an ear which contains a set of modules and multiple hibernate session factories (via Hibernate MBean). The complication is that a session factory might need hbm files from multiple modules. This is not possible now since the Hibernate MBean will scan either only the har module or the complete ear.
So it would be nice if the JBoss Hibernate MBean would provide the option to specify which modules (jars) of the ear must be scanned for hbm mapping files.
Now, we can't use the option of having multiple *.har modules in the *.ear, with one *.har for each session factory. We have different projects and each project leads to an artifact (eg. jar, har,sar,...). Some of those projects must use the same session factory, but the mapping files are distributed over multiple artifacts (projects). So it's not possible to have *.har for each of the session factories. Also if we should stick to the *.har, we should split every project into a 'persistence unit' (-> the har) and a 'ejb' jar (which contains the ejb3 session beans etc..). We also don't want to have one project for things that correspond to one session factory. There are different sets of mapping files that are maintained by different teams, but actually belong to the same session factory.
The alternative would be to have a *.ear for each session factory and then turn on the scanning of the entire *.ear.
But to me it seems better to have one *.ear that contains multiple modules and multiple session factories + the option for each session factory to indicate which modules should be scanned for mapping files.