how session beans handle threads
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Abhishek_Thakur
Posted On:   Monday, September 5, 2005 12:55 AM



If same ejb object is used by two-three threads then how
instances of session beans are handled

Re: how session beans handle threads

Posted By:   Jani_Kaarela  
Posted On:   Wednesday, September 7, 2005 03:23 AM


Session beans don't handle threads, their container does. Stateless session beans are by definition re-entrant and thus thread-safe, allowing the container to use any instance for any client. Stateful session beans, on the other hand, are always bound to a specific client session and only accessible by it and whichever thread (for efficiency, there probably isn't a 1:1 relation between clients and threads) is currently serving that particular client. So, no threading issues here, either.



For more information, see the EJB spec.

About | Sitemap | Contact