Tuesday, October 13, 2015

EJB Interview Questions and Answers

1. What is EJB?
Enterprise Java Beans are the server side components that run inside the EJB container and encapsulates the business logic of an enterprise application.
2. What is a J2EE container?
Containers are the interface between a component and the low level platform specific functionality that supports the component. The application server maintains control and provides services through an interface or framework known as a container.
3. What are the types of J2EE container types according to J2EE specification?
There are five defined J2EE container types (three server side and two client side). Three server side containers are as follows:
  • The server itself, which provides the J2EE runtime environment.
  • An EJB container to manage EJB components.
  • A web container to manage servlets and java server pages.
Two client side containers are as follows:
  • An application container for standalone GUIs, console, and batch type programs.
  • An applet container, meaning a browser, usually with the java plug-in.
4. what is a J2EE component and what are its types?
It is a self-contained functional software unit that is assembled into a J2EE application with its related classes and files and that communicates with other components. There are three types of components: 
  • Client components, which correlate to the client containers. 
  • Web components - Servlets and JSPs. 
  • EJB components - are business components that run on the server, which is logic that solves or meets the needs of a particular business domain such as banking, retail, or finance.
5. what are the characterestics of EJB?
  • It hides server side system level issues from developers.
  • It defines a standard component architecture.
  • It can be easily integrated with other EJB components.
  • It enables you to create components and applications that are reusable across various J2EE-compliant servers.
Example: Online Share Trading, Online Library Application, Online Reservation System.
6. what are the controversies with EJB 2.x?


Controversies With EJB 2.x :

  • It is too heavy-weight Its programming model is complex.
  • It does not let you test the code easily.
7. what are the features of EJB 2.0?
Features of EJB 2.0:
  • Integrated support for JMS
  • Support for local interfaces.
  • It's architecture is improved and supports Container Managed Persistence.
  • It supports container managed relationships among entity beans.
  • Enterprise JavaBeans Query Language (EJB QL).
  • Home methods for entity beans.

No comments: