
What is the difference between checked and unchecked exceptions?
• Why does Spring prefer unchecked exceptions?
• What is the data access exception hierarchy?
How do you configure a DataSource in Spring? Which bean is very useful for development/test databases?
Explore the template design pattern as a behavioral pattern that encapsulates algorithm steps for code reuse, and see how the JDBC template simplifies JDBC workflows.
What is a callback? What are the three JdbcTemplate callback interfaces that can be used with queries? What is each used for? (You would not have to remember the interface names in the exam, but you should know what they do if you see them in a code sample).
Yes, the JDBC template can execute plain SQL statements using methods like query for list, query for object, query for map, and update, demonstrated in an employee DAO example.
When does the JDBC template acquire (and release) a connection, for every method called or once per template? Why?
How does the JdbcTemplate support generic queries? How does it return objects and lists/maps of objects?
What is a transaction? What is the difference between a local and a global transaction?
Is a transaction a cross cutting concern? How is it implemented by Spring?
How are you going to define a transaction in Spring?
• What does @Transactional do? What is the PlatformTransactionManager?
Is the JDBC template able to participate in an existing transaction?
What is a transaction isolation level? How many do we have and how are they ordered?
Enable transaction management activates annotation driven transactions in Spring, proxying methods annotated with transaction to manage begin, commit, and rollback via a transaction interceptor and a platform transaction manager.
Learn how transaction propagation reuses or creates transactions across transactional method calls, covering required, supports, mandatory, requires new, not supported, never, and nested.
What happens if one @Transactional annotated method is calling another @Transactional annotated method on the same object instance?
Where can the @Transactional annotation be used? What is a typical usage if you put it at class level?
Declarative transaction management uses the transactional annotation to let the framework handle transactions, eliminating boilerplate compared to manual transaction code that manages connections, commits, and rollbacks.
Explain the default Spring rollback policy: automatic rollback on unchecked exceptions, not on checked ones; override using rollbackFor and noRollbackFor in the transactional annotation.
What is the default rollback policy in a JUnit test, when you use the @RunWith(SpringJUnit4ClassRunner.class) in JUnit 4 or @ExtendWith(SpringExtension.class) in JUnit 5, and annotate your @Test annotated method with @Transactional?
Why is the term "unit of work" so important and why does JDBC AutoCommit violate this pattern?
What do you need to do in Spring if you would like to work with JPA?
Are you able to participate in a given transaction in Spring while working with JPA?
Use the JPA transaction manager for one database and one entity manager; use the JTA transaction manager for multiple databases or transactional resources to span a single transaction.
What do you have to configure to use JPA with Spring? How does Spring Boot make this easier?
Understand how a repository interface in Spring Data defines the expected data access behaviors and enables automatic query generation from method names for CRUD operations, paging, sorting, and JPA integration.
How do you define a Repository interface? Why is it an interface not a class?
What is the naming convention for finder methods in a Repository interface?
Declare interfaces; Spring generates the implementation via simple JPA repository, creates a bean per interface, and supports global or per-repository customization with a base class or custom methods.
Use the @Query annotation on a repository method to specify the JPA query, overriding the finder method name-based generation and giving you more control over the executed query.
Spring Professional Exam Tutorial explains and answers all questions from Spring Professional Certification Study Guide. Each answer to exam topic is explained in detail with video tutorial, description and good example for you to get deep understanding of discussed topic. With this course you will get all required knowledge and skills to pass Spring Professional Certification Exam.
Course is divided into 8 modules:
Module 01 - Container, Dependency, and IoC
Module 02 - Aspect Oriented Programming
Module 03 - Data Management: JDBC, Transactions, Spring Data JPA
Module 04 – Spring Boot
Module 05 - Spring MVC and The Web Layer
Module 06 – Security
Module 07 – REST
Module 08 – Testing
This course covers third module of the entire course and inside you can find answers to all topics from Spring Professional Certification Study Guide third section, which is Data Management: JDBC, Transactions, Spring Data JPA.