Here is a fragment from my ApplicationContext.xml file:
This works as long as I only have a single Persistence Unit in my persistence.xml. Since I would like to have multiple persistence units to try out different JPA providers, how would I inject the peristence unit name into the emf bean? I cannot determine if we are using constructor injection or setter injection since loadTimeWeaver does not seam to be a constructor argument and I don't see a setter by that name either in that class or the abstract ancestor. http://static.springsource.org/sprin...ctoryBean.html.
<bean id="emf" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> <property name="loadTimeWeaver"> <bean class="org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver"/> </property> </bean>