title: EntityManager type in spring
body: <p>I have spring project at which most of the service layer are injected with entityManager</p>
  
  <pre><code>@Autowired
  EntityManager entityManager;
  </code></pre>
  
  <p>the configuration for the DB</p>
  
  <pre><code>&lt;bean id="dataSource" class="org.apache.commons.dbcp2.BasicDataSource" destroy-method="close"&gt;
      &lt;property name="driverClassName" value="${spring.datasource.driverClassName}" /&gt;
      .
  
  &lt;/bean&gt;
  
  &lt;bean id="entityManagerFactory"
      class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"
      p:dataSource-ref="dataSource" p:packagesToScan="com.wsg.admin.api.model"
      p:jpaVendorAdapter-ref="hibernateJpaVendorAdapter"&gt;
  
      &lt;property name="jpaProperties"&gt;
          &lt;props&gt;
              &lt;prop key="hibernate.cache.use_second_level_cache"&gt;false&lt;/prop&gt;
              .
          &lt;/props&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>how i can get the type of the entity manager (Extended or Transnational scoped) ?</p>