Eric B.
Eric B.

Reputation: 24411

How to setup JBoss Clustering

I've been using Tomcat for years, but I have been put on a new project which will be using both JBoss 6 and Infinispan on EC2. I am new to both JBoss 6 and configuring it in a cluster. After having read around a lot, I am having a lot of difficulty finding good documentation explaining how / where exactly to configure JBoss/Infinispan to work in a cluster.

I understand that both JB and IS use JGroups for the cluster communication. I am very much interested in using JDBC_PING protocol ( http://community.jboss.org/wiki/JDBCPING ), as it sounds ideal for my needs. But my problem is that I just do not understand where/how to start configuring JBoss to use it (ie: which config files must be modified/etc).

Can anyone please point me in the right direction? I've already read through the JBoss AS 5.1 Clustering Guide ( http://docs.jboss.org/jbossclustering/cluster_guide/5.1/html/index.html ) but I am no further ahead understanding how to properly configure this. Any help and/or advice would be greatly appreciated!

Upvotes: 2

Views: 1700

Answers (1)

Paul Ferraro
Paul Ferraro

Reputation: 56

Actually, you'll probably have an easier time using S3_PING (written specifically for EC2) rather than JDBC_PING. In AS6, jgroups stack configuration is maintained in $JBOSS_HOME/server/all/deploy/cluster/jgroups-channelfactory.sar/META-INF/jgroups-channelfactory-stacks.xml. Infinispan cache configurations are maintained in $JBOSS_HOME/server/all/deploy/cluster/infinispan-cache-registry.sar/infinispan-configs.xml

Provided you obtain your EmbeddedCacheManager from the AS6 CacheContainerRegistry, the default "udp" stack will be used. To customize the stack for a given cache container, override the stack property. e.g.

<infinispan-config name="...">
  <infinispan xmlns="urn:infinispan:config:4.2">
    <global>
      <transport>
        <properties>
          <property name="stack" value="insert-stack-name-here"/>
        </properties>
      </transport>
      ...
    </global>
    ...
  </infinispan>
</infinispan-config>

Out of curiosity, why did you opt for AS6 instead of AS7?

Upvotes: 2

Related Questions