[jboss-dev-forums] [Clustering Development] - Calls to clustered EJB not balanced

Grischa Paul do-not-reply at jboss.com
Fri Dec 16 07:42:49 EST 2011


Grischa Paul [http://community.jboss.org/people/grischa.paul] created the discussion

"Calls to clustered EJB not balanced"

To view the discussion, visit: http://community.jboss.org/message/641952#641952

--------------------------------------------------------------
Hi, 
I have an application using EJB 2.1 Message Driven Beans and JMS to perform load balanced asynchronous (long running) processes in a cluster. This part I wanted to replace by EJB 3 Stateless Session Beans with an @Asynchronous method annotation, to be able to throw out all the JMS code and configuration requirements.
I tried JBoss 6.1, running the "all" server on two machines, which are able to detect each other and distribute my deployment without problems. From a client application I call a session bean method, which invokes multiple times the asynchronous method of another session bean by its remote view. Unfortunately all invokations are retrieved on the same node, instead of distributing some of them to the second node.
The session bean class to be balanced has the @Clustered annotation (without arguments, to use the default round robin and default partition). I tried to obtain the beans remote instance in three ways: per injection (@EJB annotation), by SesstionContext.lookup and by a InitialContext.lookup using all the JNDI propertites (provider url, context factory etc.). Nothing worked.

Another problem I encountered is that the Future#cancel(true) method does not work in 6.1, SessionContext.wasCancelCalled() does not return true (it works in 7.1).

I tried also to set up a 7.1. cluster by starting two standalone servers with --server-config=standalone-ha.xml, but there is no message that they can find each other, and deployments are not distributed. But here I wait patiently for the documentation :-)

Thanks in advance for any hint to solve this problem(s).
Newbie Grischa
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/641952#641952]

Start a new discussion in Clustering Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2103]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20111216/d0a225d2/attachment.html 


More information about the jboss-dev-forums mailing list