JavaBeans: JavaBeans 是Java 的可回收软件组件,通过使用构建器工具,可以根据特定约定直观地操作它。 JavaBeans 创建可以组合成小程序和应用程序的Java组件。为了作为单个 bean 对象而不是作为多个各自的对象传递,它们用于将许多对象封装到单个对象(bean)中。
Enterprise JavaBeans(EJBs) :EJBS 是服务器端程序,通常实现中间层业务性能。 Enterprise JavaBeans 旨在以 3 向模型处理诸如持久性、事务完整性和安全性等常见问题,这使程序员可以自由地专注于手头的特定问题。它通过 EJB-to-COBRA 映射与 COBRA、COBRA-HOP 兼容性紧密耦合。
JavaBeans 和 Enterprise JavaBeans(EJBs)的区别如下:
S.No. | JavaBeans | Enterprise JavaBeans |
---|---|---|
1. | Javabeans is a component technology to create universal Java components. | Even though EJB is a component technology, it neither reconstructs nor enhances the original JavaBean specification. |
2. | Beaninfo classes, property editors or customizers can be present in Javabeans. | No perception of Beaninfo classes, property editors or customizers is in Enterprise JavaBeans and no additional information is provided except that described in the deployment descriptor. |
3. | An external interface called a properties interface is given in JavaBeans, that allows a builder tool to describes the functionality of a bean. | A deployment descriptor is given in Enterprise JavaBeans to interpret the functionality to an external builder tool or IDE. |
4. | There is no further category of Java Beans. | Enterprise JavaBeans are categorized into two types – session beans and entity beans. |
5. | JavaBeans have not any definite support exists for transactions. | EJBs may be transactional and transactional support is provided by the EJB servers. |
6. | JavaBeans are designed for a single process and are localized | EJBs are remotely executable components or business objects. |
7. | JavaBeans may be visible or non-visible components.Visual GUI component (Button, listbox, graphics) are examples of JavaBeans. | An EJB is a non-visual isolated object. |
8. | JavaBeans has components bridges.A JavaBeans can also be arranged as an ActiveX control. | ActiveX controls are designed for the desktop so EJB cannot be deployed as an ActiveX control. |
9. | JavaBeans are mainly designed to run on the client side whereas one can develop server side JavaBeans. | EJBs are deployed on the server-side only. |