Results 1 to 1 of 1
Thread: What is need of method injection
-
What is need of method injection
When a singleton Bean needs to communicate with prototype Bean then it becomes difficult to handle by container as The container will only create the singleton bean A once, and thus only get the opportunity to set its properties once. There is no chance for the container to provide bean A with a new instance of bean B every time one is needed.
This problem can be solved by implementing BeanFactory Aware by Bean a, But that is not a good solution. So Method Injection, an advanced feature of the Spring IOC framework allows solving the problem in a clean and fashioned way.
Similar Threads
-
Look-Up Method Injection and it’s usage in Spring Framework
By Java Tip in forum Java TipReplies: 0Last Post: 03-30-2008, 10:09 AM -
How to decide whether to use Setter injection or constructor injection in your code
By Java Tip in forum Java TipReplies: 0Last Post: 03-29-2008, 12:38 PM -
Look-Up Method Injection and it’s usage in Spring Framework
By JavaBean in forum Java TipReplies: 0Last Post: 09-26-2007, 08:40 PM -
What is need of method injection
By JavaBean in forum Java TipReplies: 0Last Post: 09-26-2007, 08:39 PM -
How to decide whether to use Setter injection or constructor injection in your code
By JavaBean in forum Java TipReplies: 0Last Post: 09-26-2007, 08:29 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks