Javatpoint Logo

91-9990449935

 0120-4256464

EJB Interview Questions

There is given EJB interview questions and answers that has been asked in many companies. Let's see the list of top EJB interview questions.


1) What is EJB?

EJB stands for Enterprise Java Bean. It is a server-side component to develop scalable, robust and secured enterprise applications in java. More details...


2) What are the types of Enterprise Bean?

There are 3 types of enterprise bean in java.

  1. Session Bean
  2. Message Driven Bean
  3. Entity Bean
More details...

3) What is session bean?

Session Bean encapsulates business logic. It can be invoked by local, remote or web service client.

There are 3 types of session bean.

  1. Stateless Session Bean
  2. Stateful Session Bean
  3. Singleton Session Bean
More details...

4) What is stateless session bean?

Stateless session bean is a business object that doesn't maintain conversational state with the client. More details...


5) What is stateful session bean?

Stateful session bean is a business object that maintains conversational state with the client. More details...


6) What is singleton session bean?

Singleton session bean is instantiated only once for the application. It exists for the life cycle of the application.


7) What is JMS?

Java Message Service is a messaging service to create, send and receive messages asynchronously. More details...


8) What are the advantages of JMS?

  • Asynchronous
  • Reliable
More details...

9) What is PTP model?

In Point to Point model, one message is delivered to one receiver only. Here, Queue is used as a message oriented middleware. More details...


10) What is Pub/Sub model?

In Publisher/Subscriber model, one message is delivered to all subscribers. Here, Topic is used as a message oriented middleware. More details...


11) What is MDB?

Message Driven Bean (MDB) encapsulates business logic. It is invoked by passing message. It is like JMS receiver. More details...


12) What is Entity Bean?

Entity Bean is a server side component that represents the persistent data. Since EJB 3.x, it is replaced by JPA. More details...


13) What is Session Facade?

Session Facade is a design pattern to access enterprise bean through local interface. It abstracts the business object interactions and provides a service layer. It makes the performance fast over network.