Spring Projects

Spring Project 1

Spring Interview Questions And Answers

Totel:41 Click: 1 2 3 4 5 6 7 8 9
Spring Interview Questions And Answers

Page 1

RowCallbackHandler interface is used by JdbcTemplate for processing rows of a ResultSet on a per-row basis. Implementations of this interface perform the actual work of processing each row but don't need to worry about exception handling. SQLExceptions will be caught and handled by the calling JdbcTemplate. RowCallbackHandler object is typically stateful: It keeps the result state within the object, to be available for later inspection.
RowCallbackHandler interface has one method :

   void processRow(ResultSet rs) :- Implementations must implement this method to process each row of data in the ResultSet.

BatchPreparedStatementSetter interface sets values on a PreparedStatement provided by the JdbcTemplate class for each of a number of updates in a batch using the same SQL. Implementations are responsible for setting any necessary parameters. SQL with placeholders will already have been supplied. Implementations of BatchPreparedStatementSetter do not need to concern themselves with SQLExceptions that may be thrown from operations they attempt. The JdbcTemplate class will catch and handle SQLExceptions appropriately. 
BatchPreparedStatementSetter has two method:

  * int getBatchSize() :-  Return the size of the batch.
  * void setValues(PreparedStatement ps, int i) :-Set values on the given PreparedStatement.

To create a DataSource connection pool :

You can configure JNDI instead of datasource in spring applicationcontext.xml using "org.springframework.jndi.JndiObjectFactoryBean". For Example:


To configure your database driver using datasource "org.springframework.jdbc.datasource.DriverManagerDataSource". For Example:



Goto Page:

1 2 3 4 5 6 7 8 9
Spring Objective Questions And Answers

Spring Objective Questions And Answers

Spring Interview Questions And Answers

Spring Subjective Questions And Answers

R4R,Spring Objective fresher and experienced, Spring Subjective fresher and experienced ,Spring Interview Questions And Answers,Spring fresher and experienced,Spring Interview fresher and experienced ,Spring Questions fresher and experienced,Spring Answers fresher and experienced