I'm running JBoss 3.2.3 with 2 nodes in the default partition.  I have configured a 
stateless session bean for clustering (with the default RoundRobin load-balancing 
policy).  When invoking the session bean from a client (outside of container JVM), the 
load-balancing works fine.  Each call to the session bean alternates between nodes as 
expected.  However, when invoking the methods on the same session bean from within a 
message-driven bean, the calls are not load-balanced.


  | public void onMessage(Message message)
  |     {
  |     try
  |       {
  |       MapMessage mapMessage = (MapMessage) message;
  |       String testMsg = mapMessage.getString("Test");
  | 
  |       InitialContext ctx = new InitialContext();
  |       TestSessionHome home = (TestSessionHome) PortableRemoteObject.narrow
  |                   ( ctx.lookup ("TestSession"), TestSessionHome.class);
  |       TestSession session = home.create();
  |       session.test(testMsg + "A");
  |       session.test(testMsg + "B");
  |       }
  |     catch (Exception e)
  |       {
  |       e.printStackTrace();
  |       }
  |     }
  | 

The session bean simply logs the message to the System.out.  Both A and B messages are 
always processed by the same node.  I would have expected one node to process message 
"A" while the other node processes message "B".

Is it possible to have load-balanced session bean calls within the container?  I've 
read thru the JBoss clustering documentation a few times and didn't find any 
solutions.  Thanks in advance for the help.

<a 
href="http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3827235#3827235";>View 
the original post</a>

<a 
href="http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3827235>Reply 
to the post</a>


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to