EJB vs Rmi comparison
On higher level if we analyze EJB say statelessEJB Bean , its seems to be that ejb framework created out of RMI API's. Reason why i am saying this :-
IN RMI also ae have remote interface. on naming lookup we get the stub which gives a call to skelton which internally calls to remote object.
In EJB we have home interface and remote interface whose i开发者_Python百科mplementation are provided by ejb container( which looks like nothing but stubs) on calling create on home interface it gives the remote object on which as per me will give the call to skelton which internally calls the session object.
Please let me know if above comparison makes sense?
Yes, the EJB specification has always required RMI compatibility (and some application servers are built on top of CORBA). Prior to EJB 3.0, remote EJBs were required to have component interface that extends EJBObject (thus java.rmi.Remote), and all methods were required to throw java.rmi.RemoteException. In fact, local interfaces didn't exist in earlier specification versions. The EJB specification attempted to simplify RMI by allowing a container to manage the lifecycle and scalability of remote objects. (Of course, it also had other non-remoting goals.)
精彩评论