Autowiring Spring Method in XML
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN"
"http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans>
<!-- Beans to retrieve Persistence Manager -->
<!-- Static method -->
<bean id="persistenceManagerFactory" class="javax.jdo.JDOHelper"
factory-method="getPersistenceManagerFactory">
<constructor-arg value="transactions-optional" />
</bean>
<!-- Non static method -->
<bean id="persistenceManager" factory-bean="persistenceManagerFactory"
factory-method="getPersistenceManager" destroy-method="close">
</bean>
</beans>
0 comments:
Post a Comment