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">
11 <import resource=
"classpath:/org/argeo/slc/hibernate/spring.xml" />
14 class=
"org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
15 <property name=
"systemPropertiesModeName" value=
"SYSTEM_PROPERTIES_MODE_OVERRIDE" />
16 <property name=
"locations">
17 <value>osgibundle:mysql.properties
22 <bean id=
"sessionFactory" parent=
"slcTemplates.sessionFactory.hibernateBasic">
23 <property name=
"dataSource" ref=
"dataSource" />
24 <property name=
"hibernateProperties">
26 hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
27 hibernate.hbm2ddl.auto=update
28 hibernate.connection.autocommit=false
34 class="org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy">
35 <property name="targetDataSource"> <bean
36 class="org.springframework.jdbc.datasource.SingleConnectionDataSource"
37 destroy-method="destroy"> <property name="driverClassName"
38 value="com.mysql.jdbc.Driver" /> <property name="url"
39 value="jdbc:mysql://localhost/sparta_prod" /> <property
40 name="username" value="root" /> <property name="password" value="" />
41 <property name="suppressClose" value="true" /> <property
42 name="autoCommit" value="false" /> </bean> </property> </bean>
44 <bean id=
"dataSource" class=
"org.apache.commons.dbcp.BasicDataSource"
45 destroy-method=
"close">
46 <property name=
"driverClassName" value=
"com.mysql.jdbc.Driver" />
47 <property name=
"url" value=
"${jdbc.url}" />
48 <property name=
"username" value=
"${jdbc.username}" />
49 <property name=
"password" value=
"${jdbc.password}" />
50 <property name=
"testOnBorrow" value=
"true" />
51 <property name=
"validationQuery" value=
"SELECT 1" />
52 <property name=
"maxActive" value=
"10" />
53 <property name=
"maxIdle" value=
"2" />