title: Does Spring Transaction Management Work with Spring WebFlux?
body: <p>Does Spring's support for RDBMS transaction management also work in Spring WebFlux?  </p>
  
  <p>For example, assuming proper configuration, will a method annotated with the <code>@Transactional</code> annotation use the Spring transaction manager and rollback the transaction if an error occurs?  </p>
  
  <p>If transaction management does work, must a <code>@Transactional</code> method actually <code>throw</code> and exception, or must the <code>Mono</code> or <code>Flux</code> return type emit an error signal?  </p>
  
  <p>I know JDBC is inherently blocking, and thus any JDBC operations must be bridged from blocking to reactive, or vice-versa.</p>
  
  <p>The Spring transaction manager works by using a <code>ThreadLocal</code> (right?) which I'm assuming won't work in a Reactor environment, since Reactor is frugal with threads and a single thread can swap out one unit of work for another while the first is waiting on I/O.  I know Reactor has the <code>Context</code> object which is conceptually similar to <code>ThreadLocal</code> (right?) but I haven't seen any documentation that mentions that transaction makes use of it.  Additionally, all JDBC operations that occur within a transaction must use the same <code>Connection</code> which might be tough to do in a reactive context.</p>
  
  <p>My organization has experience with WebFlux and Cassandra, but Cassandra has a native reactive driver.</p>
  
  <p>Thank you!</p>