5 Replies Latest reply on Sep 1, 2003 7:53 AM by adrian.brock

    Access to objects in a cluster

    twutort

      I'm new to Jboss and had a question on clustering. Is there a way that you can get access to all invocations of a class across a cluster? On our old server we had to bind a jndi name to the object on a cluster at startup. Then we'd iterate through each object for each cluster and grab it using RMI.

      Is there an eaiser, or better, way to do this in jboss? We use this for things such as clearing our cache, changing log levels, etc...

      Thanks,
      Tim

        • 1. Re: Access to objects in a cluster

          Look at jboss's clustering framework.

          If you write to this framework,
          you can invoke methods on a cluster (either
          synchronously or asynchronously)

          Alternatively look at something like Jetty's session replication.
          This uses an entity bean to replicate sessions.
          Instead of using the JDBC persistence manager it
          uses a persistent manager that replicates the state to
          all nodes in the cluster.

          Regards,
          Adrian

          • 2. Re: Access to objects in a cluster
            twutort

            Can I use this framework to get individual information on each node in a cluster? We want to do things like change the log level on and individual node or view the cache on an individual node.

            To do this before we had map the logging object on each node in weblogic to a jndi name and access that name from our servlet for whatever node we wanted info on.

            • 3. Re: Access to objects in a cluster

              To do aggregation you would have to create an object that
              is replication, similar to jetty's session store I mentioned before.

              The object would have to include the node name in it
              somwhere.

              You can do the same in jboss as you do in weblogic using
              HAJNDI

              Regards,
              Adrian

              • 4. Re: Access to objects in a cluster
                twutort

                Thanks! I have another question....Is there a method to get a list of all nodes in a cluster at runtime?

                • 5. Re: Access to objects in a cluster

                  It is on the partition mbean. See http://localhost:8080/jmx-console

                  Regards,
                  Adrian