- World's Largest Collection of Interview Questions & Answers, FAQs, queries, sample papers, exam papers, dumps, what, why, how, where, when questions
Our Services
Get 9,000 Interview Questions & Answers in an eBook.

Get it now !!
Send your Resume to 6000 Companies
Springs Interview Questions & Answers - Learning Mode

Springs Interview Questions & Answers - Learning Mode

The Spring Framework is an application framework and inversion of control container for the Java platform. The framework's core features can be used by any Java application, but there are extensions for building web applications on top of the Java EE platform. The Spring Framework is a Java platform that provides comprehensive infrastructure support for developing Java applications. Spring handles the infrastructure so you can focus on your application.

Try Springs Interview Questions & Answers - Exam Mode

1 2 3 4 Next

Sort By : Latest First | Oldest First | By Rating

Springs Interview Questions & Answers - Learning Mode
Try Springs Interview Questions & Answers - Exam Mode
Question: What do you mean by Bean wiring ?

Answer: The act of creating associations between application components (beans) within the Spring container is reffered to as Bean wiring. Source:
Question: What are the ways to access Hibernate using Spring ?

Answer: There are two approaches to Spring?s Hibernate integration:

* Inversion of Control with a HibernateTemplate and Callback
* Extending HibernateDaoSupport and Applying an AOP Interceptor Source:
Question: What are the advantages of Spring framework?

Answer: The advantages of Spring are as follows:

* Spring has layered architecture. Use what you need and leave you don't need now.
* Spring Enables POJO Programming. There is no behind the scene magic here. POJO programming enables continuous integration and testability.
* Dependency Injection and Inversion of Control Simplifies JDBC
* Open source and no vendor lock-in.
Question: Explain about the different ways in which Spring JDBC can help you?

Answer: There are several ways in which a spring JDBC can help you they are: -
1) Connection leaks can be avoided.
2) Code can be focused on necessary SQL and it is very low.
3) Applications will never have to depend on RDBMS error specification handling.
4) You can easily implement DAO pattern without business logic. Source:
Question: Explain about portability of spring?

Answer: Spring applications and framework are portable between different servers. This framework and applications are portable between many different servers such as Tomcat, Jetty, Web Logic, Web Sphere, Resin, Geronimo, etc. Environment features can be implemented without affecting portability. Source:
Question: What is Bean Factory ?

Answer: A BeanFactory is like a factory class that contains a collection of beans. The BeanFactory holds Bean Definitions of multiple beans within itself and then instantiates the bean whenever asked for by clients.

* BeanFactory is able to create associations between collaborating objects as they are instantiated. This removes the burden of configuration from bean itself and the beans client.
* BeanFactory also takes part in the life cycle of a bean, making calls to custom initializat Source:
Question: Explain the three different methods which are provided by the Namespace Handler interface?

Answer: The three different methods which are provided by the name space handler interface are: -
1) Init() is used to allow initialization for name space handler.
2) BeanDefinition parse is used when a Spring encounters a top level element.
3) BeanDefinitionHandler is used when spring encounters an attribute. Source:
Question: What are the advantages of spring framework?

Answer: Hibernate can be accessed in the following two ways:

By IOC with a Callback and HibernateTemplate.
By applying an AOP Interceptor and broadening the HibernateDaoSupport. Source:
Question: Explain the advantages of using DAO module?

Answer: The database code can be kept clean and simple by using the DAO module. This helps in preventing problems that rise because of poor handling of closures of database resources. Also, the DAO module utilizes the AOP module to enable objects in the Spring application to use transaction management services. Source:
Question: What is SQLExceptionTranslator ?

Answer: SQLExceptionTranslator, is an interface to be implemented by classes that can translate between SQLExceptions and Spring's own data-access-strategy-agnostic org.springframework.dao.DataAccessException. Source:
Question: What is Metadata Autoproxying ?

Answer: Metadata Autoproxying can be performed inspiring which can be driven by metadata. This is determined by source level attributes and keeps metadata inside the source code.

This maintains metadata in one place and mainly used for declarative transaction support. Source:
Question: What is Significance of JSF- Spring integration ?

Answer: Spring - JSF integration is useful when an event handler wishes to explicitly invoke the bean factory to create beans on demand, such as a bean that encapsulates the business logic to be performed when a submit button is pressed. Source:
Question: What are the benefits of the Spring Framework transaction management ?

Answer: The Spring Framework provides a consistent abstraction for transaction management that delivers the following benefits:

* Provides a consistent programming model across different transaction APIs such as JTA, JDBC, Hibernate, JPA, and JDO.
* Supports declarative transaction management.
* Provides a simpler API for programmatic transaction management than a number of complex transaction APIs such as JTA.
* Integrates very well with Spring's various data access Source:
Question: What are the benefits of IOC (Dependency Injection)?

Answer: Benefits of IOC (Dependency Injection) are as follows:


