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/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.connection.driver_class">com.mysql.jdbc.Driver</prop> |
---|
23 | <prop key="hibernate.connection.url">jdbc:mysql://localhost/geisa</prop> |
---|
24 | <!-- en local--> |
---|
25 | <prop key="hibernate.connection.username">root</prop> |
---|
26 | <!-- sur naboo --> |
---|
27 | <!-- <prop key="hibernate.connection.username">geisa</prop>--> |
---|
28 | <prop key="hibernate.connection.password">geisa11</prop> |
---|
29 | <prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop> |
---|
30 | <prop key="hibernate.show_sql">true</prop> |
---|
31 | <prop key="hibernate.generate_statistics">true</prop> |
---|
32 | </props> |
---|
33 | </property> |
---|
34 | </bean> |
---|
35 | |
---|
36 | <bean id="transactionManager" |
---|
37 | class="org.springframework.orm.hibernate3.HibernateTransactionManager"> |
---|
38 | <property name="sessionFactory" ref="sessionFactory" /> |
---|
39 | </bean> |
---|
40 | |
---|
41 | <bean id="transactionProxy" abstract="true" |
---|
42 | class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"> |
---|
43 | <property name="transactionManager"> |
---|
44 | <ref bean="transactionManager" /> |
---|
45 | </property> |
---|
46 | <property name="transactionAttributes"> |
---|
47 | <props> |
---|
48 | <prop key="insert*">PROPAGATION_REQUIRED</prop> |
---|
49 | <prop key="update*">PROPAGATION_REQUIRED</prop> |
---|
50 | <prop key="save*">PROPAGATION_REQUIRED</prop> |
---|
51 | <prop key="*">PROPAGATION_REQUIRED, readOnly</prop> |
---|
52 | </props> |
---|
53 | </property> |
---|
54 | </bean> |
---|
55 | |
---|
56 | <!-- <bean id="hibernateTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate"> --> |
---|
57 | <!-- <property name="sessionFactory" ref="sessionFactory" /> --> |
---|
58 | <!-- </bean> --> |
---|
59 | |
---|
60 | </beans> |
---|