public class ClientServiceImpl implements ClientService {
@Transactional(propagation=Propagation.REQUIRED)
public void update1() {
update2();
}
@Transactional(propagation=Propagation.REQUIRES_NEW)
public void update2() { // ... }
}
You are using transactions with Spring AOP.
What is happening when the update1 method is called? (Select one)
- There is only one transaction because the call to update2() is internal (it does not go through the proxy)
- There is only one transaction because REQUIRES_NEW runs into the active transaction if one already exists
- There are 2 transactions because REQUIRES_NEW always runs in a new transaction
Show Answer Next Question