As far as i've understood http://jira.jboss.org/jira/browse/JBAS-3241 and the referenced topics it seems as if due to the optimization of the InvokerInterceptor all calls to stateless session ejbs are processed inside the same VM as long as the EJB is available in that VM.
I think that this is worth an entry in all the documentation around EJB 2.1 loadbalancing that the optimization simply disables loadbalancing (e.g. http://wiki.jboss.org/wiki/Wiki.jsp?page=EjbLoadBalancingPolicies
or http://docs.jboss.org/jbossas/jboss4guide/r4/html/cluster.chapt.html). Please correct me if i'm wrong on this or if i've missed any hint in the documentation about this issue).
Second question: What we want to achieve is the following behaviour: round-robin distribution local-node->remote-node1->....->remote-node-n->local-node with "optimized" calls to the local node.
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=83207 suggests to write an own InvokerInterceptor that says local=false but i wonder if the local-node is ever hit then and i assume that all calls are routed then to the remote-nodes. Or is the MarshalledInvoker also using the local-node (with RMI serialize-/deserialize overhead costs) ?