I am using @Transactional to manage the transaction
@Override
@Transactional
public List<FooBo> save(Foo foo, Foo foo2) {
logger.debug(() -> String.format("FooService.save()"));
repository.save(foo);
return repository1.save(foo2);
}
I am unable to find transaction id while using TransactionAspectSupport.currentTransactionInfo()
is there any other way? (if Spring maintaining the Unique Id of transaction)
Update: My Scenario is that I want to put some information on static context based on transaction id. And after transaction commit need that information.
For example .. based on transaction ID, I want to put some objects in map in static context and after commit need to utilize these objects.. that is what I am thinking