3

I need to parallelize the asynchronous invocation of several different EJBs, in each one I need to call a transactional method. I'm using a clustered installation of WebLogic as my deployment environment, and ideally I'd like to distribute the workload across different threads in different nodes of the cluster.

After finding previous posts on the subject I guess that using Work Managers might be a viable alternative for my environment, but after reading the documentation I'm left with a couple of questions, I'd be very thankful if someone with more experience using Work Managers can shed some light on these:

  1. Is it possible to implement the Work interface in an EJB, in such a way that when the run() method gets called, it can invoke one of the transactional methods of that EJB? I'm interested in asynchronously and concurrently invoking several EJBs, each one representing a different unit of work, but I don't know if the Work Manager will propagate the required execution context to my EJBs.
  2. If I configure a global Work Manager, when I use it does it take care of automatically distributing the workload across all the nodes in my cluster? or all the Works sent to it will be executed in the same cluster node, although in different threads? - if that's the case, how could I parallelize my workload in such a way that all the nodes in my cluster get their share of the work?

Also, it'd be great if someone can suggest a different alternative (instead of using Work Managers), as long as the requirements in the first paragraph of this question are met.

Community
  • 1
  • 1
Óscar López
  • 232,561
  • 37
  • 312
  • 386
  • 1
    Global Work Managers wont distribute workload across the cluster, those are only per server. How are the EJB clients looking up the Cluster - if it's via a common DNS, then the Weblogic cluster round-robins by default across all nodes. http://docs.oracle.com/cd/E11035_01/wls100/cluster/load_balancing.html#wp1008605 – JoseK Sep 13 '12 at 09:49
  • Also see http://middlewaremagic.com/weblogic/?p=980#comment-5773 – JoseK Sep 13 '12 at 09:50
  • @JoseK The comments above were helpful. Could you expand them a bit more, as an answer? I'll accept it ;) – Óscar López Feb 12 '14 at 19:38

0 Answers0