Hello!
I'm using jboss 3.2.2 with hibernate 2.1. All the documentation I found told me, the use of hibernate within jboss works like this:
I register the hibernate service by creating a directory (e.g. "hibernate.sar") in the deploy-directory of my jboss server and put some config files into it. Well, this was no problem and I got a little test project working.
But, what I don't like at the current scenario is that it seems to me, I've to register all mapping-xml-files in {jboss}/server/default/deploy/hibernate.sar/META-INF/jboss-service.xml. Is there a way to decentralize the registration of mappings? I mean to configure the hibernate service in a way, it automatically registers all hbm.xml-files that are deployed?
Because in the documentation of Configuration it's written that a SessionFactory is immutable, I think there is no way to register mappings after I looked up the SessionFactory from JNDI?!
I hope that you understand what I mean. A central xml-config with thousands of _manually_ registered mapping files looks quite ugly to me and I can't believe that this is the preferred way to use hibernate in jboss.
Thousand thanks for a quick reply!
Best regards, Marco ;-)
|