I am using JBoss 4.0.4RC1 and trying to leverage round-robin load balancing for 
dividing up work that needs to be performed server side.  My approach is to 
have two EJB classes: EJBWork, and EJBWorker.  EJBWork will get though HA-JNDI 
a reference to EJBWorker and submit parts of the job to execute to that bean.  
There is only one instance of EJBWork in the cluster, and many instances of 
EJBWorker.  Using the smart stub returned from HA-JNDI, the EJBWork bean will 
distribute the job among the cluster nodes that have the EJBWork bean deployed.

As per the JBoss documentation, EJBWork looks up EJBWorker using the HA-JNDI 
port passed to the InitialContext:


  | Properties p = new Properties();
  | 
p.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
  | p.put(Context.URL_PKG_PREFIXES, "jboss.naming:org.jnp.interfaces");
  | p.put(Context.PROVIDER_URL, "localhost:1100");
  | return new InitialContext(p);
  | 

My problem is that EJBWork never gets the smart stub and delegates work only to 
the EJBWorker bean that is deployed in the same JBoss instance.  After looking 
though the forums I found this post:

http://www.jboss.com/index.html?module=bb&op=viewtopic&t=14030

I may be reading this incorrectly, but it seems to me that using load balancing 
from the client side works, but does not work from the server side.  Am I 
correct?


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3925702


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to