Top Most EJB Interview Questions For Freshers
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.
Session Bean
Message Driven Bean
Entity Bean
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.
Stateless Session Bean
Stateful Session Bean
Singleton Session Bean
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
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.
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.
11) What is MDB?
Message Driven Bean (MDB) encapsulates business logic. It is invoked by passing message. It is like JMS receiver.
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.
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.