Friday, December 14, 2007

Jboss - Disable cluster

It could happen that you have two instances of Jboss running inside the same network. By its default configuration Jboss will start to search for other instances around and if it found one it will start clustering. If you want to avoid this you can simply modify the mcast_port or the mcast_port. To do this first you have to identify where this parameters are confiugred:

abba@MyHost /jboss/server/all/deploy $ grep -r mcast *.xml

Doing like that you will have something like this:

cluster-service.xml: UDP mcast_addr="${jboss.partition.udpGroup:228.1.2.3}" mcast_port="5566"

cluster-service.xml: ip_ttl="${jgroups.mcast.ip_ttl:8}" ip_mcast="true"

cluster-service.xml: mcast_recv_buf_size="2000000" mcast_send_buf_size="640000"

ejb3-clustered-sfsbcache-service.xml:

ejb3-clustered-sfsbcache-service.xml: mcast_send_buf_size="150000" mcast_recv_buf_size="80000" ucast_send_buf_size="150000"

ejb3-entity-cache-service.xml:

ejb3-entity-cache-service.xml: mcast_send_buf_size="150000" mcast_recv_buf_size="80000" ucast_send_buf_size="150000"


Now you will have to modify all this file. In my case you can already see that compared to the default jboss configuration I've changed the mcast_port. You will have also to modify another file:

abba@MyHost /jboss/server/all/deploy $ vi META-INF/jboss-service.xml

No comments: