<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName">
<value>com.progress.sql.jdbc.JdbcProgressDriver</value>
</property>
<property name="url">
<value>jdbc:jdbcprogress:T:your-db-machine:your-db-port:your-db-name;</value>
</property>
<property name="username">
<value>blahblah</value>
</property>
<property name="password">
<value>blahblah</value>
</property>
</bean>
<!-- Hibernate SessionFactory -->
<bean id="sessionFactory" class="org.springframework.orm.hibernate.LocalSessionFactoryBean">
<property name="dataSource">
<ref local="dataSource"/>
</property>
<property name="mappingResources">
<list>
<value>your/class/package/Mapping.hbm.xml</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">net.sf.hibernate.dialect.ProgressDialect</prop>
<prop key="hibernate.connection.driver_class">com.progress.sql.jdbc.JdbcProgressDriver</prop>
<prop key="hibernate.connection.url">jdbc:jdbcprogress:T:your-db-machine:your-db-port:your-db-name;</prop>
<prop key="hibernate.connection.username">sysprogress</prop>
<prop key="hibernate.connection.password">password</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.query.substitutions">Y</prop>
</props>
</property>
</bean>
<!-- Transaction manager for a single Hibernate SessionFactory (alternative to JTA) -->
<bean id="transactionManager" class="org.springframework.orm.hibernate.HibernateTransactionManager">
<property name="sessionFactory">
<ref local="sessionFactory"/>
</property>
</bean>
<!-- New stuff-->
<bean id="progTarget" class="com.your-stuff-here.ProgressDAO">
<property name="sessionFactory"><ref local="sessionFactory"/></property>
</bean>
<bean id="prog" parent="txProxyTemplate">
<property name="target">
<ref local="progTarget"/>
</property>
</bean>
<bean id="txProxyTemplate" lazy-init="true"
class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="transactionManager"><ref local="transactionManager"/></property>
<property name="transactionAttributes">
<props>
<prop key="get*">PROPAGATION_REQUIRED,readOnly</prop>
<prop key="refresh">PROPAGATION_REQUIRED,readOnly</prop>
<prop key="merge">PROPAGATION_REQUIRED</prop>
<prop key="delete*">PROPAGATION_REQUIRED</prop>
<prop key="save">PROPAGATION_REQUIRED</prop>
<prop key="create*">PROPAGATION_REQUIRES_NEW</prop>
<prop key="copy*">PROPAGATION_REQUIRES_NEW</prop>
<prop key="authenticate">PROPAGATION_REQUIRED,readOnly</prop>
</props>
</property>
</bean>
<!-- End new stuff -->
<!-- Add DAOs here -->
<bean id="progressDAO" class="com.your-stuff-here.ProgressDAO">
<property name="sessionFactory">
<ref local="sessionFactory"/>
</property>
</bean>
</beans>