Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should a stateful session bean implements Serializable

I have a simple question but i can't find a answer for Java EE 6!

Should a stateful session bean implements Serializable or not?

I tested with and without implementing java.io.Serializable and there is no different and no errors.

My feeling tells me, that a stateful session bean MUST implements Serializable because it can be persisted in a long term session...

like image 634
Gatschet Avatar asked Feb 19 '14 13:02

Gatschet


1 Answers

No, it doesn't need to as the specification does not require that.

You may download and check the EJB specification from: https://jcp.org/en/jsr/detail?id=318

like image 100
peter.petrov Avatar answered Sep 29 '22 14:09

peter.petrov