tags:

views:

420

answers:

1

Hi all. 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.

+1  A: 

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.

Steve