Intel 8085 Question:
Download Questions PDF

Just by seeing the signature of the bean how can you specify whether it is a Stateful or Stateless Session Bean?

Answer:

The create method in a stateless session bean cannot have arguments, and can only have a single method called create(). While create in Stateful bean can have arguments and could be any method starting with create string eg. create<method>(arg1, arg2,...). Although it is not compiler checked but in stateless bean the ejbPassivate() and ejbActivate() methods has to be empty as these functions are never called by EJB container. As conceptually in stateful session bean we might need to store the clients information hence arguments in create<method> are necessary. While in stateless bean we don't, hence no arguments are necessary. It's intutive isn't. I my life I haven't seen such a futuristic server programming tool as EJB.

Download 8085 Interview Questions And Answers PDF

Previous QuestionNext Question
Difference between Java Beans & Servlets?What is the purpose of reserved word using in C#?