J2EE Interview Questions and Answers
Question - 91 : - What do you know about Hibernate?
Answer - 91 : -
Hibernate is an Object Relational Mapper framework in Java that provides a layer of abstraction for retrieving or modifying data in the database. It handles all the implementations internally and the developer need not worry about how the connections to the databases are made, how the data translation from Java application to Database and vice versa happens. Hibernate supports powerful object-oriented concepts like inheritance, association, polymorphism, compositions, collections that help in making queries using the Java approach by using HQL (Hibernate Query Language).
Question - 92 : - What are deployment descriptors used for?
Answer - 92 : -
Servlets are server-side components that aid in developing powerful server-side applications. Ther are servers that are platform-independent and follow various protocols as per the application design. The most commonly used protocol is the HTTP protocol. In Java, we can create servlets by implementing the Servlet interface that has 3 lifecycle methods - init, service and destroy - and we can use the below classes for implementing servlets:
- javax.servlet.http.HttpServletRequest
- javax.servlet.http.HttpServletResponse
- javax.servlet.http.HttpSession.
Question - 93 : - What is the functionality of ActionServlet and RequestProcessor?
Answer - 93 : -
- Receiving the HttpServletRequest
- Populating JavaBean from the request parameters
- Displaying response on the web page Issues
- Content type issues handling
- Provide extension points
Question - 94 : - What are advantages of Spring usage?
Answer - 94 : -
- Pojo based programming enables reuse component.
- Improve productivity and subsequently reduce development cost.
- Dependency Injection can be used to improve testability.
- Spring required enterprise services without a need for the expensive application server.
- It reduces coupling in code and improves maintainability.
Question - 95 : - What are the Benefits Spring Framework?
Answer - 95 : -
Lightweight container
Spring can effectively organize your middle tier objects
Initialization of properties is easy. No need to read from a properties file
application code is much easier to unit test
Objects are created Lazily, Singleton – configuration
Spring’s configuration management services can be used in any architectural layer, in whatever runtime environment