What is @transactional annotation and Where we should be used @transactional annotation ?

 Interview Question from Capgemini ?

Q. What is @transational annotation and Where we should be used @transactional annotation ?

Ans : - 

@transactional  annotation :-

=> The @transactional annotation is used metadata that specifies that an interface, Class or method must have transactional Semantics.

Uses of  @transactional  annotation :-

=> we can use @transactional to wrap a method in a database transaction.
=> It allows us to set propagation, isolation timeout, read-only and rollback conditions for our transaction. we can also specify the transaction manager.

Comments

Popular posts from this blog

What are POJO classes in spring? What is the use of POJO Class, and How to create POJO classes.

How to create React project using command prompt?