What is the difference between EJB and Java Bean?

Source: Internet
Author: User

Java Beans are reusable components. Generally, Because Java Beans are created by containers (such as Tomcat), Java Beans should have a no-argument constructor, generally, Java Bean must implement the serializable interface to realize bean persistence.

Enterprise Java Bean distributed component. It is based on Java remote method call (RMI) technology, so EJB can be remotely accessed (cross-process, cross-computer ). However, EJB must be deployed in containers such as webspere and weblogic. The EJB client never directly accesses the real EJB component but accesses it through its container. The EJB container is the proxy of the EJB component. The EJB component is created and managed by the container. The customer accesses the real EJB component through the container.

EJB is developed using the javax. EJB package and is an inter-process component. EJB has good stability when distributed processing is required;

Javabean is developed using Java. Beans packages. Javabean is an in-process component. Although remote method calls can be implemented through RMI, the stability is not as good as that of EJB. Therefore, EJB is selected when distributed processing is required.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.