Hi, I did not understand because this question is false and true ? they are changed ??
1) The statement is true or false: If a stateless session bean client invokes create() method on the bean's home interface then it is guaranteed that a new stateless session bean instance will be created.
Reply: The statement is false
2) The statement is true or false: If a stateful session bean client invokes create<METHOD>(...) method on the bean's home interface then it is guaranteed that a new stateful session bean instance will be created.
Reply: The statement is true
[ May 12, 2006: Message edited by: Oelison Sousa ] [ May 12, 2006: Message edited by: Oelison Sousa ]
Joined: Feb 02, 2006
The answers are right.
Unlike the entity bean and stateful session bean, invoking the create() method for stateless bean does not result in a call to the bean's ejbCreate() method. In stateless session beans, calling the EJB home's create() method results in the creation of an EJB object for the client, but that is all. The ejbCreate() method of a stateless session bean is only invoked once in the life cycle of an instance--when it is transitioning from the Does Not Exist state to the Method-Ready Pool. It isn't reinvoked every time a client requests a remote reference to the bean.
[ UD: removed link to copyrighted material ]
[ May 12, 2006: Message edited by: wise owen ] [ August 03, 2007: Message edited by: Ulf Dittmer ]
Joined: Nov 14, 2005
Hi, When you call create() method on Stateless Session Bean, container wont create a new stateless session bean but it assigns an EJBObject to the client. So the answer is FALSE here.
But with Stateful session bean, when you call create method, the container actually creats a bean with the specied values in the create method's signature. So the answer in this case is TRUE.