Spring
Spring
2. "What A:- They B:- They C:- They ctions. D:- They E:- They y."
A. B.
TRUE FALSE
8. "Consider the following code snippet: Employee scotty = (Employee)bf.getBean(
""scotty""); System.out.println(""scotty earns : "" + scotty.getSalary()); and b
ean configura tion: -<-alias name=""employee"" alias=""scotty"" />> -<-alias nam
e=""employeeOfTheMonth"" alias=""scotty"" /> -<-bean id=""employee"" class=""Emp
loyee""> -<-property name=""salary"" value=""2""/> -<-/bean> -<-bean id=""employ
eeOfTheMonth"" class=""Employee""> - <-property name=""salary"" value=""20000""/
> -<-/bean> Assuming that no compile errors exist and that bf refers to an insta
nce of BeanF actory that loaded the provided configuration. The output of the pr
ogram will be : 2 " A. B. TRUE FALSE
9. "The follwoing is true about Inversion of Control: A:- Inversion of Control o
ccurs when a main program has all the conrol and indiv idual components are as e
d to participate and execute when the main program deci des. B:- Inversion of Co
ntrol occurs when a main program receives the components that will execute at ru
ntime. C:- Inversion of Control occurs when a main program receives the componen
ts that will execute by configuration. D:- Dependency Injection is an Inversion
of Control technique that occurs when a main program receives the components tha
t will execute as parameters." A. B. C. D. A, B, C, D, B, C, D, A, C D, A A B
10. "Which of the following mechanisms can be used to register the new PropertyE
ditor (own CustomEditor) in Spring container? A:- property customEditors of bea
n factory post-processor called CustomEditorCon figurer B:- implement a Property
EditorRegistrar interface and set this implementation to CustomEditorConfigurer.
propertyEditorRegistrars property C:- registerCustomEditor() method from the App
licationContext D:- registerCustomEditor() method of the ConfigurableBeanFactory
interface, assu ming you have a BeanFactory reference" A. B. C. D. A, B, C, D,
B, C, D, A, C D A B
11. "a.xml -<-bean id=""beanA"" class=""beans.Inner"" /> b.xml -<-import resourc
e=""a.xml"" /> -<-bean id=""beanB"" class=""beans.Outer""> -<-property name=""be
anA"" ref=""bea nA"" /> -<-/bean> c.xml -<-import resource=""a.xml"" />
B. C.
B, C A, C
16. What is default bean scope in spring? A. B. C. D. E. prototype session singl
eton request global
17. "Which statements are true aboutApplicationContextandBeanFactory A:- Applicatio
nContext includes all functionality of the BeanFactory B:- Both ApplicationConte
xt, BeanFactory have convenient access to MessageSource C:- ApplicationContext l
oads beans eagerly, but BeanFactory lazily D:- Both ApplicationContext, BeanFact
ory have automatic registration to BeanPost Processor E:- Both ApplicationContex
t, BeanFactory are used for bean instantiation/wiring" A. B. C. D. E. 18. A:B:C:
D:A. B. C. D. A, B, A, C, D, B, C, C, D, E, C D E E A
"Select which of the following implement the TransactionStatus interface Abstrac
tTransactionStatus DefaultTransactionStatus SimpleTransactionStatus None of the
above" A, B, C, D, B, C C D, A A
19. Which method is defined in interface RowCallbac Handler? A. B. C. D. 20. A:B
:C:D:E:F:A. B. C. D. E. F. void void void void process(ResultSet rs) processResu
ltSet(ResultSet rs) processRow(ResultSet rs) processResult(ResultSet rs)
"Which of the following classes are built-in Spring Events. ContextRefreshedEven
t ContextClosedEvent ActionEvent ContextStoppedEvent ServletContextEvent Context
StartedEvent" A, B, E, A, D, A, B, C, A, B, E, B, C, D, E D, F F D, F A C
A.
'no-rollbac -for rule' is applied and transaction will not rollbac .
A. B. C. D. E. F.
A, B, E, C, D, D,
B, C, A, D, E, E,
C, D, F E A, B,
D E F, C F, C
28. "Consider the following valid declarations: -<-bean id=""bar"" class=""x.y.B
ar""/> -<-bean id=""baz"" class=""x.y.Baz""/> -<-bean id=""foo"" class=""x.y.Foo
""> -<-constructor-arg ref=""bar""/> -<-constructor-arg ref=""baz""/> -<-constru
ctor-arg value=""example""/> -<-/bean> Which of the following declarations using
c-namespace are valid? A:- -<-bean id=""foo"" class=""x.y.Foo"" c:bar=""bar"" c
:baz=""baz"" c:email=""e xample@example.com"" /> B:- -<-bean id=""foo"" class=""
x.y.Foo"" c:bar-ref=""bar"" c:baz-ref=""baz"" c:e mail=""example@example.com"" /
> C:- -<-bean id=""foo"" class=""x.y.Foo"" c:_0-ref=""bar"" c:_1-ref=""baz"" c:_
2= ""example@example.com"" />" A. B. C. A, B B, C A, C
29. Does JdbcTemplate has a delete operation in API to delete rows from a table?
A. B. YES NO
30. "Spring eases the data access process by ma ing use of two distinct classes:
templates and callbac s. Which of the following classes are not shipped with Sp
ring? A:- JdbcTemplate B:- HibernateTemplate C:- JpaTemplate D:- OracleTemplate
E:- NamedParameterJdbcTemplate F:- PLSqlTemplate" A. B. C. D. E. F. A, B, E, C,
D, D, B, C, A, D E, F C, D D F A