EJB3.0- Converting MDB stateless bean to stateful bean

ejb-3.0

I am new to EJB, and I have a question regarding MDB.

How do I convert MDB stateless beans to stateful beans? Options:

  1. using bean passivation only.
  2. using bean activation only.
  3. using both activation and passivation.
  4. None of the above.

Thanks in advance.

Best Answer

The answer is 4) None of the above.

There is no "Stateful Message Driven Bean". A Message Driven Bean is always stateless, because it cannot hold a conversational state. It's like a stateless bean with the difference, that it handles JMS messages.

If you are a beginner, the free book Mastering EJB may help you to understand EJB more in detail.

Related Topic