Skip to content

Instantly share code, notes, and snippets.

@mangrar
Created May 14, 2010 07:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mangrar/400906 to your computer and use it in GitHub Desktop.
Save mangrar/400906 to your computer and use it in GitHub Desktop.
Setting up JDO with spring
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<bean id="persistenceManagerFactory"
class="org.springframework.orm.jdo.LocalPersistenceManagerFactoryBean">
<property name="persistenceManagerFactoryName" value="transactions-optional" />
</bean>
<bean id="jdoTemplate" class="org.springframework.orm.jdo.JdoTemplate">
<constructor-arg ref="persistenceManagerFactory"/>
</bean>
<bean id="MyDao" class="com.mypkg.myapp.dao.MyDao">
<property name="jdoTemplate" ref="jdoTemplate" />
</bean>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment