-
1. Re: AS7 Clustering basics
pferraro Jul 26, 2013 11:52 AM (in response to suikast42)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 Jul 26, 2013 12:06 PM (in response to suikast42)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 Jul 29, 2013 3:12 AM (in response to pferraro)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 Aug 1, 2013 9:37 AM (in response to suikast42)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.