Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Confirmation Required

 
Gowher Naik
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Entity beans survive container crash.
Session beans and MDB does not survive container crash.
MDB are stateless.
 
Amol Nayak
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Entity beans survive container crash.
Session beans and MDB does not survive container crash.
MDB are stateless.


Entity beans are the in memory representation of some row of a table in DB.
Even if the server crashes the bean instance dies but the db still contains
the data, It can be reloaded from db when the server restarts.

Session beans especially Stateful beans contain the state of the client, if the server crashes the bean dies and the state it held is lost.

Message driven beans do not have any clients and are invoked by the server
on a message. Just a single message onMessage is invoked. It cannot hold any state as the server selects bean's instance at random and as there is no client there is no point in holding a particular state.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic