4 Replies Latest reply on May 18, 2012 12:20 AM by gajendra083

    HA Service ?

    gajendra083

      Jboss as7 support HA Service, if not then by when we can get this service ?

        • 1. Re: HA Service ?
          pferraro

          Can you be more specific?  What specific functionality are you looking for?  Are you simply looking for a mechanism to make cluster-wide remote procedure calls?  e.g.

          https://github.com/jbossas/jboss-as/blob/master/clustering/api/src/main/java/org/jboss/as/clustering/GroupRpcDispatcher.java

          • 2. Re: HA Service ?
            gajendra083

            Hi Paul,

             

            I am migrating my project from Jboss 4 to Jboss 7.

             

            One of my class is using HAServiceMBeanSupport Management Bean for an HA-Service to provide a convenient common base for cluster symmetric MBeans.. This class is also a user transparent extension of the standard NotificationBroadcasterSupport to a clustered environment. Send notice to people listening to JBossCache that something was invalidated and using a cache name and fingerprint to ensure that:

            1) only a cache that's named the same as this one will process the event

            2) that some cache instance doesn't process its own invalidation message

             

            Let me know if you need further details.

             

            Thanks,

            Gajendra


            • 3. Re: HA Service ?
              pferraro

              OK - you seem to be describing 2 different use cases.

               

              1. A clustered jmx notification mechanism.  The base class of HAServiceMBeanSupport, i.e. ServiceMBeanSupport doesn't exist in AS7 - therefore nor does HAServiceMBeanSupport.  At its essence, HAServiceMBeanSupport is just a mechanism for sending RPCs, for which the GroupRpcDispatcher can be used to broadcast events received via the javax.management.NotificationListener interface to the other nodes in the cluster.

               

              2. Cache invalidation events.  AS7 uses Infinispan in place of JBoss Cache.  Handling remote cache entry invalidation events is really quite simple.

              e.g.

               

              {code}

              @org.infinispan.notifications.Listener

              class MyObject<K, V> {

                @Resource(lookup="java:jboss/infinispan/cache/mycontainer/mycache")

                private org.infinispan.Cache cache;

               

                @PostConstruct

                public void init() {

                  this.cache.addListener(this);

                }

               

                @PreDestroy

                public void destroy() {

                  this.cache.removeListener(this);

                }

               

                @org.infinispan.notifications.cachelistener.annotation.CacheEntryInvalidated

                public void invalidated(org.infinispan.notifications.cachelistener.event.CacheEntryInvalidatedEvent<K, V> event) {

                  if (!event.isPre() {noformat}&&{noformat} !event.isOriginLocal()) {

                    // Handle remote invalidation event

                  }

                }

              }

              {code}

              1 of 1 people found this helpful
              • 4. Re: HA Service ?
                gajendra083

                Thanks Paul