SpringFramework_1005

Last modified by superadmin on 2018-01-12 20:20

Back to Item Set

<p/>
<!-- START TestItem -->
<p/>
<div class="TestItem">
<div class="TestItemQuestion">1005 Question:\

What is the difference between the following two Spring beans:
{code}
<bean name="beanOne" class="lu.lv.BeanOne"/>
<bean name="beanTwo" class="lu.lv.BeanTwo" lazy-init="true"/>
{code}
?

</div>

Select 1 correct answer(s)!

<p/>
<ol class="MTestItemChoices" type='A'>
<li>

init() method of BeanTwo will be skipped on container startup and will be invoked only when bean is first requested.

</li>
<li>

Instance of BeanOne will be created on container startup, but instance of BeanTwo when it is first requested.

</li>
<li>

Dependencies of BeanOne will be resolved and injected on container startup, but  dependencies of BeanTwo will be resolved when it is first requested.

</li>
<li>

There is no difference because "lazy-init" attribute is not supported by Spring container.

</li>
</ol>
<p/>
<div class="TestItemSkill"><!--$skillid>Skill: $skilltitle</div>
<p/>
</div>
<!-- END MTestItem -->
<p/>
<p/>


{{/velocity}}

Tags:
Created by Alina Vasiljeva on 2013-01-16 07:52
    
This wiki is licensed under a Creative Commons 2.0 license
XWiki Enterprise 6.4 - Documentation