EJB for J2EE,

Source: Internet
Author: User

EJB for J2EE,
EJBIt is sun's JavaEE server component model. Its greatest use is to deploy distributed applications. EJB standardizes the deployment and development of server components developed using java. With the advantages of cross-platform java, distributed systems deployed with EJB technology can be not limited to specific platforms.
EJBEnterprise JavaBean is a part of J2EE and defines a standard for developing multiple Enterprise applications based on components. It features network service support and core development tools (sdks ).

In J2EE, Enterprise Java Beans (ejbs) are called Java Enterprise Beans and are the core code of Java.

The EJB standard object types are Session Bean, Entity Bean, and MessageDriven Bean ).

1. Session BeanIt is used to implement business logic, including stateful Session bean and stateless Session bean. Each time a client requests a Session Bean, the container selects a Session Bean to serve the client. Session Bean can directly access the database, but in more cases, it will implement data access through Entity Bean.
2. Entity BeanIt is a domain model object used for O/R ing. It maps table records in the database to Entity objects in the memory. In fact, creating an Entity Bean object is equivalent to creating a new record, deleting an Entity Bean deletes corresponding records from the database at the same time. When an Entity Bean is modified, the container automatically synchronizes the status of the Entity Bean with the database.

3. MessageDriven BeanIs a new enterprise Bean introduced in EJB2.0. Based on JMS messages, it can only receive and process JMS messages sent by the client. MDB is actually an asynchronous stateless Session Bean. After the client calls MDB, it does not need to wait and returns immediately. MDB processes client requests asynchronously. This is suitable for scenarios where requests need to be processed asynchronously, such as order processing. This avoids the client from waiting for a method call for a long time until the returned result is returned.

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

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.