ArticlesTutorialsInterview Questions & AnswersCertificationsFree Books & Sample ChaptersTechnical Discussions  Your Account | Advertise with us | Feedback |
Few pages of this site are under construction and we are constantly trying to improve it. If you have any suggestions or ideas about how to improve the site, please Let us know.
Spring Framework Interview Questions - 5
Previous | 1 2 3 4 5 | Next

41. What is Spring's JdbcTemplate ?

Spring's JdbcTemplate is central class to interact with a database through JDBC. JdbcTemplate provides many convenience methods for doing things such as converting database data into primitives or objects, executing prepared and callable statements, and providing custom database error handling.

JdbcTemplate template = new JdbcTemplate(myDataSource);



Don't Miss...
Spring Certification article
Spring Basic Tutorial
JSF Basic Tutorial
JSF-Spring2.0 Integration
Spring-iBatis Integration
42. What is PreparedStatementCreator ?

   PreparedStatementCreator:

  • Is one of the most common used interfaces for writing data to database.
  • Has one method createPreparedStatement(Connection)
  • Responsible for creating a PreparedStatement.
  • Does not need to handle SQLExceptions.



43. What is SQLProvider ?

   SQLProvider:



44. What is RowCallbackHandler ?

   The RowCallbackHandler interface extracts values from each row of a ResultSet.

  • Has one method processRow(ResultSet)
  • Called for each row in ResultSet.
  • Typically stateful.



45. What are the differences between EJB and Spring ?

   Spring and EJB feature comparison.

Feature EJB Spring
Transaction management
  • Must use a JTA transaction manager.
  • Supports transactions that span remote method calls.
  • Supports multiple transaction environments through its PlatformTransactionManager interface, including JTA, Hibernate, JDO, and JDBC.
  • Does not natively support distributed transactions—it must be used with a JTA transaction manager.
Declarative transaction support
  • Can define transactions declaratively through the deployment descriptor.
  • Can define transaction behavior per method or per class by using the wildcard character *.
  • Cannot declaratively define rollback behavior—this must be done programmatically.
  • Can define transactions declaratively through the Spring configuration file or through class metadata.
  • Can define which methods to apply transaction behavior explicitly or by using regular expressions.
  • Can declaratively define rollback behavior per method and per exception type.
Persistence Supports programmatic bean-managed persistence and declarative container managed persistence. Provides a framework for integrating with several persistence technologies, including JDBC, Hibernate, JDO, and iBATIS.
Declarative security
  • Supports declarative security through users and roles. The management and implementation of users and roles is container specific.
  • Declarative security is configured in the deployment descriptor.
  • No security implementation out-of-the box.
  • Acegi, an open source security framework built on top of Spring, provides declarative security through the Spring configuration file or class metadata.
Distributed computing Provides container-managed remote method calls. Provides proxying for remote calls via RMI, JAX-RPC, and web services.

Don't Miss...
Spring Certification article
Spring Basic Tutorial
JSF Basic Tutorial
JSF-Spring2.0 Integration
Spring-iBatis Integration






Previous | 1 2 3 4 5 | Next
Test

  ALSO SEE :

About Us | Our Mission | Terms of use | Author Terms |    Search        | Contact Us | Advertise With Us | Link to Us | Sitemap
Copyright © 2008 developersBOOK.COM. All rights reserved.