You can call an EJB on another node, except if that EJB is deployed on the node 
making the call.  If the EJB is available locally, JBoss will detect that and 
optimize the call by routing it to the local bean. In that case your caller 
wouldn't be able to spread the calls to other nodes in the cluster.  If you 
need a workaround for that, see "Why are calls between clustered session beans 
not load balanced even though load balancing policy is Round Robin?" on 
http://wiki.jboss.org/wiki/Wiki.jsp?page=ClusteringFAQ.

If your client needs to use HA-JNDI to find things on other nodes in the 
cluster, that's fine.  Just don't configure your context via a jndi.properties 
file.  Populate a Map with the key/value pairs you listed and call new 
InitialContext(Map).  You can even externalize the key/value pairs into a 
.properties file and programatically read in the properties.  Just don't name 
the file jndi.properties. If you put a file named jndi.properties on the 
classpath, it may be picked up by all sorts of other code and break their JNDI 
usage.

You can use JMX to invoke on specific nodes.  To make remote JMX calls, use the 
RMIAdaptor (http://wiki.jboss.org/wiki/Wiki.jsp?page=UsingTheRMIAdaptor).  But 
you'd need to know the address/port JNDI is using on each node in order to find 
that node's RMIAdaptor.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4126577#4126577

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4126577
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to