Technical interview questions and answers are crucial for clearing an EJB Interview because Enterprise JavaBeans are widely used in enterprise-level, distributed, and transactional applications. Companies evaluate your understanding of session beans, entity beans, message-driven beans, JNDI, lifecycle methods, and container-managed transactions. These concepts often appear in Java developer interviews conducted by TCS, Wipro, Infosys, Cognizant, and Accenture. For freshers and job seekers planning to enter Java-based development roles, EJB forms an important part of backend and enterprise Java interviews. This guide provides the most frequently asked EJB interview questions with answers, explained in simple language to help you understand real-time use cases. Preparing these questions will help you succeed in technical rounds and placement tests focused on Java EE technologies.
Java developers should also master J2EE concepts and explore J2SE fundamentals for comprehensive enterprise development expertise
Showing 10 of 54 questions
1. What are the two important TCP Socket classes?
Socket and ServerSocket.
ServerSocket is used for normal two-way socket communication. Socket class allows us to read and write through the sockets. getInputStream() and getOutputStream() are the two methods available in Socket class.
2. What technologies are included in J2EE?
The main technologies in J2EE are: Enterprise JavaBeansTM (EJBsTM), JavaServer PagesTM (JSPsTM), Java Servlets, the Java Naming and Directory InterfaceTM (JNDITM), the Java Transaction API (JTA), CORBA, and the JDBCTM data access API.
3. What is the difference between EJB and Java beans?
EJB is a specification for J2EE server, not a product; Java beans may be a graphical component in IDE.
4. What is EJB role in J2EE?
EJB technology is the core of J2EE. It enables developers to write reusable and portable server-side business logic for the J2EE platform.
5. What is Enterprise JavaBeans (EJB) container?
It manages the execution of enterprise beans for J2EE applications.
Enterprise beans and their container run on the J2EE server.
6. What is in-memory replication?
The process by which the contents in the memory of one physical m/c are replicated in all the m/c in the cluster is called in-memory replication.
7. What is Ripple Effect?
The process of propagating the changes in the properties of a server group during runtime to all the associated clones is called Ripple Effect.
8. What is a Clone?
The copies of a server group are called Clones. But unlike a Server Group Clones are associated with a node and are real server process running in that node.
9. What are the types of Scaling
There are two types of scaling: Vertical Scaling and Horizontal Scaling.
Vertical Scaling - When multiple server clones of an application server are defined on the same physical m/c, it is called Vertical Scaling. The objective is to use the processing power of that m/c more efficiently.
Horizontal Scaling - When Clones of an application server are defined on multiple physical m/c, it is called Horizontal Scaling. The objective is to use more than one less powerful m/c more efficiently.
10. What is a Server Group?
A server group is a template of an Application Server(and its contents) i.e, it is a logical representation of the application server. It has the same structure and attributes as the real Application Server, but it is not associated with any node, and does not correspond to any real server process running on any node.