Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

Eddi Alfare
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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 ?


    Consider Paul's rocket mass heater.
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!