From: Gavin_King/Cirrus%<CI...@ci...> - 2002-07-16 00:34:34
|
>Only if everything is in one big EJB jar file. If they are split between >seperate EJB jar files, then there is still a problem. > >If one was to put mappings in seperate files for each class (like the >eg/Foo.hbm.xml and eg/Bar.hbm.xml example in the docs), you could wait to >load the mapping for a class until the class was first accessed. That >might fix the problem. Remember that Hibernate will let you have multiple instances of SessionFactory. It would seem sensible to have a different SessionFactory for each EJB jar. So, drawing up a little requirements list, we need a JMX interface to Hibernate that lets us: 1. manipulate all properties dynamically at runtime 2. configure multiple SessionFactory instances with specified mappings 3. start and stop the Hibernate "service" (ie. register and deregister the SessionFactories in JNDI) 4. actually build the SessionFactory when it is first used issues: 1. might require some modification to how certain properties are currently managed by Hibernate (the system-level properties). 4. will require some kind of trickery with a delegating class since the javax.naming.event package has no objectLookedUp() event. Now, is the best way to support multiple SessionFactories to allow multiple instances of the MBean, or should a single MBean manage all the factories? Can anyone think of any other issues/requirements? P.S. I would like this MBean to be generic - useable by other JMX applications apart from JBoss. (I think it is, anyway.) John, may I add your class to a new package cirrus.hibernate.jmx in CVS? |