Forums Register Login

Stateful/Stateless session beans

+Pie Number of slices to send: Send
Hi,

I'm a beginner in EJB. Can some one tell me how does a stateful session bean stores it's state and why the stateless session bean doesnot even though it has ejbActivate() and ejbPassivate() methods?

It would be of nice help if you could provide me with some useful links of basics of ejb.

Thanks in advance.

Raju Vemula.
+Pie Number of slices to send: Send
A state of a stateful session bean is persisted by serializing it. From that point, it is up to the app server what it does with the data. For example, it could be stored in a file, or in a database.

Stateless session beans have ejbActivate and ejbPassivate, but those methods are never called. Also, from one call to another you are not guaranteed to be sent to the same instance of a stateless bean

Look around the Java Ranch site for tutorials and stuff for learning EJB. You could also download the EJB spec from here.
Don't mess with me you fool! I'm cooking with gas! Here, 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 383 times.
Similar Threads
How to persist a Stateless Session Bean over several jsp pages?
Session bean without EJB environment
HttpSession and Session Bean
HttpSession and Session Bean
Stateless Session Facade
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 16:18:03.