[jboss-dev-forums] [Clustering Development] - Re: Programatically identifying master/slave nodes in JBoss AS 7.1
Paul Ferraro
do-not-reply at jboss.com
Wed Aug 29 10:42:54 EDT 2012
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&containerType=14&container=2103]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20120829/93cc25cd/attachment.html
More information about the jboss-dev-forums
mailing list