Minimizes the amount of code in your application. With IOC containers you do not care about how services are created and how you get references to the ones you need. You can also easily add additional services by adding a new constructor or a setter method with little or no extra configuration.

Make your application more testable by not requiring any singletons or JNDI lookup mechanisms in your Source:
Question: Explain about exception wrapping?

Answer: Wrapping can be effectively done using spring. It makes the proprietary code to run in the ORM layer to a set of abstracted run time exceptions. Persistence exceptions can be easily handled. Handling of exceptions can be done very easily. Source:
Question: What are the types of Dependency Injection?

Answer: Two types of dependency injection are supported by spring framework:

Setter Injection
Constructor Injection Source:
Question: What is cross cutting concern and concern in spring AOP ?

Answer: Cross cutting concern: It is a concern which is applicable throughout the application and it affects the entire application. E.g Security, logging and data transfer are the concerns which are needed in almost every module of an application.

Concern: Concern is a behavior that we want to have in a module of an application. Issues in which we are interested defines our concern . Source:
Question: What is called an Advice ?

Answer: Advice will tell application on new behavior and it is the implementation of an aspect. It is inserted into an application at the joinpoint.

Advice is the implementation of an aspect. It is something like telling your application of a new behavior. Generally, the advice is inserted into an application at joinpoints. Source:
Question: What is the typical Bean life cycle in Spring Bean Factory Container ?

Answer: Bean life cycle in Spring Bean Factory Container is as follows:


The spring container finds the bean?s definition from the XML file and instantiates the bean.

Using the dependency injection, spring populates all of the properties as specified in the bean definition

If the bean implements the BeanNameAware interface, the factory calls setBeanName() passing the bean?s ID.

If the bean implements the BeanFacto Source:
Question: What is SQLProvider ?

Answer: SQLProvider:
* Has one method ? getSql()
* Typically implemented by PreparedStatementCreator implementers.
* Useful for debugging. Source:

1 2 3 4 Next

India News Network
Latest 20 Questions
Payment of time- barred debt is: (a) Valid (b) Void (c) Illegal (d) Voidable
Consideration is defined in the Indian Contract Act,1872 in: (a) Section 2(f) (b) Section 2(e) (c) Section 2(g) (d) Section 2(d)
Which of the following is not an exception to the rule, "No consideration, No contract": (a) Natural love and affection (b) Compensation for involuntary services (c) Completed gift (d) Agency
Consideration must move at the desire of: (a) The promisor (b) The promisee (c) The promisor or any other party (d) Both the promisor and the promisee
An offer which is open for acceptance over a period of time is: (a) Cross Offer (b) Counter Offer (c) Standing Offer (d) Implied Offer
Specific offer can be communicated to__________ (a) All the parties of contract (b) General public in universe (c) Specific person (d) None of the above
_________ amounts to rejection of the original offer. (a) Cross offer (b) Special offer (c) Standing offer (d) Counter offer
A advertises to sell his old car by advertising in a newspaper. This offer is caleed: (a) General Offer (b) Special Offer (c) Continuing Offer (d) None of the above
In case a counter offer is made, the original offer stands: (a) Rejected (b) Accepted automatically (c) Accepted subject to certain modifications and variations (d) None of the above
In case of unenforceable contract having some technical defect, parties (a) Can sue upon it (b) Cannot sue upon it (c) Should consider it to be illegal (d) None of the above
If entire specified goods is perished before entering into contract of sale, the contract is (a) Valid (b) Void (c) Voidable (d) Cancelled
______________ contracts are also caled contracts with executed consideration. (a) Unilateral (b) Completed (c) Bilateral (d) Executory
A offers B to supply books @ Rs 100 each but B accepts the same with condition of 10% discount. This is a case of (a) Counter Offer (b) Cross Offer (c) Specific Offer (d) General Offer
_____________ is a game of chance. (a) Conditional Contract (b) Contingent Contract (c) Wagering Contract (d) Quasi Contract
There is no binding contract in case of _______ as one's offer cannot be constructed as acceptance (a) Cross Offer (b) Standing Offer (c) Counter Offer (d) Special Offer
An offer is made with an intention to have negotiation from other party. This type of offer is: (a) Invitation to offer (b) Valid offer (c) Voidable (d) None of the above
When an offer is made to the world at large, it is ____________ offer. (a) Counter (b) Special (c) General (d) None of the above
Implied contract even if not in writing or express words is perfectly _______________ if all the conditions are satisfied:- (a) Void (b) Voidable (c) Valid (d) Illegal
A specific offer can be accepted by ___________. (a) Any person (b) Any friend to offeror (c) The person to whom it is made (d) Any friend of offeree
An agreement toput a fire on a person's car is a ______: (a) Legal (b) Voidable (c) Valid (d) Illegal
Cache = 0.203125 Seconds