EJB advantages and limitations

What are the advantages of EJB model?

1. The development of EJB applications is easy as the business logic is separated by the application developer and at the same time the developer can utilize the services of the EJB container.

2. EJB are components, where the EJB vendors vend these components which encapsulate the functionality according to the need. Application development made easy as the EJB specification ensures the usability of beans developed by others can also be used in a specific application.

3. The isolation of labor in developing, deploying, administering, providers made it faster to develop an EJB application.

4. The major operations of managing transactions, state, multithreading, connection pooling etc. will be managed by the EJB container. The security is also provided by the EJB container.

5. The EJB architecture is compatible with other APIs like servlets and JSPs.

What are the limitations of EJB models?

1. The no file I/O is a security concern. By loading files using Class.getResource() and bundling non-EJB config files with EJB-jar.

2. While mapping a CMP bean with SQL Server database, a field of float type need to be mapped with database column of type FLOAT only, not for REAL.

3. A table which has a multi-column primary key and one or more foreign keys which share any one of the primary key columns, then the foreign keys must contain columns which are not of primary key or exactly the same primary key columns.

4. For Example: the two columns that comprises a primary key are A and B. Then the columns that comprises a foreign key are column A and column B or column C and column D, but certainly not column A and column D or column B and column C or column A and column C or column B and D.

5.While using root-leaf approach in order to map inheritance, the foreign-key constraints are to be removed from the database for avoiding referential integrity related issues. The same process is to be followed while using secondary maps with multiple tables.
EJB session beans
EJB session beans - What are the session beans? Explain the types of session beans, What are the steps involved in developing a stateless session bean?, Describe the lifecycle of stateless session beans, What are the steps involve in developing a stateful session beans, Describe the lifecycle of stateful session beans.
EJB Entity beans
EJB Entity beans - What are Entity beans? Explain the need of entity beans, Explain the types of Entity beans. Explain their uses, Explain the steps involve in developing Entity beans, What are the steps involve in deployment of CMP and BMP entity beans, Explain the lifecycle of entity beans.
EJB 2.0 Entity Model
EJB 2.0 Entity Model - Explain the advantages of EJB 2.0 container-managed persistence over bean-managed persistence, Explain the types and role of abstract methods in EJB 2.0 persistence, Explain the structure of EJB query language (EJB QL)
Post your comment