As i known,when first client call a stateless session
);the container create a stateless session bean(newInstance();setSessionContext;ejbCreate(),something());when
second client(the same as firt) call a stataless session
bean,the container only run something() bessiness method.
it use the bean instance is the same first.
if many many client call the same stateless session bean
concurrently,the container use only one stateless session
bean instance,is it right? or the container create many
stateless session bean instance to response so many client
thanks for ur reply!
The application server can have a pool of stateless session beans and serve the clients requests.
In stateless session beans,
Container will create instance for every request..
Instances are depending on requests..
Hi Madhu RameshKumar
"Container will create instance for every request"
why the ejbCreate() is not invocked when second client
Actually, Madhu is not exactly correct here. Not all containers will create an instance on invocation of the create on the home. An ejbCreate is only invoked if the Container feels that existing resources are not enough for servicing the client. As far as possible the container tries to invoke the existing resources. Similarly when you invoke remove then the container might not remove the bean at all from memory.