• 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
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
  • Jj Roberts
  • Al Hobbs
  • 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?
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic