[378] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
---|
[376] | 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/PROJECT_SOURCE</prop> |
---|
| 20 | <prop key="hibernate.connection.username">postgres</prop> |
---|
| 21 | <prop key="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</prop> |
---|
| 22 | <prop key="hibernate.show_sql">true</prop> |
---|
| 23 | <prop key="hibernate.generate_statistics">true</prop> |
---|
| 24 | </props> |
---|
| 25 | </property> |
---|
| 26 | </bean> |
---|
| 27 | |
---|
| 28 | <bean id="transactionManager" |
---|
| 29 | class="org.springframework.orm.hibernate3.HibernateTransactionManager"> |
---|
| 30 | <property name="sessionFactory" ref="sessionFactory" /> |
---|
| 31 | </bean> |
---|
| 32 | |
---|
| 33 | <bean id="transactionProxy" abstract="true" |
---|
| 34 | class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"> |
---|
| 35 | <property name="transactionManager"> |
---|
| 36 | <ref bean="transactionManager" /> |
---|
| 37 | </property> |
---|
| 38 | <property name="transactionAttributes"> |
---|
| 39 | <props> |
---|
| 40 | <prop key="insert*">PROPAGATION_REQUIRED</prop> |
---|
| 41 | <prop key="update*">PROPAGATION_REQUIRED</prop> |
---|
| 42 | <prop key="save*">PROPAGATION_REQUIRED</prop> |
---|
| 43 | <prop key="*">PROPAGATION_REQUIRED, readOnly</prop> |
---|
| 44 | </props> |
---|
| 45 | </property> |
---|
| 46 | </bean> |
---|
| 47 | |
---|
| 48 | <!-- <bean id="hibernateTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate"> --> |
---|
| 49 | <!-- <property name="sessionFactory" ref="sessionFactory" /> --> |
---|
| 50 | <!-- </bean> --> |
---|
| 51 | |
---|
| 52 | </beans> |
---|