1 | <?xml version="1.0" encoding="UTF-8"?> |
---|
2 | <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> |
---|
3 | |
---|
4 | <beans> |
---|
5 | <!-- sessionFactory --> |
---|
6 | <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> |
---|
7 | <property name="configLocation"> |
---|
8 | <value>classpath:hibernate-domain.cfg.xml</value> |
---|
9 | </property> |
---|
10 | |
---|
11 | <property name="configurationClass"> |
---|
12 | <value>org.hibernate.cfg.AnnotationConfiguration</value> |
---|
13 | </property> |
---|
14 | |
---|
15 | <property name="hibernateProperties"> |
---|
16 | <props> |
---|
17 | <prop key="hibernate.bytecode.use_reflection_optimizer">false</prop> |
---|
18 | <prop key="hibernate.connection.driver_class">org.postgresql.Driver</prop> |
---|
19 | <!--<prop key="hibernate.connection.url">jdbc:postgresql://darkstar.ipslnet:5432/megapoli_2</prop>--> |
---|
20 | <prop key="hibernate.connection.url">jdbc:postgresql://darkstar.private.ipsl.fr:5432/MEGAPOLI_VM4</prop> |
---|
21 | <prop key="hibernate.connection.username">postgres</prop> |
---|
22 | <prop key="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</prop> |
---|
23 | <prop key="hibernate.show_sql">true</prop> |
---|
24 | <prop key="hibernate.generate_statistics">true</prop> |
---|
25 | </props> |
---|
26 | </property> |
---|
27 | </bean> |
---|
28 | |
---|
29 | <bean id="transactionManager" |
---|
30 | class="org.springframework.orm.hibernate3.HibernateTransactionManager"> |
---|
31 | <property name="sessionFactory" ref="sessionFactory" /> |
---|
32 | </bean> |
---|
33 | |
---|
34 | <bean id="transactionProxy" abstract="true" |
---|
35 | class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"> |
---|
36 | <property name="transactionManager"> |
---|
37 | <ref bean="transactionManager" /> |
---|
38 | </property> |
---|
39 | <property name="transactionAttributes"> |
---|
40 | <props> |
---|
41 | <prop key="insert*">PROPAGATION_REQUIRED</prop> |
---|
42 | <prop key="update*">PROPAGATION_REQUIRED</prop> |
---|
43 | <prop key="save*">PROPAGATION_REQUIRED</prop> |
---|
44 | <prop key="*">PROPAGATION_REQUIRED, readOnly</prop> |
---|
45 | </props> |
---|
46 | </property> |
---|
47 | </bean> |
---|
48 | |
---|
49 | <!-- <bean id="hibernateTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate"> --> |
---|
50 | <!-- <property name="sessionFactory" ref="sessionFactory" /> --> |
---|
51 | <!-- </bean> --> |
---|
52 | |
---|
53 | </beans> |
---|