fb66e86b18e0ca1b12fa45179b2896fac3ab9f51
[utils] /
1 <?xml version="1.0" encoding="UTF-8"?>
2 <beans xmlns="http://www.springframework.org/schema/beans"
3         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4         xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
5
6         <!-- bean id="namingStrategy" class="nl.jmonks.system.hibernate.JMonksNamingStrategy"> </bean -->
7
8         <!-- bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
9                 <property name="dataSource">
10                         <ref bean="dataSource"/>
11                 </property>
12                 <property name="hibernateProperties">
13                         <props>
14                                 <prop key="hibernate.dialect">${hibernate.dialect}</prop>
15                 <prop key="hibernate.cache.provider_class">${hibernate.cache.provider}</prop>
16                 <prop key="hibernate.show_sql">${hibernate.show_sql}</prop>
17                 <prop key="hibernate.cache.use_query_cache">${hibernate.cache.use_query_cache}</prop>
18                                 <prop key="hibernate.query.substitutions">true 1, false 0</prop>
19                    </props>
20                 </property>
21                 <property name="annotatedClasses">
22                         <list>
23                                 <value>org.wamblee.mythtv.Channel</value>
24                                 <value>org.wamblee.mythtv.Recording</value>
25                         </list>
26                 </property>
27                 
28         </bean -->
29
30         <!-- bean id="hibernateTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate">
31                 <property name="sessionFactory">
32                         <ref bean="sessionFactory"/>
33                 </property>
34         </bean -->
35
36         <!-- bean id="transactionManager"
37                 class="org.springframework.orm.hibernate3.HibernateTransactionManager">
38                 <property name="sessionFactory">
39                         <ref local="sessionFactory"/>
40                 </property>
41                 </bean -->
42         
43         <bean id="entityManager" class="org.springframework.jndi.JndiObjectFactoryBean">
44                 <property name="jndiName"><value>java:comp/env/persistence/mythtv</value></property>
45         </bean>
46
47         <bean id="transactionManager"
48                 class="org.springframework.transaction.jta.JtaTransactionManager">
49                 
50         </bean>
51
52         <!-- Abstract bean. Subclass this bean and specify the target property to
53          wrap a bean with transactions -->
54         <bean abstract="true" id="transactionRequiredTemplate"
55                 class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
56                 <property name="transactionManager" ref="transactionManager"/>
57                 <property name="transactionAttributes">
58                         <props>
59                                 <prop key="*">PROPAGATION_REQUIRED</prop>
60                         </props>
61                 </property>
62         </bean>
63
64
65 </beans>