Interview :: Spring
11)
In which scenario, you will use singleton and prototype scope?
Singleton scope should be used with EJB stateless session bean and prototype scope with EJB stateful session bean.
12) What are the transaction management supports provided by spring?
Spring framework provides two type of transaction management supports:
- Programmatic Transaction Management: should be used for few transaction operations.
- Declarative Transaction Management: should be used for many transaction operations.
13) What are the advantages of JdbcTemplate in spring?
14) What are classes for spring JDBC API?
15) How can you fetch records by spring JdbcTemplate?
You can fetch records from the database by the query method of JdbcTemplate. There are two interfaces to do this:
- ResultSetExtractor
- RowMapper
16) What is the advantage of NamedParameterJdbcTemplate?
17) What is the advantage of SimpleJdbcTemplate?
18) What is AOP?
19) What are the advantages of spring AOP?