In some articles on different sites i read that we only serialize/deserialize the state of object.On the deserialization side actual class definition should be present.
If that is the case, In case of EJB then how we get the Ejb home and ejb remote implementaion from server(which is on remote machine) as on client side we just have home and remote interfaces.
In addition to the home and remote interfaces, you need “stub” implementations of those classes on the client. These are generated in a vendor-specific way during application deployment, or in same cases, they are generated dynamically on the client. In any case, the server-side implementation is never needed on the client: when a method is invoked on a stub, the method request is sent over the network, and the server executes the logic when it receives it.