Solved

interface injection

Posted on 2011-09-06
3
400 Views
Last Modified: 2012-05-12
I would like to know interface injection. I was reading as
Interface Injection-- Injection is done through an interface which is not supported in spring. I am not clear on this concept. why spring does not support it. what are the advantages, disadvantages, uses of it. when where how we use it. thanks in advance
0
Comment
Question by:gudii9
3 Comments
 
LVL 47

Accepted Solution

by:
for_yan earned 250 total points
ID: 36493476
read about interface inection in general here:
http://blogs.oracle.com/jrose/entry/interface_injection_in_the_vm


and as it realtes to Spring here:

http://namanmehta.blogspot.com/2010/01/interface.html
0
 
LVL 40

Assisted Solution

by:gurvinder372
gurvinder372 earned 250 total points
ID: 36493480
0
 
LVL 7

Author Comment

by:gudii9
ID: 36589829

>>>There are three types of Dependency Injections.

Type 1 IOC also called Interface Injection In Type 1 IOC the injection is done though an interface. The interface will define the injection method and the implementation class has to implement this interface and provide concrete implementation for the injection method.
Type 2 IOC also called Setter Injection In Type 2 IOC the injection is done via a setter method. Type 2 IOC uses setter methods to get the dependent classes it needs.
Type 3 IOC also called Constructor Injection. In Type 3 IOC implementing class defines a constructor to get all its dependents. The dependent classes are defined in the constructor arguments.





are they only 3 tyoes. I remember reading more than 3. please advise
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now