Paul Ferraro [
https://community.jboss.org/people/pferraro] created the discussion
"Re: Programatically identifying master/slave nodes in JBoss AS 7.1"
To view the discussion, visit:
https://community.jboss.org/message/756778#756778
--------------------------------------------------------------
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.
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/756778#756778]
Start a new discussion in Clustering Development at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]