Why Deployment Node Selector is not being invoked in JBoss EAP 7?
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 7.x
Issue
After configuring Deployment Node Selectorin one node it is not being invoked, why?
Resolution
One can use the tags deployment-node-selector class for Deployment Node selector and the tag cluster-node-selector class for ClusterNodeSelector.
However, there are some limitations when using both:
If there is one remote server, then Deployment Node Selector is not invoked because there is no decision to be made as there is only one node.
If there are more than 1 servers (not clustered), then Deployment Node Selector would be invoked, so when there is only one connection listed, there is no decision needed and it is not invoked. If the remote connection is to a server that is in a cluster, then Deployment Node Selector is not invoked, it invokes instead Clustered Node Selector.
Example of configuration below:
<?xml version="1.0" ?>
<configuration>
<jboss-ejb-client xmlns="urn:jboss:wildfly-client-ejb:3.2">
<connections>
<connection uri="remote+http://10.10.10.10:8080"/>
</connections>
<invocation-timeout seconds="10"/>
<deployment-node-selector class="com.example.LoadFactorNodeSelector" />
<cluster-node-selector class="com.example.AllClusterNodeSelector" />
<!--global-interceptors>
<interceptor class="com.example.ejb.client.ExampleClientInterceptor"/>
</global-interceptors-->
<max-allowed-connected-nodes nodes="15"/>
</jboss-ejb-client>
</configuration>
See configure EJB Cluster Node Selector / Deployment Node Selector in EAP 7.1 and later for more information on DeploymentNodeSelector and ClusterNodeSelector.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.