title: Supporting two completely different transaction managers during DB migration
body: <p>Apologies if this is too vague but I couldn't find a better site to ask this question:</p>
  
  <p>As part of our Database Migration (from Oracle to a NoSql solution), we are using a Persistence layer which can talk to both the solutions. We need to talk to both the layers and exact transaction manager might be decided on the basis of a migration strategy which manages if a given customer is migrated or not.</p>
  
  <p>To achieve this, we were planning to pass an additional parameter (i.e. annotation with the value being the customer id) to all the methods to decide the correct persistence layer to use which internally chooses the right transaction manager.</p>
  
  <p>This seems very counter-intuitive and makes the code look dirty. Is there any better alternative to achieve the same goal?</p>
  
  <p>Thanks!</p>