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

How to create React project using command prompt?

How to achieve abstraction?

Interview Question? How to find square of each element in this Array {2,4,5,6,8} using map ?