Please explain Spring spread propagation behavior Affairs

What is the propagation of affairs?

  It sounds very high-end, is actually very simple. Now that is communication, then there are at least two things that can happen only spread. Monomers do not spread this behavior does not exist.

Transaction propagation behavior (propagation behavior) refers to when a transaction method is invoked by another transaction method , this method should be how to make the transaction .

  For example: methodA transaction method transaction method calls methodB time, methodB is to continue to run the affairs of the caller methodA it, or start a new run their own affairs, which is determined by the propagation behavior methodB transactions.

Spring defines seven communication behavior:

  

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Guess you like

Origin www.cnblogs.com/july-sunny/p/12638223.html