• +91 9971497814
  • info@interviewmaterial.com

EJB Interview Questions Answers

Question 1 : What are the two important TCP Socket classes?

Answer 1 : 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.

Question 2 : What technologies are included in J2EE?

Answer 2 : 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.

Question 3 : What is the difference between EJB and Java beans?

Answer 3 : EJB is a specification for J2EE server, not a product; Java beans may be a graphical component in IDE.

Question 4 : What is EJB role in J2EE?

Answer 4 : EJB technology is the core of J2EE. It enables developers to write reusable and portable server-side business logic for the J2EE platform.

Question 5 : Tell me something about Local Interfaces.

Answer 5 : EJB was originally designed around remote invocation using the Java Remote Method Invocation (RMI) mechanism, and later extended to support to standard CORBA transport for these calls using RMI/IIOP. This design allowed for maximum flexibility in developing applications without consideration for the deployment scenario, and was a strong feature in support of a goal of component reuse in J2EE. Many developers are using EJBs locally, that is, some or all of their EJB calls are between beans in a single container. With this feedback in mind, the EJB 2.0 expert group has created a local interface mechanism. The local interface may be defined for a bean during development, to allow streamlined calls to the bean if a caller is in the same container. This does not involve the overhead involved with RMI like marshalling etc. This facility will thus improve the performance of applications in which co-location is planned. Local interfaces also provide the foundation for container-managed relationships among entity beans with container-managed persistence.

Question 6 : What is Enterprise JavaBeans (EJB) container?

Answer 6 : It manages the execution of enterprise beans for J2EE applications. Enterprise beans and their container run on the J2EE server.

Question 7 : What is in-memory replication?

Answer 7 : 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.

Question 8 : What is Ripple Effect?

Answer 8 : The process of propagating the changes in the properties of a server group during runtime to all the associated clones is called Ripple Effect.

Question 9 : What is a Clone?

Answer 9 : 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.

Question 10 : What are the types of Scaling

Answer 10 : 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.



EJB Contributors


Share your email for latest updates


Our partners