wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes EJB - A Component Architecture 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 "EJB - A Component Architecture" Watch "EJB - A Component Architecture" New topic
Author

EJB - A Component Architecture

Vishal Vohra
Greenhorn

Joined: Jun 03, 2008
Posts: 8
Hello,

I have just started exploring EJB.
The first thing which I have read about EJB in every book, is that "EJB's are components and EJB's provide component architecture".
What does it mean? What are components?
Some people say that since EJB's run in a container, that is why, they are called components. But then, JAVA Beans are also called components and they do not run in any container.
So what does component architecture exactly mean?

The features that EJB provide can also be provided by coding in a plain JAVA class, then what is there in EJB's, that make them components.
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
The Enterprise JavaBean framework enables application developer's to build software components.

For example, a set of four Session EJB and twenty Entity EJB could be organized into an Accounting component. Another set of five Session EJB and ten Entity EJB could be organized into a Administration component. You could then organized these "components" into a comprehensive enterprise solution, i.e. component-based architecture.

A newer paradigm, which is an evolution of component-based architectures, is service-oriented architectures (SOA). Enterprise solutions based on a well-designed SOA are typically more flexible than those based on components. Existing components can be "service enabled" and transformed into enterprise services. (Check out BPML for more info.)

The features that EJB provide can also be provided by coding in a plain JAVA class, then what is there in EJB's, that make them components.


This is not accurate and a misrepresentation of EJB technology. EJB features cannot be coded in a single Java class. There are many, many elements of the Enterprise JavaBean programming model. For example, there is all the code in the application server that maintins the EJB container and provides a runtime execution environment for EJBs. Then there is all the application server code that handles deployment and administration of EJBs. Then there is all the application server code that handes ORM for Entity EJB including SQL engines. Then there is all the application server code that handles Message-Driven EJB and message queues and brokers. Then there is more code that handles declarative security and transaction managment features.

Again, as mentioned, these EJB features could not be coded in a single Java class.
[ December 29, 2008: Message edited by: James Clark ]
 
wood burning stoves
 
subject: EJB - A Component Architecture
 
Similar Threads
JSP vs JSF ?!!
Deployment query
What is a component?
difference b/w EJB ,servlets
Guess my questions was too DIFFICULT ?