Hello, I am looking up for the component interface from my servlet. Means that part of the code can be executed by many threads. I am using stateless session bean. Now say there are 2 sessions and 3 threads. 2 belongs to 1 client and another 1 to another client. My question is that in this situation how many EJBObjects will be created? Regards, Saurav
Some containers can have a 1:N relationship, where each EJB object is multithreaded (just like home objects). Other containers might have an M:N relationship, where M represents the number of EJB objects instantiated (and corresponds exactly to the number of clients currently connected), and N represents the number of bean instances in the pool.
IIRC, a 1:1 relationship is maintained by most containers.
Joined: Mar 31, 2005
Thanks and sorry for the delay.... Basically thats the relation between EJBObject and bean(if I got it right). But I wanted to know what will be the relation between client and ejbobject? Head first EJB says the relatio is 1:1. But I wonder what will be the case in case of threaded applications.