M
mingclee1
Hi,
didn't really know where to post this J2EE question. Please let me
know if you think there is a better group.
I understand why we need to have separate instance for each stateful
session bean. But don't understand why servlet & stateless session
bean. In the servlet container, why does it need to have a servlet
pool? I thought there is only one instance per servlet in the servlet
container, and every request (thread) just access that single servlet
instance. That is why servlet is not thread safe. Is this wrong?
Also, why do we need a pool of instance for stateless session EJB? Why
can't we just keep one instance and call the instance everytime? It is
stateless, so it's always thread safe right?
Thanks
didn't really know where to post this J2EE question. Please let me
know if you think there is a better group.
I understand why we need to have separate instance for each stateful
session bean. But don't understand why servlet & stateless session
bean. In the servlet container, why does it need to have a servlet
pool? I thought there is only one instance per servlet in the servlet
container, and every request (thread) just access that single servlet
instance. That is why servlet is not thread safe. Is this wrong?
Also, why do we need a pool of instance for stateless session EJB? Why
can't we just keep one instance and call the instance everytime? It is
stateless, so it's always thread safe right?
Thanks