Hi,
I encountered a similar issue on JBoss 7.1.3. I'm running a clustered SLSB EJB on 2 local AS environments.The "ejb" cluster is created, but the configured cluster node selector is not invoked.Instead, the EJB client uses the deployment selector (the LocalEJBReceiverPreferringDeploymentNodeSelector). Tested also with a standalone client, with the same behaviour (deployment selector invoked instead of the cluster one).Below are the relevant listing for the server's log, and the configuration for the ejb-client.
The bean is a simple @Clustered SLSB:
@Clustered
@Stateless(name = "HATestInvokerEJB")
@Remote(HATestInvoker.class)
public class HATestInvokerEJB implements HATestInvoker {
private static final Logger LOG = Logger.getLogger(HATestInvokerEJB.class);
@Override
public void testInvocation(String source) {
LOG.info(String.format("[HATestInvokerEJB invocation] SOURCE[%s] HOST[%s]" , source, ClusterTools.NODE_NAME));
}
}
Am I missing something in the configuration?
10/28-13:16:19,766 INFO [org.jboss.as.clustering] (Incoming-4,null) JBAS010225: New cluster view for partition ejb (id: 1, delta: 1, merge: false) : [nodeA/ejb, nodeB/ejb]
10/28-13:16:19,768 INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (Incoming-4,null) ISPN000094: Received new cluster view: [nodeA/ejb|1] [nodeA/ejb, nodeB/ejb]
10/28-13:16:22,230 DEBUG [org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver] (Remoting "nodeA" task-10) Received module availability report for 6 modules
10/28-13:16:22,256 DEBUG [org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver] (Remoting "nodeA" task-10) Registering module EJBModuleIdentifier{appName='', moduleName='ROOT', distinctName=''} availability for receiver context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext@1dbd4351, receiver=Remoting connection EJB receiver [connection=Remoting connection <58923439>,channel=jboss.ejb,nodename=nodeB]}
10/28-13:16:22,281 DEBUG [org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver] (Remoting "nodeA" task-10) Registering module EJBModuleIdentifier{appName='luc-core-ear', moduleName='luc-oauth-server', distinctName=''} availability for receiver context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext@1dbd4351, receiver=Remoting connection EJB receiver [connection=Remoting connection <58923439>,channel=jboss.ejb,nodename=nodeB]}
10/28-13:16:22,285 DEBUG [org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver] (Remoting "nodeA" task-10) Registering module EJBModuleIdentifier{appName='luc-core-ear', moduleName='luc-core-web', distinctName=''} availability for receiver context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext@1dbd4351, receiver=Remoting connection EJB receiver [connection=Remoting connection <58923439>,channel=jboss.ejb,nodename=nodeB]}
10/28-13:16:22,286 DEBUG [org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver] (Remoting "nodeA" task-10) Registering module EJBModuleIdentifier{appName='luc-core-ear', moduleName='luc-connectivity-ejb', distinctName=''} availability for receiver context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext@1dbd4351, receiver=Remoting connection EJB receiver [connection=Remoting connection <58923439>,channel=jboss.ejb,nodename=nodeB]}
10/28-13:16:22,297 DEBUG [org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver] (Remoting "nodeA" task-10) Registering module EJBModuleIdentifier{appName='luc-core-ear', moduleName='luc-core-ear', distinctName=''} availability for receiver context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext@1dbd4351, receiver=Remoting connection EJB receiver [connection=Remoting connection <58923439>,channel=jboss.ejb,nodename=nodeB]}
10/28-13:16:22,346 DEBUG [org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver] (Remoting "nodeA" task-10) Registering module EJBModuleIdentifier{appName='luc-core-ear', moduleName='luc-webui', distinctName=''} availability for receiver context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext@1dbd4351, receiver=Remoting connection EJB receiver [connection=Remoting connection <58923439>,channel=jboss.ejb,nodename=nodeB]}
10/28-13:16:22,348 DEBUG [org.jboss.ejb.client.ClusterContext] (ejb-client-cluster-node-connection-creation-4-thread-1) org.jboss.ejb.client.ClusterContext@7386ec69 Added a new EJB receiver in cluster context ejb for node nodeB. Total nodes in cluster context = 2
10/28-13:16:22,396 TRACE [org.jboss.ejb.client.remoting.ChannelAssociation] (Remoting "nodeA" task-11) Received message with header 0x15
10/28-13:16:22,524 DEBUG [org.jboss.ejb.client.remoting.ClusterNode] (Remoting "nodeA" task-11) Checking for a match of client address /127.0.0.1 with client mapping ClientMapping{sourceNetworkAddress=/0:0:0:0:0:0:0:0, sourceNetworkMaskBits=0, destinationAddress='192.168.5.83', destinationPort=4647}
10/28-13:16:22,528 DEBUG [org.jboss.ejb.client.remoting.ClusterNode] (Remoting "nodeA" task-11) Client mapping ClientMapping{sourceNetworkAddress=/0:0:0:0:0:0:0:0, sourceNetworkMaskBits=0, destinationAddress='192.168.5.83', destinationPort=4647} matches client address /127.0.0.1
10/28-13:16:22,531 DEBUG [org.jboss.ejb.client.remoting.ClusterNode] (Remoting "nodeA" task-11) Checking for a match of client address /127.0.0.1 with client mapping ClientMapping{sourceNetworkAddress=/0:0:0:0:0:0:0:0, sourceNetworkMaskBits=0, destinationAddress='192.168.5.83', destinationPort=4547}
10/28-13:16:22,537 DEBUG [org.jboss.ejb.client.remoting.ClusterNode] (Remoting "nodeA" task-11) Client mapping ClientMapping{sourceNetworkAddress=/0:0:0:0:0:0:0:0, sourceNetworkMaskBits=0, destinationAddress='192.168.5.83', destinationPort=4547} matches client address /127.0.0.1
10/28-13:16:22,538 DEBUG [org.jboss.ejb.client.remoting.ClusterTopologyMessageHandler] (Remoting "nodeA" task-11) Received a cluster node(s) addition message, for cluster named ejb with 2 nodes [ClusterNode{clusterName='ejb', nodeName='nodeB', clientMappings=[ClientMapping{sourceNetworkAddress=/0:0:0:0:0:0:0:0, sourceNetworkMaskBits=0, destinationAddress='192.168.5.83', destinationPort=4647}], resolvedDestination=[Destination address=192.168.5.83, destination port=4647]}, ClusterNode{clusterName='ejb', nodeName='nodeA', clientMappings=[ClientMapping{sourceNetworkAddress=/0:0:0:0:0:0:0:0, sourceNetworkMaskBits=0, destinationAddress='192.168.5.83', destinationPort=4547}], resolvedDestination=[Destination address=192.168.5.83, destination port=4547]}]
<jboss-ejb-client xmlns="urn:jboss:ejb-client:1.2">
<client-context>
<clusters>
<cluster name="ejb" security-realm="ejb-security-realm" username="cluster" cluster-node-selector="test.core.ha.TESTClusterNodeSelector">
<connection-creation-options>
<property name="org.xnio.Options.SSL_ENABLED" value="false" />
<property name="org.xnio.Options.SASL_POLICY_NOANONYMOUS" value="false" />
<property name="org.xnio.Options.SASL_POLICY_NOPLAINTEXT" value="false" />
<property name="org.xnio.Options.SASL_DISALLOWED_MECHANISMS" value="JBOSS-LOCAL-USER" />
</connection-creation-options>
</cluster>
</clusters>
</client-context>
</jboss-ejb-client>
The jboss-ejb-client does not have a specific ejb-receiver as I'm using the cluster nodes both as "client(s)" and "server(s)".
Thanks,
Bogdan