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" xmlns:
aop=
"http://www.springframework.org/schema/aop"
4 xmlns:
tx=
"http://www.springframework.org/schema/tx"
6 http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
7 http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
8 http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd"
9 default-lazy-init=
"false">
12 resource=
"classpath:/org/argeo/slc/hibernate/spring/applicationContext.xml" />
15 class=
"org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
16 <property name=
"systemPropertiesModeName" value=
"SYSTEM_PROPERTIES_MODE_OVERRIDE" />
17 <property name=
"locations">
18 <value>osgibundle:mysql.properties
23 <bean id=
"sessionFactory" parent=
"slcTemplates.sessionFactory.hibernateBasic">
24 <property name=
"dataSource" ref=
"dataSource" />
25 <property name=
"hibernateProperties">
27 hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
28 hibernate.hbm2ddl.auto=update
29 hibernate.connection.autocommit=false
35 class="org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy">
36 <property name="targetDataSource"> <bean
37 class="org.springframework.jdbc.datasource.SingleConnectionDataSource"
38 destroy-method="destroy"> <property name="driverClassName"
39 value="com.mysql.jdbc.Driver" /> <property name="url"
40 value="jdbc:mysql://localhost/sparta_prod" /> <property
41 name="username" value="root" /> <property name="password" value="" />
42 <property name="suppressClose" value="true" /> <property
43 name="autoCommit" value="false" /> </bean> </property> </bean>
45 <bean id=
"dataSource" class=
"org.apache.commons.dbcp.BasicDataSource"
46 destroy-method=
"close">
47 <property name=
"driverClassName" value=
"com.mysql.jdbc.Driver" />
48 <property name=
"url" value=
"${jdbc.url}" />
49 <property name=
"username" value=
"${jdbc.username}" />
50 <property name=
"password" value=
"${jdbc.password}" />
51 <property name=
"testOnBorrow" value=
"true" />
52 <property name=
"validationQuery" value=
"SELECT 1" />
53 <property name=
"maxActive" value=
"10" />
54 <property name=
"maxIdle" value=
"2" />