To answer this question, you need to understand the types of transaction management that Spring supports. Let's go through each option to understand why it is correct or incorrect:
Option A) Programmatic transaction management - This option is correct because Spring supports programmatic transaction management. In this approach, the developer explicitly writes code to manage transactions using Spring's transaction management APIs.
Option B) Declarative transaction management - This option is correct because Spring also supports declarative transaction management. In this approach, the developer uses annotations or XML configuration to define the transaction boundaries, and Spring automatically handles the transaction management.
Option C) Both 1 and 2 - This option is correct because Spring supports both programmatic and declarative transaction management.
Option D) None of the above - This option is incorrect because Spring supports both programmatic and declarative transaction management.
The correct answer is C) Both 1 and 2. This option is correct because Spring supports both programmatic and declarative transaction management.