Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

How to have EJBs call other EJBs in clustered environment

Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Our set up has two WS 4.0.6 app servers with separate Apache web servers that have the WS plug-in in front and a load balancer in front of the web servers. The load balancer is set up to have session affinity, where it will send input from a session always to the same web server. All the .ears are on both app servers.

The problem is when we have a statefull session bean in one .ear try to call a stateless session bean in another .ear. The statefull session bean is using localhost to look up the stateless session bean in the JNDI tree. In the above setup sessions that go to one of app servers work and sessions that go to the other don't. WS resource analyzer shows that the second EJB is only instantiated on the machine that works. The sessions that don't work seem to be able successfully return from creating the second EJB but get a CORBA error indicating that it can't find the destination class when we try to make a call on the second EJB. If we take one of the app servers down everything works just fine.

We are assuming at this point that the problem is in the JNDI lookup. Is using localhost correct? If not, what should we use? Are we even on the right track?
I wish to win the lottery. I wish for a lovely piece of pie. And I wish for a tiny ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic