The EnterpriseBean interface extends Serializable interface, and Bean class implements the Serializable through EntityBean or SessionBean interface. But the Bean class never travels over the network. The Bean class consists of call back methods which are called by
EJB container hence it can only run in the Server JVM. Then why do we need to have Bean class as Serializable?
This is what I feel
I think, when bean's activate and passivate method is called, bean has to store its state by persisting itself. As per
java specification, object must be serialized to persist.
But here again, one more question arises, activate and passivate method is useless for stateless session bean then why stateless session bean is serialized.
Prakash Dwivedi (SCJP2, SCWCD, SCBCD)
"Failure is not when you fall down, Its only when you don't get up again"