I'm just thinking about Hibernate integration into different app servers. For JBoss you can install it as a service, which is nice because you see it at the JMX management console and can change certain values at runtime.
These central integrations have certain disadvantages. You are bound to an specific application server (JBoss). You are in trouble if multiple applications from different sources with different versions of Hibernate run on the same server. Not to mention the naming conflicts, classloader and hot deployment issues that may arise.
What are the disadvantages of a Hibernate instance for every application? You will probably need more memory because the libraries are duplicated. The management issue should be solvable if the SessionFactory registers itself as a JMX MBean/JNDI resource. What I don't know is, if the JTA integration still works if Hibernate is more or less a simple library.
|