Originally posted by Naren Chivukula:
Hi,
Is a bean called stateless if it has single method? Is this criteria in determining a bean stateless or stateful? Can we find from a program whether the bean used stateless or stateful? Please clarify my doubts.
Thanks and regards,
Narendranath.
1. Stateful session bean maintains the Beans state in between the method invocations.
2.Choosing the type of session bean is not about the number of methods present in the bean.
Consider that the bean present with only one method. Client wants to call the same method again and again and he wants to maintain the state between the method invocation then in that case you have to go for stateful session bean. Otherwise you can go for stateless session bean as Stateless will be faster than Stateful session bean.
Regards,
M.S.Raman