0

I was asked this question during an interiew process a few week's back. I was not sure what to talk about. Do we need to talk about Session or Lazy loading/eager loading or Transaction manager or optimistic locking and pessimistic locking.

49er
  • 1
  • 3
  • Talk about `@Transactional` annotation, what `propagation` does, when does the transaction `rollback` .. – jarvo69 Aug 18 '17 at 04:13
  • They asked me to answer with different scenarios. Could you give me a clue of what scenario and what are the things you would cover in the answer – 49er Aug 18 '17 at 04:33
  • Why this question was annotated duplicate? It's a good question. I suggest you to take a look at Spring Data docs – akuma8 Aug 19 '17 at 17:28

1 Answers1

1

Use @Transactional annotation at service base class.Use rollback conditions as when Exception thrown.

isah
  • 5,221
  • 3
  • 26
  • 36
  • But they asked me to talk about control transaction with spring and hibernate. what are the things that i need to cover. – 49er Aug 18 '17 at 04:35
  • @Transactional annotation is spring annotation only, so when you use it you are using spring .You will need to define a particular platform transactionmanager as well like below – user4982298 Aug 18 '17 at 05:04