Instead of instantiating a PersistenceManagerFactory within my app like this:
Properties properties = new Properties();
properties.setProperty("javax.jdo.PersistenceManagerFactoryClass",
"org.datanucleus.jdo.JDOPersistenceManagerFactory");
properties.setProperty("javax.jdo.option.ConnectionDriverName","com.mysql.jdbc.Driver");
properties.setProperty("javax.jdo.option.ConnectionURL","jdbc:mysql://localhost/myDB");
properties.setProperty("javax.jdo.option.ConnectionUserName","login");
properties.setProperty("javax.jdo.option.ConnectionPassword","password");
PersistenceManagerFactory pmf = JDOHelper.getPersistenceManagerFactory(properties);
I want to configure it for dependency injection in Spring something like this:
<bean id="persistenceManagerFactory" class="org.springframework.orm.jdo.LocalPersistenceManagerFactoryBean" lazy-init="true">
<property name="persistenceManagerFactoryName" value="transactions-optional" />
</bean>
But I'm not sure how to pass the Properties in the application-context.xml (without using a jdoconfig.xml).
Is it possible in the application-context.xml to pass all of these Properties values for Autowiring?