Using a SessionFactory in a WebLogic Cluster
If you’re trying to bind a Hibernate SessionFactory to a WebLogic cluster and you’re getting the following error message:
“Conflict start: You tried to bind an object under the name [{factory.name}] in the JNDI tree. The object from [{factory.name}] is non-clusterable, and you have tried to bind more than once from two or more servers. Such objects can only be deployed from one server.”
You may want to add this to you hibernate.cfg.xml file:
<property name="hibernate.jndi.weblogic.jndi.replicateBindings">false</property>
This has worked for me with WebLogic 8.1, and it is probably applicable to other WebLogic versions as well. While I haven’t come across any solid documentation which states that the SessionFactory is not a clusterable object, it appears that this is the case. This isn’t a big deal however, especially if you’re not using a second-level cache. If you need to use a second-level cache, you’ll want to use a cluster-aware cache such as JBoss Cache or Tangosol Coherence.





Recent Comments