]> git.argeo.org Git - gpl/argeo-slc.git/blob - modules/server/org.argeo.slc.server.mysql/META-INF/spring/mysql.xml
Move server modules
[gpl/argeo-slc.git] / modules / server / org.argeo.slc.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="ignoreUnresolvablePlaceholders" value="true" />
18 <property name="locations">
19 <value>osgibundle:mysql.properties
20 </value>
21 </property>
22 </bean>
23
24 <bean id="sessionFactory" parent="slcTemplates.sessionFactory.hibernateBasic">
25 <property name="dataSource" ref="dataSource" />
26 <property name="hibernateProperties">
27 <value><![CDATA[
28 hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
29 hibernate.hbm2ddl.auto=update
30 hibernate.connection.autocommit=false
31 ]]></value>
32 </property>
33 </bean>
34 <!--
35 <bean id="dataSource"
36 class="org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy">
37 <property name="targetDataSource">
38 <bean
39 class="org.springframework.jdbc.datasource.SingleConnectionDataSource"
40 destroy-method="destroy">
41 <property name="driverClassName" value="com.mysql.jdbc.Driver" />
42 <property name="url" value="jdbc:mysql://localhost/sparta_prod" />
43 <property name="username" value="root" />
44 <property name="password" value="" />
45 <property name="suppressClose" value="true" />
46 <property name="autoCommit" value="false" />
47 </bean>
48 </property>
49 </bean>
50 -->
51 <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
52 destroy-method="close">
53 <property name="driverClassName" value="com.mysql.jdbc.Driver" />
54 <property name="url" value="${jdbc.url}" />
55 <property name="username" value="${jdbc.username}" />
56 <property name="password" value="${jdbc.password}" />
57 </bean>
58
59
60
61 </beans>