Originally posted by ALaxmi Shankaran:
In one interview ,interviewer asked me one question as....
Why we require two seperate interfaces as home and remote?
Can't we declare the methods (we do in remote) in the home interface only?
I answered that to hide the business methods from the client,
as the client has direct access only to the home interface..
Is it correct?
Please guide me.
Hi,
a) The Home Interface methods are implemented in the Container and EJB Container will control the Bean Life cycle methods.
b) The Remote Interface methods are implemented in the Beans Stub object (i.e EJB Object), EJB Container uses this ejbObject to service the client request (i.e to service the business methods).
I am not 100% sure about my answer. If wrong, I hope someone will correct it.
Regards,
M.S.Raman