]> git.argeo.org Git - lgpl/argeo-commons.git/blob - server/modules/org.argeo.server.mysql/META-INF/spring/mysql.xml
[maven-release-plugin] copy for tag argeo-commons-0.1.2
[lgpl/argeo-commons.git] / server / modules / org.argeo.server.mysql / META-INF / spring / mysql.xml
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"
5 xsi:schemaLocation="
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">
10
11 <import
12 resource="classpath:/org/argeo/slc/hibernate/spring/applicationContext.xml" />
13
14 <bean
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
19 </value>
20 </property>
21 </bean>
22
23 <bean id="sessionFactory" parent="slcTemplates.sessionFactory.hibernateBasic">
24 <property name="dataSource" ref="dataSource" />
25 <property name="hibernateProperties">
26 <value><![CDATA[
27 hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
28 hibernate.hbm2ddl.auto=update
29 hibernate.connection.autocommit=false
30 ]]></value>
31 </property>
32 </bean>
33 <!--
34 <bean id="dataSource"
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>
44 -->
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="${argeo.server.jdbc.url}" />
49 <property name="username" value="${argeo.server.jdbc.username}" />
50 <property name="password" value="${argeo.server.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" />
55 </bean>
56
57
58
59 </beans>