Forums Register Login

Surviving a Container Crash

+Pie Number of slices to send: Send
Hello

I am very confused as to how to answer the question which types of EJB can survive a Container Crash. There are contradictions in opinions even within this forum. Does anyone know what answer will be seen as correct on the exam?

So far Entity Bean seems like a certainty to survuve and Stateful Session Bean not to survive. But I've seen conflicting opinions on whether Stateless Session Beans or MDBs survive. Help!
+Pie Number of slices to send: Send
Hi Claire

Entity Beans: survive container crash because an entity bean is saved as a record in the database.

Stateless/Stateful Session Beans / Message-driven Beans: do not survive container crash.

Thanks

-- Ravi
+Pie Number of slices to send: Send
Thanks for clearing that one up Ravi.
+Pie Number of slices to send: Send
Perhaps by understanding/knowing why does entity beans survive container crashes, you would find no confusion anywhere.

Entity beans represent an entity in the underlying store (usually a database). In the simplest example, an entity bean could be representing a single row in a table in our database.

So what if our web/application server crashes? When we get it up again, the entity bean could simple fetch the data from the database again, because, the crash of the web/application server is not tied to the database. Unless, of course, our database crashes, then the entity bean cannot get back its value (but you could backup & restore your database).

Think about session beans & MDBs. Do you store any of the state that they carry in any form of persistent storage? Nope. They're all in the heap. Memory.

HTH.
Let's get him boys! We'll make him read this tiny ad!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1199 times.
Similar Threads
Question on exercise pg 108 HFE
Mock exam question
Entity Bean - Container Crash
EJB Server crash.
Confirmation Required
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 19, 2024 08:00:31.