Hi Jaikiran and community!
This is in continued reference to my late question in
The selectNode() method of an implemented ClusterNodeSelector isn't called despite its constructor being found and executed.
JBoss AS 7.1.2.Final
- An EAR (sample-jee.ear) deployed on two separate AS instances. This EAR contains clustered EJB:s (by anotation).
- An EAR (sample-jee-client.ear) deployed on a separate AS instance. This EAR contains a Servlet that calls an EJB in the cluster.
To reproduce the behavior perform the following steps...
1. Download the sample project from
2. Run 'mvn install' to build the project (from its root directory)
3. Create a user 'admin' with password 'admin2'.
For this example it's been created both for Management and Application realms.
4. Copy the attached standalone-xml to JBOSS_HOME/standalone/configuration/
It is a standard standalone-xml equiped with the needed server-klient--to--server communication setup.
5. Start the following three AS 7.1.2.Final servers as instructed
$JBOSS_HOME/bin/standalone.sh -Djboss.socket.binding.port-offset=0 --server-config standalone-ha.xml -Djboss.node.name=node1
$JBOSS_HOME/bin/standalone.sh -Djboss.socket.binding.port-offset=500 --server-config standalone-ha.xml -Djboss.node.name=node2
$JBOSS_HOME/bin/standalone.sh -Djboss.socket.binding.port-offset=1000 --server-config standalone.xml -Djboss.node.name=client1
6. Deploy the EAR of the sample-jee-server-ear project (sample-jee/sample-jee-server-ear/target/sample-jee-server.ear) in node1 and node2
This will create a set of clustered EJB:s
7. Deploy the EAR of the sample-jee-client-project (sample-jee/sample-jee-client-ear/target/sample-jee-client.ear) in client1
8. From a browser use the URL:
9. Look at the console output of client1.
I get an output saying that the constructor is executed...
***** RoundRobinClusterNodeSelector created
...but no more messages are displayed from the selector as (successful) calls are being made.
It should show lines starting with:
All things work fine (clustering, communication, failover etc) except for the invocation of my implemented ClusterNodeSelector.selectNode()-method.
But the strange thing is that the constructor of my ClusterNodeSelector is called but not the selectNode()-method!
-So the class is (probably?) configured and instantiated correctly?
The selector class is located in
and it is configured in
standalone.xml 16.3 K