4 Replies Latest reply on Aug 1, 2013 9:37 AM by rhusar

    AS7 Clustering basics

    suikast42

      Hi,

       

      I'm have no expirience with Jboss clustering and have some basic questions:

       

      1. I see @Clustered annotaion for EJB's. What happend wiith the EJB's which are not annoted with @Clustered?

      2. What about CDI Beans in a cluster?

      3. What happens if my host controller is down?

      4. If the hostcontroller is down can say to an another slave node that should work as a hoscontroller or is the hostcontroller single point of failure ?

      5. What about hibernate level2 cahce ?

       

      Thanks in Advance

        • 1. Re: AS7 Clustering basics
          pferraro

          1. When @Clustered is applied to a @Stateful EJB, then that EJB's state is made available to other nodes in your cluster.  When @Clustered is applied to a @Remote interface of a session EJB (either stateful or stateless) then remote clients will gain failover support (for @Stateful EJBs) and dynamic load balancing support (for @Stateless EJBs).

          2. You cannot inject remote references to managed beans via CDI.  For that you need EJBs.  Otherwise, I don't understand your question.

          3. If your host controller is down, you will be unable to manage the server instances that it started.  This does not affect the ability of these server instances to serve application requests.

          4. See #3.

          5. That depends on how you're using it.  If you're using hibernate via JPA (e.g. via persistence.xml), then invalidations to your 2nd level cache will automatically broadcast to other nodes in your cluster.  If you're using hibernate natively, then you'll need to configure the appropriate region factory to get this behavior. See: https://docs.jboss.org/author/display/AS71/JPA+Reference+Guide#JPAReferenceGuide-UsingtheInfinispansecondlevelcache

          • 2. Re: AS7 Clustering basics
            pferraro

            2. Perhaps you were referring to things like @SessionScoped beans?  Since these beans are placed in the HTTP Session, they get replicated along with everything else.

            • 3. Re: AS7 Clustering basics
              suikast42

              Hi Paul,

               

              thanks for your response.

               

              Yes I meant the CDI-Backing beans on JSF side. I assume your answer is valid for another CDI scopes too?

              • 4. Re: AS7 Clustering basics
                rhusar

                Yes I meant the CDI-Backing beans on JSF side. I assume your answer is valid for another CDI scopes too?

                If by another you specifically mean @ConversationScoped then yes.

                 

                Note that @ApplicationScoped is per application (as in EAR) per JVM, so you can't use that as cluster-wide singleton.