Hello Everybody I have one conceptual question here.I want to know how ejb is related to distributed technology.I read from internet.I got the following points from internet. After client server model,there are some disadvantages for client-server model.Therefore multitier application also called as distributed applications required to developed.In a multi-tier application, only the user interface stays on local machines while the logic of the application runs in the middle tier on a server. The final tier is still the stored data. When the logic of an application needs updating, changes are made to the software of the middle tier on the server, greatly simplifying the management of updates.But creating reliable, secure, and easily managed distributed applications is notoriously difficult. For example, managing transactions over a distributed system is a major task. Fortunately, using components that follow the EJB specification to build distributed systems relieves much of the burden.
If I develop webapplication...then jsp of applicataion is presentation part....classes will contain business logic part and database will reside on some anoather machine...So my war file will contain all .class files and jap files.I will deploy the war file on server say websphere.Then here the application becomes 3 tier.I can access the application from machine if I provide url and portno of that application.Then here where the concept of EJB requires.EJB uses RMI mechanism ...here where the remote method invocation requires...In which case differents jvms will be required?and Rmi and Ejbs will be required???I want an example about it.?what do you mean by component model ?
I am preparing for scbcd.But before starting i am not getting the purpose of EJB itself.Everywhere it is explained in verymuch technical terms.I am not able to get it properly.CAN ANYBODY CLERIFY THIS TO ME ?
EJB is an extension of RMI. RMI means remote method invocation. So suppose you have a RMI client and a RMI server (both running in different JVM, may or may not run on the same machine) then they are called distributed. If you have your entire code in a war then everything is local, there is no concept of distributed computing here.
By component based architecture it means that you have your application divided in different components. Each component (Ear or EJB) can be separately deployed in a standalone EJB Container. Your War can be a different component deployed in a different server like tomcat in machine 1 and it would do a lookup to use EJBs deployed in different app server on machine2.
You will have a better understanding if you could work out small examples of RMI in 2 machines.
Client Server typically means "Web Browser(Thin Client)===========WebServer(JSP)/Database"
EJB is distributed because it is roughly 3 Tier
Browser =====================JSP/Web MVC=============Pojo/Bean/Model(EJB/MDB)==========Database
EJB is distributed because Usually we have separate JVMs for Web and EJB Containers
RMI was used to call remote methods on different JVM just like EJB but Major Differnce is That EJB = RMI+Container Provided Services/Lifecycle/Transaction
RMI = one JVM called diferent Class method running in different VM and Developer was responsible for everything.
RMI uses IIOP(CORBA Compliant means .NET services)/JRMP(All In Java)