Spring JDBC Support
Spring JDBC Support
B. H2
C. DERBY
D. All Above
Ans. A
11. Which is/are ORM frameworks
A. Hibernate
B. EclipseLink/ TopLink
C. OpenJPA
D. All are
Ans. D
12. Which one is appropriate process to
create a Table?
a. Create table (
Id int not null auto_increment,
First_name varchar(25),
Primary key(id));
b. Create table (
Id int not null auto_increment,
First_name varchar,
Primary key(id));
c. Create table customer(
Id int not null auto_increment,
First_name varchar(25),
Primary key(id));
Ans: c
13. Which is not Spring JDBC Packages?
a. Core
b. Datasource
c. Object
d. Config
e. servlet
Ans:e p-279
14. What is the correct extension of properties
file?
a. jdbc.properties
b. Jdbc.property
c. Jdbc.propertyfile
Ans: a p-281
15. Which one is not JEE application server ?
a. JBoss
b. webSpher
c. GlassFish
d. Primefaces
Ans: d p-281
16. DML stand for ?
a. Data manipulation language
b. Data maintain language
c. Data margin language
Ans: a p-283
17. SQL Exception are runtime exceptions
True or False ?
a. True
b. False
Ans: a p-286
18. Public class IdbExam{
Private DataSource datasource;
Public void setDataSource(DataSource
dadasource){
This.datasource=datasource;
}
}
Above this application datasource is a --a. Interface
b. Class
c. Variable
Ans: b
19. JdbcTemplete is a Interface True or False ?
a. True
b. False
Ans: b p-287
20. Which is database management software?
a MySQL
b Primeface
c Java
d Html
Answer : a(page-270)
21. RDBMS stands for
a Relational Database Management
Software.
b Relational Database Management
System.
c Relative Database Management
System.
Answer: b( page-270)
22. DriverManagerDataSource is under the
package of
a Org.springframework.jdbc.JDBC
b Org.springframework.jdbc.datasour
ce
c Org.springframework.jdbc.jdbcTam
plete
d Org.springframework.jdbc.DriverM
anagerDataSource
Answer: b( page-280)
23. What is friendlier to Oracle developers?
a) MySQL
b) PstgreSQL
c) Oracle
d) Above all
Answer: b(page- 269)
24. MySQL is generally more widely used
for.
a) Web application development
b) Desktop application development
c) Both a and b
d) None
Answer: a(page- 269)
25. ORM stands for
a) Object-Related Mapping
b) Object-Related Module
c) Object-Relational Mapping
d) Object-Relational Module
Answer: c.(page- 269)
26. What is the alternative of ObjectRelational Mapping ?
a) JDBC
b) ODBC
c) JPA
d) Hibernate
d) Above all
Answer: d. (page-316)
36. what are the advantage of jdbcTamplate?
a. mentioned problems of JDBC API.
b. It provides you methods to write the
queries directly,
c. it saves a lot of work and time.
d.All of the above
ans: d
37. what is a powerful mechanism to connect to
the database and execute SQL queries?
a.Jdbc
b.jdbcTamplate
c.odbcTamplate
d.none of above
Ans: b
38. ResultSetExtractor interface can be used
a. to fetch records from the database
b.to delete records from the database
c. a+b
d.none
Ans: a
39. What are spring Jdbc package?
a.org.springframework.jdbc.core
b.org.springframework.jdbc.datasource
c.org.springframework.jdbc.config
d.all of the above
ans: d
40. DriverManager datasource what under the
package?
a.org.springframework.jdbc.core
b.org.springframework.jdbc.datasource
c.org.springframework.jdbc.config
d.none
ans: b
41. where from spring property placeholder will
load the connection information?
a. jdbc.properties
b. jdbc.config
c. jdbc.support
d. jdbc.object
Ans: a
42. Datasource implement by --a. JEE Application server
b. JMV Application server
c. ODBC Application server
d. Object Application server
ans: a
43. whice verson spring offer embedded
database supported
a. verson 4.0
b. verson 3.0
c. verson 1.0
d.all
ans: b
44. jdbcTemplate
a. allow to issue any type of sql statement
b. return any type of result
c. both a+b
d. none
ans: c
45. when will be jdbcTemplate initialized
automatically
a. then extend DAO supported
b. then extend JDBC supported
c. a+b
d. only b
ans: a
46. what are the not Hibernate configuration
property
a. hibernate.dialect
b. hibernate.batch
c. hibernate.batch-size
d. hibernate.fetch-size
ans: b
47. Adventage of ORM
a. less coding in required
b. esay to test
c. batter exception handling
d. all of above
ans: d
48. what are spring supported
EntiyManagerFactorya. LocalEntiyManagerFactory Bean
b. JEE6 compliant container
c. localContaineLocalEntiyManagerFactory
Bean
d. all of above
ans: d
Using Hibernate in Spring
1) Some popular ORM libraries are
A. Hibernate
B. TopLink
C. JDO
D. All
E. None
Ans. D
2) POJO stand for ?
a. Plain Old java Object
b. Pre old java object
c. Plain order java object
Ans: a
3) The relationship between hibernate and
JPA is very close True or False?
a. True
4)
5)
6)
7)
b. False
Ans: a p-317
When we use the
AnnotationSessionFactoryBean ?
a. Xml annotation support
b. Hibernate annotation support
c. None of the above
Ans: b p-325
How many approaches are there to the
mapping Hibernate Annotations ?
a. One
b. Two
c. Three
Ans: b p-326
HQL Stand for ?
a. Hibernate query Language
b. Hibernate quick language
c. Hibernate query length
Ans: a p-335
Which one is correct method for deleting
data ?
// other code omitted
a. Public void delete(Contact contact)
{
sessionFactory.getCurentSession().dele
te(contact);
log.info(contact delete with id: +
contact.getId());
}
// other code omitted
b. Public void delete(Contact contact)
{
sessionFactory.getCurentSession().dele
te();
log.info(contact delete with id: +
contact.getId());
}
// other code omitted
c. Public void delete(Contact contact)
{
sessionFactory.getCurentSession().dele
te(delete());
log.info(contact delete with id: +
contact.getId());
}
Ans: a p-342
8) The core concept of Hibernate is based on
the
a Java
b Jdbc
c Session
d Bean
Answer: c( page-323)
9) Object-Relational Mapping libraries that
has wide support in spring
a) Hibernate
b) JDBC
c) JPA
d) ODBC
Answer: a(page-317)
10) JDO stands for
a) Java Data Object
b) Java Database Object
c) None
Answer: a..(page-317)
11) Popular ORM libraries are .
a) Hibernate
b) TopLink
c) JDO
d) None
Answer: a, b,c (page-317)
12) JPA stands for
a) Java Persistence API
b) Java Persistence Access
c) Java Persistent API
d) None
Answer: a..(page-317)
13) The relationship between the Hibernate
and JPA is very close
a) False
b) True
Answer: b.(page-317)
14) Who is the founder of Hibernate?
a) Rod Johnson
b) John Hibernate
c) Gavin King
d) Gavin Smith
Answer: c(page-317)
15) Annotation approach is much more
popular approach.
a) True
b) False
Answer: a(page-318)
16) Hibernate has the capability to model a lot
of different kinds of.
a) Generation
b) Performance
c) Associations
d) Above all
Answer: c.(page-331)
17) Object-Relational Mapping libraries that
has wide support in spring
e) Hibernate
f) JDBC
g) JPA
h) ODBC
Answer: a(page-317)
18) JDO stands for
d) Java Data Object
e) Java Database Object
f) None
Answer: a..(page-317)
19) Popular ORM libraries are
e) Hibernate
f) TopLink
g) JDO
h) None
Answer: a, b,c. (page-317)
20) JPA stands for
6)
Answer: a(page-440)
12) What is the basic method of the Basic
Factory class?
a) getOrderService()
b) getService()
c) getObjectService()
d) getInstnceService()
Answer: a(page-440)
13) A Domain Object Model (DOM) is asset
classes that model concepts from the
problem domain.
a) True
b) False
Answer: a(page-442)
14) A good DOM makes it easier for
developers to transform application
requirements into application features.
a) True
b) False
Answer: a(page-443)
15) The goal of DOM is to create a set of ...
a) Methods
b) Classes
c) Objects
d) Instances
Answer: b(page-444)
16) DTO stands for.
a) Data Objects
b) Database Objects
c) Data Transfer Objects
d) None
Answer: c.(page-454)
17) What is the responsibility of Factory
Pattern?
e) To provide application
component
f) To provide application context
g) To provide application initiated
object
h) Above all
Answer: a(page-440)
18) How there are many drawbacks of Factor
Pattern?
e) Five
f) Six
g) Two
h) Three
Answer: d(page-440)
19) What is the biggest drawback of the
traditional Factory Pattern?
e) Multiple implementation
f) Single implementation
g) Both a and b
h) None
Answer: a(page-440)
20) What is the basic method of the Basic
Factory class?
e) getOrderService()
f) getService()
g) getObjectService()
h) getInstnceService()
Answer: a(page-440)
Answer: e(page-519)
5) SPI stands for .
a) Service Provider
Interface
b) Service Provider
Inheritance
c) Service Provider
Interfaces
d) None
Answer: a(page-495)
6) Spring provides a few implementations of
commonly used types, including..
f) CurrencyFormatter
g) DateFormatter
h) NumberFormatter
i) PercentFormatter
j) Above all
Answer: e(page-505)
7) Validations rules applied on domain
objects ensure that all business data is
well structured and fulfills all business
logic.
c) True
d) False
Answer: a(page-508)
8) JSR-303 is a JEE standard and is broadly
supported by many fronted/backend
framework. Which are these?
f) Spring
g) JPA2
h) Spring MVC
i) GWT
j) Above all
Answer: e(page-519)
Web application with Spring
1) Which one is not web application
frameworks ?
a. Spring MVC
b. Struts
c. Java Server Faces(JSF)
d. Jsp
Ans: jsp p-585
2) Spring MVC which is the central servlet
that receives requests and dispatchers
then to the appropriate controllers ?
a. DispatcherServlet
b. Servlet
c. ActionServlet
d. None of the above
Ans: a p-595
3) Which one is not Interface ?
a. HandlerExceptionResolver
b. ViewResolver
c. ModelAndView
Ans: c p-595
4) Major consideration for developing web
application choose all that apply ?
a. Performance
b. User-friendly
c. Accessibility
d. All
Ans:d
5) What is the Artifact ID of joda-time?
a. joda-time-jsptags
b. joda-time-htmltags
c. joda-time-jsftags
d. None
Ans:a
6) The usage of Spring MVC ?
a. Internationalization
b. Theming
c. Page templating
d. All
Ans:d
7) Richness to the SpringBlogeplication
highlights are ?
a.User Interface
b. Rich-text-editing
c. Data grid with pagination
d. None
Ans: a,b,c
8) The main principle of MVC is to define an
architecture with clear responsibilities for
different component?
a) True
b) False
Answer: a(page-593)
9)
GWT stands for.(page-585)
a) Google Web Toolkit
b) Google Website Toolkit
c) Google Web-based Toolkit
d) Nome
Answer: a
10) The main principle of MVC is to define an
architecture with clear responsibilities for
different component?
c) True
d) False
Answer: a(page-593)
11) Spring provides comprehensive support
the theming of web application.
a) True
b) False
Answer: a(page-610)
12) How many steps contains to implements
the show view?
a) Five
b) Four
c) Three
d) Two
Answer: c(page-620)
13) jQuery is one of the most popular
JavaScript libraries being used for
.development.(page-634)
a) Desktop application
b) Web fronted
c) Both a and b
d) None
Answer: b
14) What is needed to be able to use jQuery
and jQuery UI components in your view?
(page-634)
a) Style sheets JavaScript files
b) False
Answer: a(page-668)
8)The architecture of Spring Web Flow is built
around by how many concepts?
a) Three
b) Four
c) Five
d) Six
Answer: a(page-668)
9)A flow is a business process
representing a use case. In Spring Web
Flow, a flow consists of a series of steps
called
a) Object
b) Model
c) Instance
d) States
Answer: d(page-668)
10) How many types of conversion?
a) Two
b) Three
c) Four
d) Five
Answer: b(page-668)
11) Which are types of conversion?
a) Request
b) Session
c) Application
d) Above all
Answer: d (page-668)
12) Available bean scopes in Spring Web
Flow..
a) Flow
b) View
c) Request
d) Flush
e) Conversation
f) Above all
Answer: f(page-669)
13) How there are many application life
cycle?
a) Five
b) Four
c) Six
d) Three
Answer: c(page-671)
14) What are the components of
application life cycle?
a) Restore view
b) Apply request
c) Process validations
d) Update model values
e) Invoke application
f) Render response
g) Above all
Answer: g (page-671)