Let's consider:
delete()
update()
insert()
@Transactional
void doDBstuff(){
delete()
update()
insert
}
As you can see only doDBstuff
. It calls other method (delete, update, insert
). All of them using mybatis
to work on database.
Tell me please, if this @Transactional
annotation should be working. I tested it manually and it seems be ok, however I want to be sure and understand better how does it work.
So I ask for answers:
1. Is it transactional-safe ?
2. How does it work underhood ? I know that it is complex. I mean only some intuion, rougly view on subject.