Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Fooling Websphere's smart client stubs : invoking ejb method on all clustermembers

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am using Websphere 6.0 and ejb 2.0 and a WebStart client.
I have 2 appservers running in one cluster on different nodes.
What I want to achieve, is to have a particular ejb method to be invoked on both appservers.
(Normally, because of the WorkLoad Management facility in Websphere, any remote ejb-call will result into only one of the appservers executing this method.)

This is what I tried to 'bypass' this WLM for this particular ejb-method call :

On the client I perform two lookups of the ejb, each time with a different InitialContext to connect to each specific appserver.
My code to create the InitialContext is as follows:



The values for providerUrl are
  • corbaloc::hostNameAppServer1:nodeAgent1Port
  • corbaloc::hostNameAppServer2:nodeAgent2Port

  • (nodeAgentXPort is the bootstrap port of the nodeagent on which appServerX is running.)

    I then look up the ejb ref on each InitialContext and invoke the ejb method on each ejb ref.

    When I run this code, most of the times both method calls are directed to the same appserver.

    It seems like Websphere's "smart client stubs" cannot be fooled and still load balance whether I like it or not.

    Any ideas on how I could bypass the workload manager for this particular ejb ?


    thanks.






    reply
      Bookmark Topic Watch Topic
    • New Topic