- 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 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 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 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 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: 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: How is a typical spring implementation look like ?

Answer: For a typical Spring Application we need the following files:


An interface that defines the functions.

An Implementation that contains properties, its setter and getter methods, functions etc.,

Spring AOP (Aspect Oriented Programming)

A XML file called Spring configuration file.

Client program that uses the function.
Question: When to use programmatic and declarative transaction management ?

Answer: Programmatic transaction management is usually a good idea only if you have a small number of transactional operations.
On the other hand, if your application has numerous transactional operations, declarative transaction management is usually worthwhile. It keeps transaction management out of business logic, and is not difficult to configure. Source:
Question: What are the types of Dependency Injection Spring supports?

Answer: *
Setter Injection:
Setter-based DI is realized by calling setter methods on your beans after invoking a no-argument constructor or no-argument static factory method to instantiate your bean.

Constructor Injection:
Constructor-based DI is realized by invoking a constructor with a number of arguments, each representing a collaborator. Source:
Question: Can anyone tell me how can we implement the Spring AOP, I need configuration files along with explanation of aspects in Spring?

Answer: No answer available currently.
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: 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: Explain about the two models of the object which Bean Factory supports?

Answer: Two models of object which bean factory supports are: -
1) Single ton and prototype.
Singleton has one instance (shared) with an object and it is assigned a specific name which can be retrieved on lookup.
Prototype results in creation of an independent object. 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: What are the differences between EJB and Spring ?

Answer: Spring and EJB feature comparison.
Feature EJB Spring
Transaction management

* Must use a JTA transaction manager.
* Supports transactions that span remote method calls.

* Supports multiple transaction environments through its PlatformTransactionManager interface, including JTA, Hibernate, JDO, and JDBC.
* Does not natively support distributed transactions?it must be used with a JTA transaction manager.

Declarative transaction suppor Source:
Question: What is SQLProvider ?

Answer: SQLProvider:
* Has one method ? getSql()
* Typically implemented by PreparedStatementCreator implementers.
* Useful for debugging. Source:
Question: State about the commonly used Bean Factory definitions?

Answer: The most commonly used bean factory definitions are as follows: -
1) XML bean factory and 2) DefaultListable beanfactory.
XMLbean factory is used to parse XML structure to define classes and properties of objects (named).
DefaultListablebeanfactory is useful to program bean factories and parse definitions. Source:
Question: Explain about the Spring DAO support ?

Answer: The Data Access Object (DAO) support in Spring is aimed at making it easy to work with data access technologies like JDBC, Hibernate or JDO in a consistent way. This allows one to switch between the persistence technologies fairly easily and it also allows one to code without worrying about catching exceptions that are specific to each technology. 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:

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.484375 Seconds