[jboss-user] [Clustering/JBoss] - Hibernate SessionFactory w/ JBossAS Cluster

aminlalji do-not-reply at jboss.com
Fri Feb 9 09:54:21 EST 2007


I am trying to understand the operation of hibernate in a clustered  JBoss environment.

Consider the following setup:

2 JBossAS servers (load balanced vis mod_jk2) using Hibernate for persistence w/ JBossCache enabled.

Scenario 1: SERVER1 decides to act upon an object and works with it in cache. The JBossCache notifies all other caches that exist on other cluster nodes of any changes (really just sends invalid/expire notifications). Everything remains in sync... I think. What happens if SERVER2 also concurrently decides to act upon the same object? I assume the isolation level configured in the SessionFactory has a role to play in determining the resultant behaviour (and I assume the isololation levels should also match) to keep things in sync.

The alternative to this scenario is using a "clustered" SessionFactory that is shared by all nodes of the cluster (via JNDI) ... I'm not sure which scenario described above is A) Valid, and B) Best Practice and C) even Possible...

Any ideas?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4013652#4013652

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4013652

More information about the jboss-user mailing list