3 Replies Latest reply on Feb 13, 2015 11:19 AM by igarashitm

    HA singleton service with JPA binding

    jokser

      Hi everyone,

       

      I have a service with JPA binding and 2 Switchyard instances deployed to cluster (Wildfly 8.1). Currently they works simultaneously and selects same entities. It's incorrect and I want to make this service as HA singleton (like in wildfly-quickstart cluster-ha-singleton). Initially route from JPA component should startup only on master node and after shutting down master node this route should startup on slave node and so on.

       

      Could anybody advice how can I implement this behavior?

        • 1. Re: HA singleton service with JPA binding
          jorgemoralespou_2

          Without giving it much thought I would recommend you to have your services register an event observer, an in in finispan atomic lock and binding startup/shutdown via the binding mbean.

          I don't think it's something trivial, but I think can be done.

           

          Hope it helps.

          1 of 1 people found this helpful
          • 2. Re: HA singleton service with JPA binding
            jokser

            Thank you.

            I just thought that I can use some features from Switchyard (e.g. sca-clustered option) to implement this behavior. So do you plan to add a feature as marking service as ha singleton (with some additional options) to Switchyard? Or I must solve every problem associated with clustering and failover by myself?

            • 3. Re: HA singleton service with JPA binding
              igarashitm

              We don't have any plan to have HA feature in SwitchYard, as we expect that kind of feature would be supported by container. There used to be a ha-singleton service in JBossAS itself, which supports any type of deployment, but on WildFly8 all I could find is this, take a look at "New Singleton Service Builder API" in following link:

              Clustering Changes in WildFly 8

               

              It looks you need to implement MSC service to achieve it, but is still worth to try IMHO.

               

              hth,

              Tomo