In RMI the stub generated using the server is sent to the client side so as to facilitate the client object locate the remote server object.
But In EJB, all the files are packaged into a single jar file then how does a client get to know about the methods and properties of the remote server class. Should we send any files to the client side. If yes, please tell me how to do it.
For example, I have deployed a EJB on one Weblogic 5.1 server and my client(a servlet) is running in another Weblogic 5.1 Server.
you would need at least the Home and Remote/Local Interface for the client to call the methods in the EJBs.
Thanks for your response. Can u please tell me how do u send the home and remote interfaces to the client. Should u package it into another jar and send to client or is there any other way for doing this. Please explain what u have said.
I think the deployment tools allow you to generate a specific jar for the client. This contains only the subset of the classes required at the client. I'm pretty sure I saw an option for this on the Weblogic deployment tool.
As an architect, I don't do this stuff much, but check it out.
If the client is running a webapp put the EJB-necessary files(Home/Remote) in a jar under the WEB-INF/lib directory. You also want any related classes that the EJB is using as well in this jar.