Solved

interface injection

Posted on 2011-09-06
3
410 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
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.

920 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