cancel
Showing results for 
Search instead for 
Did you mean: 

difference between javabeans and enterprise javabeans

Former Member
0 Kudos

hi friends,

iam just new to EJB and want to learn the basic concepts of it... on my way to learn it i got some doubt.. that is WHAT IS THE DIFFERENCE BETWEEN JAVABEANS AND ENTERPRISE JAVABEANS??

i will be thankful to you if i could get a relative answer....

regards,

Pradeep

Accepted Solutions (1)

Accepted Solutions (1)

kishorg
Advisor
Advisor
0 Kudos

Hi Pradeep,

A Java Bean is a software component written in the Java programming language that conforms to the JavaBeans component specification. The JavaBeans APIs became part of the "core" Java APIs as of the 1.1 release of the JDK.

Enterprise JavaBeans (EJBs) are Java-based software components that are built to comply with Java's EJB specification and run inside of an EJB container supplied by a J2EE provider. An EJB container provides distributed application functionality such as transaction support, persistence and lifecycle management for the EJBs.

we can conclude this like this.

java bean is is not a distributed application , that

have existence within one application itself , means they are not reusable components (a component become reusable, if it is placed in one place and we can access that from there itself . in that sense it can be considered as not reusable).

EJB , is a distributed object ,means they can be deployed(installed on a central J2EE server)and can be accessed from any other applications(just like web services).

Java Beans are intra project units , EJBs are interproject ..my comment.

Regards

Kishor Gopinathan

Answers (3)

Answers (3)

Former Member
0 Kudos

Although both enterprise beans and JavaBeans™ components are written in the Java

programming language, they are not the same. You can use JavaBeans components

with design tools to customize instances of Java classes, and you can link the

customized objects through events. Enterprise beans, on the other hand, implement

distributed, container-managed transactional services for multiple users.

The design of the EJB tier carries the modularity and portability of Java components

several steps farther. For that reason, your job as an EJB developer is more modular:

You can focus more on the business data of an application than on distributed

computing. When you build an application using JavaBeans components, you must

also build the server framework. However, when you build an application on the

J2EE model using enterprise beans, the server-side infrastructure is already built into

the application server. You don’t need to provide generic services such as support

for transactions, security, or remote access.

Former Member
0 Kudos

An enterprise bean is a Java component, a set of Java interfaces and classes that

make up a business entity. These interfaces and classes contain methods that

implement business logic on an application server. One type of enterprise bean also

contains fields that can be mapped to database columns. Another type of enterprise

bean can manage interactions between other enterprise beans in the same

application. Enterprise beans can be combined with any of the different types of

components shown in FIGURE 1-1 to create applications.

Although both enterprise beans and JavaBeans™ components are written in the Java

programming language, they are not the same. You can use JavaBeans components

with design tools to customize instances of Java classes, and you can link the

customized objects through events. Enterprise beans, on the other hand, implement

distributed, container-managed transactional services for multiple users.

Former Member
0 Kudos

Pradeep,

there are some quite helpful FAQ pages from Sun:

<a href="http://java.sun.com/products/javabeans/faq/faq.enterprise.html">http://java.sun.com/products/javabeans/faq/faq.enterprise.html</a>

<a href="http://java.sun.com/products/javabeans/faq/faq.general.html">http://java.sun.com/products/javabeans/faq/faq.general.html</a>

<b>Quick summary</b>

Enterprise JavaBeans extends the JavaBeans component model to handle the needs of transactional business applications.

JavaBeans is a component model for visual construction of reusable components for the Java platform. Enterprise JavaBeans extends JavaBeans to middle-tier/server side business applications. The extensions that Enterprise JavaBeans adds to JavaBeans include support for transactions, state management, and deployment time attributes.

Although applications deploying the Enterprise JavaBeans architecture are independent from the underlying communication protocol, the Enterprise JavaBeans architecture specifies how communication among components maps into the underlying communication protocols, such as CORBA/IIOP.

regards

Sebastian