I am fairly new to JBoss Server. I am playing around with clustering instances on the same machine. I have the clustered environment up and running, but I was wondering if my 2 jboss instances try to bind the Object(eg:Hashtable) with same JNDI name with HA-JNDI at the same time, will I have concurrency issues? Like for instance:
this code is executed parallelly by both server instances at the same time
Hashtable Ob=new Hashtable();
Will I run into concurrency issues?
take a look at http://community.jboss.org/wiki/JBossHAJNDIImpl
In your HA-JNDI-Case you should setup a HA Singleton MBean that gets activated, when the other cluster node goes down. So you would rebind anything that is necessary for a failsafe operation. A better approach to some serialized data would be JBoss TreeCache (Replicated) or InfiniSpan.