• 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 ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Tim Cooke
  • Bear Bibeault
  • paul wheaton
Saloon Keepers:
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Mikalai Zaikin
  • Piet Souris

Session in stateful session bean

Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
There's a city wid manhunt for this tiny ad:
Low Tech Laboratory
    Bookmark Topic Watch Topic
  • New Topic