This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes how ejb is related  for distributed appications ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "how ejb is related  for distributed appications ?" Watch "how ejb is related  for distributed appications ?" New topic
Author

how ejb is related for distributed appications ?

arpita kale
Greenhorn

Joined: Jun 13, 2007
Posts: 11
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 ?
Amit M Tank
Ranch Hand

Joined: Mar 28, 2004
Posts: 257
Hi Arpita,

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.

Regards,
Amit


Amit Tank
Linked In
Karan Kaw
Greenhorn

Joined: Jan 05, 2013
Posts: 11
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)
 
Consider Paul's rocket mass heater.
 
subject: how ejb is related for distributed appications ?
 
Similar Threads
What Is The Difference Between JavaBeans and EJB?
How to deploy ejb application on two jvms?
EJB usage
Separate Web Tier and Business Logic tier.
Where to Place Remote Objects in RMI