1 Reply Latest reply on Sep 8, 2008 10:15 AM by Dieter Cailliau

    jmx clustering

    Jon Loe Newbie

      hi all...i'm not sure this is the correct place to post this (let me know if not).

      i have jmx mbean right now that processes jobs for N applications. there are about 5 different jobs that it processes. the jmx mbean runs in a single jboss/vm instance currently.

      we're going to be moving to a clustered environment. i'm wondering if someone can point me to some documentation on what issues i may encounter.

      one of my concerns is how the jmx bean won't 'crash' into each other. for example, if one instance is processing a job, how does the other jmx bean instances know not to process the same job.

      maybe my question(s) are off base (my bad). i'm trying to figure out the issues involved (and coding/configuration changes) moving to a clustered environment.


        • 1. Re: jmx clustering
          Dieter Cailliau Newbie

          A simple load-balancing solution is to "schedule your jobs to the cluster" by posting your job-objects on a queue, and use an MDB to process these jobs. Jboss jms will load-balance the jobs over all available mdb's, and redeliver the job if a node dies during the handling.

          Note that you may want to restrict the nb of MDB's within each node to 1, using the maxSession attribute:

          @MessageDriven(activationConfig = { @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Topic"),
          @ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/jobs"),
          @ActivationConfigProperty(propertyName = "maxSession", propertyValue = "1")})