title: Transactional+AbstractRoutingDataSource+EntityManager
body: <p>I have two data sources with different PlatformTransactionManager, LocalContainerEntityManagerFactoryBean</p>
  
  <p>I have RoutingDataSource class which extends org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource to route right data source for each PlatformTransactionManager. </p>
  
  <p>I have annoated manager method with 
  org.springframework.transaction.annotation.Transactional as @Transactional(value="reportingDatasource")</p>
  
  <p>I have javax.persistence.EntityManager declaration in my Repository to execute some queries. </p>
  
  <p>That EntityManager declaration expects PersistenceContext with unitName as mentioned below to identify different Datasource. Is there any way to use one EntityManager declaration where Transactional will route to expected data source based on the value specified </p>
  
  <p>@PersistenceContext(unitName="master")
  private EntityManager em;</p>
  
  <p>@PersistenceContext(unitName="reporing")
  private EntityManager reportEm;</p>
  
  <p>If i didn't specify unitName it is throwing this error "No qualifying bean of type 'javax.persistence.EntityManagerFactory' available: expected single matching bean but found 2" </p>