Interview Questions and Answers for 'NexThoughts' | Search Interview Question - javasearch.buggybread.com
Javasearch.buggybread.com

Search Interview Questions


 More than 3000 questions in repository.
 There are more than 900 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

   



Interview Questions and Answers for 'NexThoughts' - 3 question(s) found - Order By Newest

Frequently asked question in companies using Hibernate.
  Q1. What is Lazy Initialization in Hibernate ?Hibernate
Ans. It's a feature to lazily initialize dependencies , relationship and associations from the Database. Any related references marked as @OneToMany or @ManyToMany are loaded lazily i.e when they are accessed and not when the parent is loaded.

  Sample Code for Lazy Initialization

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     hibernate   lazy loading hibernate   lazy initialization hibernate   architecture     Asked in 77 Companies      Basic        frequent

Try 2 Question(s) Test


Related Questions

  What are the ways to avoid LazyInitializationException ?
  After which Hibernate version , related Entities are initialized lazily ?
 What are the points to be considered if we move from Eager initialization to Lazy Initialization in Hibernate ?
 How does Lazy Initialization helps improving performance of an application ?
 What does the following exception means

org.hibernate.LazyInitializationException: could not initialize proxy - no Session
 If you are given choice to avoid LazyInitializationException using any of the following measures, which are the ones you will choose and why ?

1. Set lazy=false in the hibernate config file.
2. Set @Basic(fetch=FetchType.EAGER) at the mapping.
3. Make sure that we are accessing the dependent objects before closing the session.
4. Force initialization using Hibernate.initialize


 Q2. What is a Servlet Filter ?Java EE
Ans. It's an object that can intercept http request and response and hence we can take appropriate action on those requests.

There are different types of filters based on Specifications like

Authentication
Logging
Encryption
Tokenizing

etc

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     servlets  servlet filters     Asked in 3 Companies      basic        frequent


Related Questions

 What are the advantages of Spring interceptor over Servlet Filters ?


 Q3. Explain servlet lifecycleJava EE
Ans. Init -> service -> destroy.

Out of these, init and destroy are called once per servlet whereas service is called every time when a request is made to the servlet.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     servlet     Asked in 6 Companies


Related Questions

  What is session tracking and how do you track a user session in servlets?
 What is deployment descriptor ?

or

What is the use of deployment descriptor ?
  Can we have multiple servlets in a web application and How can we do that ?
  Difference between socket and servlet ?
  What are different types of cookies ?
 What is a Servlet Filter ?
  What is servlet Chaining ?
  What is a config Object?
  What is a pageContext Object?
  What are the phases of the JSP life cycle ?



Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: