This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Exception - HF EJB page 559

 
Sandesh Tathare
Ranch Hand
Posts: 82
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Pls refer to scenario listed on HF EJB page 559 as mentioned below:

Scenario:
Client Foo calls a method on a remote Stateful bean, while that same bean is already executing a methof for client Bar.

Answer:
Client Foo gets a RemoteException. A Session bean can handle only one client at a time.

But a stateful session bean is tied up with a particular client, isn't it? So how come a stateful bean tied up with client Foo is serving client Bar?

Can some one please explain?
 
Kathy Sierra
Cowgirl and Author
Rancher
Posts: 1589
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good question

A client could pass a component interface reference to another thread, for example, and as far as the Container is concerned, that's two separate clients. Or more likely, a Handle could be given to more than one client, and both clients could use that Handle to get a reference to the component interface, and then... you have the problem.

So, it's not very likely that this will happen, but it COULD happen, and the Container raises an exception.

cheers,
Kathy
 
Sandesh Tathare
Ranch Hand
Posts: 82
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Kathy for a detailed explaination. I got it clearly now.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic