Enhancement: The user should be warned when using .parallelStream() in a method annotated with @Transactional
Consider the following example:
@Autowired
Repository jpaRepo;
@Transactional
public void mySaveMethod( List records) {
records.parallelStream().forEach( record ->
jpaRepo.save(record)
);
}
// Here the transaction boundary will be maintained per Parallel Thread. In some cases, user might require (and expect) a global transaction boundary which above method does not provide.
Comment From: scottfrederick
Transactional behavior of repositories is implemented by the various Spring Data projects, not by Spring Boot.
You can ask questions about Spring Data on StackOverflow or gitter, or file an issue in one of the Spring Data projects in Jira.
Comment From: tanmaylaud
Transactional behavior of repositories is implemented by the various Spring Data projects, not by Spring Boot.
You can ask questions about Spring Data on StackOverflow or gitter, or file an issue in one of the Spring Data projects in Jira.
@scottfrederick thanks for the suggestion :)