100% found this document useful (2 votes)
4K views

Difference Between Java Bean and EJB

JavaBeans are local components intended for the client side that may have visual components and additional metadata. EJBs are non-visual, remotely executable components that are deployed on the server side only and are transactional with support provided by the EJB container. While both are Java components, EJBs do not extend the JavaBeans specification and have additional requirements around their deployment descriptor and support for sessions and entities.

Uploaded by

Sudhanshu
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
4K views

Difference Between Java Bean and EJB

JavaBeans are local components intended for the client side that may have visual components and additional metadata. EJBs are non-visual, remotely executable components that are deployed on the server side only and are transactional with support provided by the EJB container. While both are Java components, EJBs do not extend the JavaBeans specification and have additional requirements around their deployment descriptor and support for sessions and entities.

Uploaded by

Sudhanshu
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

fference between Java Bean and EJB

JavaBeans Enterprise JavaBeans

JavaBeans may be visible or nonvisible An EJB is a nonvisual, remote object.


at runtime. For example, the visual
GUI component may be a button, list
box, graphic, or a chart.

JavaBeans are intended to be local to a EJBs are remotely executable


single process and are primarily components or business objects that can
intended to run on the client side. be deployed only on the server.
Although one can develop server-side
JavaBeans, it is far easier to develop
them using the EJB specification
instead.

JavaBeans is a component technology Even though EJB is a component


to create generic Java components that technology, it neither builds upon nor
can be composed together into applets extends the original JavaBean
and applications. specification.

JavaBeans have an external interface EJBs have a deployment descriptor that


called the Properties interface, which describes its functionality to an external
allows a builder tool to interpret the builder tool or IDE.
functionality of the bean.

JavaBeans may have BeanInfo classes, EJBs have no concept of BeanInfo


property editors, or customizers. classes, property editors ,or customizers
and provide no additional information
other than that described in the
deployment descriptor.

JavaBeans are not typed. EJBs are of two types—session beans


and entity beans.

No explicit support exists for EJBs may be transactional and the EJB
transactions in JavaBeans. Servers provide transactional support.

Component bridges are available for An EJB cannot be deployed as an


JavaBeans. For example, a JavaBean ActiveX control because ActiveX
can also be deployed as an ActiveX controls are intended to run at the
control. desktop and EJBs are server side
components. However, CORBA-IIOP
compatibility via the EJB-to-CORBA
mapping is defined by the OMG.
Component bridges are available for An EJB cannot be deployed as an
JavaBeans. For example, a JavaBean ActiveX control because ActiveX
can also be deployed as an ActiveX controls are intended to run at the
control. desktop and EJBs are server side
components. However, CORBA-IIOP
compatibility via the EJB-to-CORBA
mapping is defined by the OMG.

You might also like