This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of Testing JavaScript Applications and have Lucas da Costa on-line!
See this thread for details.
Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript 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
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Session in stateful session bean

Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From HFEJB page 559, the 3rd Client Scenario, state that:

"Client Foo calls a method on a remote stateful bean, while that same bean is already executing a method for client Bar"
The answer is:
"Client Foo gets a RemoteException (if client Foo had been local, he'd get an EJBException). A session bean handles only one client at a time!"

i wonder under what cases do this scenario will happen?
In my understanding, stateful session bean only serve one client, the client who does the creation of this bean. So how can there be another client?

Best thing I can imagine right now is that the EJBObject is passed to other client as a return value or argument. So there are 2 clients who can invoke methods on the same EJBObject. But if this is what happened, how does the container managed the session? One session id to handle 2 clients? Isn�t that awkward?
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic