ExamGecko
Question list
Search
Search

Question 18 - 2V0-72.22 discussion

Report
Export

Which two are required to use transactions in Spring? (Choose two.)

A.
Add @EnableTransactionManagement to a Java configuration class.
Answers
A.
Add @EnableTransactionManagement to a Java configuration class.
B.
Annotate a class, an interface, or individual methods requiring a transaction with the @Transactional annotation.
Answers
B.
Annotate a class, an interface, or individual methods requiring a transaction with the @Transactional annotation.
C.
A class must be annotated with @Service and @Transaction.
Answers
C.
A class must be annotated with @Service and @Transaction.
D.
A class requiring a transaction must implement the TransactionInterceptor interface.
Answers
D.
A class requiring a transaction must implement the TransactionInterceptor interface.
E.
Write a Spring AOP advice to implement transactional behavior.
Answers
E.
Write a Spring AOP advice to implement transactional behavior.
Suggested answer: A, B

Explanation:

Reference: https://www.baeldung.com/transaction-configuration-with-jpa-and-spring

asked 16/09/2024
Rudrappa Sarvi
37 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first