Post a Job  |   Ask a Question?   |   Already registered? login or register
Ramakanth reddy
30/04/2015 08:06 PM

If antbody experimented ..while doing nestedbean if we mention ref local="chip" in child , then if bean is not available in child ,IoC conatinaner wheather it goes to parent or not. MY OPENION IS IT


If antbody experimented ..while doing nestedbean if we mention ref local="chip" in child , then if bean is not available in child ,IoC conatinaner wheather it goes to parent or not. MY OPENION IS IT DOESN'T. and same in the case of " ref parent="chip" also. If we use "ref parent="chip" checks only in parent.if not available,we get exception. If we use "ref local="chip" checks only in child.if not available, we get exception. If we use "ref bean="chip" it only checks in both parent and child .if not available in both , we get exception. "but in oops if any property[or] method is not in child ,then it calls super class's property[or] method if available."
Spam    2 Comments

rabindra,jain
01/05/2015 00:07:37
In ref local it only checks in local IOC and if not found in local IOC it throws an exception as: There is no ID/IDREF binding for IDREF 'chip'. And one thing if ref local will check in parent IOC then why there is ref bean again.

Sujit,Mohanty
01/05/2015 00:28:29
If we write "ref=parent",we explicitly write as parent then go to parent ,so it checks only in parent.If "ref=local" then it checks only in child bean,if not throws Exception as "There is no ID/IDREF binding for IDREF 'chip'".If "ref bean="chip" then it checks 1st in child if not then goes to parent(if not available in parent then throws exception).It applies inheritance concept...

Languages :
xml