This content has been marked as final.
Show 1 reply
-
1. Re: Programatically identifying master/slave nodes in JBoss AS 7.1
pferraro Aug 29, 2012 10:42 AM (in response to jbosss)There isn't really a master/slave distinction in AS7, except for usage of SingletonService. You could, given some channel, indicate which node is the cluster coordinator. The easiest way to do this is via Infinispan.
e.g.
@Resource(lookup = "java:jboss/infinispan/container/some-container-name")
private EmbeddedCacheManager container;
public boolean isCoordinator() {
return this.container.isCoordinator();
}
As for determining whether the node is running in standalone or domain mode, I'm not entirely sure. Try asking on the main AS7 user forum.