source: raptor-mua/trunk/src/main/config/database.xml @ 1509

Revision 1509, 5.8 KB checked in by philsmart, 7 years ago (diff)
  • Property svn:mime-type set to text/plain
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!-- Copyright (C) 2010 Cardiff University, Wales <smartp@cf.ac.uk> Licensed under the Apache License, Version 2.0 (the "License");
3    you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4    Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS
5    IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language
6    governing permissions and limitations under the License. -->
7
8<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
10
11
12    <!-- HIBERNATE DAO -->
13    <bean id="muaSessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
14        <property name="dataSource">
15            <ref local="muac3p0DataSource" />
16        </property>
17        <property name="hibernateProperties">
18            <props>
19                <prop key="hibernate.dialect"> org.hibernate.dialect.PostgreSQLDialect</prop>
20                <!-- <prop key="hibernate.dialect"> org.hibernate.dialect.HSQLDialect</prop> -->
21                <!-- <prop key="hibernate.dialect"> org.hibernate.dialect.MySQLDialect</prop> -->
22                <!-- <prop key="hibernate.dialect"> org.hibernate.dialect.OracleDialect</prop> -->
23                <prop key="hibernate.show_sql">true</prop>
24                <prop key="hibernate.hbm2ddl.auto">update</prop>
25            </props>
26        </property>
27        <!-- OR mapping files. -->
28        <property name="mappingResources">
29            <list>
30                <value>uk/ac/cardiff/model/event/event-name-limit.hbm.xml</value>
31                <value>uk/ac/cardiff/model/resource/resourcemetadata.hbm.xml</value>
32                <value>uk/ac/cardiff/raptor/registry/releaseInformation.hbm.xml</value>
33            </list>
34        </property>
35    </bean>
36
37
38    <bean id="muac3p0DataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">
39        <property name="driverClass">
40            <value>org.postgresql.Driver</value>
41        </property>
42        <property name="jdbcUrl">
43            <value>jdbc:postgresql://localhost/mua</value>
44        </property>
45        <property name="properties">
46            <props>
47                <prop key="c3p0.acquire_increment">5</prop>
48                <prop key="c3p0.idle_test_period">100</prop>
49                <prop key="c3p0.max_size">100</prop>
50                <prop key="c3p0.max_statements">0</prop>
51                <prop key="c3p0.min_size">10</prop>
52                <prop key="user">philsmart</prop>
53                <prop key="password"></prop>
54            </props>
55        </property>
56    </bean>
57
58    <bean id="muac3p0DataSourceOracle" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">
59        <property name="driverClass">
60            <value>oracle.jdbc.driver.OracleDriver</value>
61        </property>
62        <property name="jdbcUrl">
63            <value>jdbc:oracle:thin:@didmodb01:1521:idmndev1</value>
64        </property>
65        <property name="properties">
66            <props>
67                <prop key="c3p0.acquire_increment">5</prop>
68                <prop key="c3p0.idle_test_period">100</prop>
69                <prop key="c3p0.max_size">10</prop>
70                <prop key="c3p0.max_statements">0</prop>
71                <prop key="c3p0.min_size">10</prop>
72                <prop key="user">idman</prop>
73                <prop key="password">lhk27be</prop>
74            </props>
75        </property>
76    </bean>
77
78
79
80    <!-- IF HSQLDB is choosen, the following database connection properties should be used -->
81
82
83    <bean id="muac3p0DataSourceHSQLDB" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">
84        <property name="driverClass">
85            <value>org.hsqldb.jdbcDriver</value>
86        </property>
87        <property name="jdbcUrl">
88            <value>jdbc:hsqldb:file:data/mua;hsqldb.default_table_type=cached</value>
89        </property>
90        <property name="user">
91            <value>sa</value>
92        </property>
93        <property name="password">
94            <value></value>
95        </property>
96        <property name="properties">
97            <props>
98                <prop key="c3p0.acquire_increment">5</prop>
99                <prop key="c3p0.idle_test_period">100</prop>
100                <prop key="c3p0.max_size">100</prop>
101                <prop key="c3p0.max_statements">0</prop>
102                <prop key="c3p0.min_size">10</prop>
103                <prop key="user">sa</prop>
104                <prop key="password"></prop>
105            </props>
106        </property>
107    </bean>
108
109    <!-- Users of MySQL can use the following c3p0 configuration as a template -->
110
111    <bean id="muac3p0DataSourceMySQL" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">
112        <property name="driverClass">
113            <value>com.mysql.jdbc.Driver</value>
114        </property>
115        <property name="jdbcUrl">
116            <value>jdbc:mysql://localhost/mua</value>
117        </property>
118        <property name="user">
119            <value>root</value>
120        </property>
121        <property name="password">
122            <value></value>
123        </property>
124        <property name="properties">
125            <props>
126                <prop key="c3p0.acquire_increment">5</prop>
127                <prop key="c3p0.idle_test_period">100</prop>
128                <prop key="c3p0.max_size">100</prop>
129                <prop key="c3p0.max_statements">0</prop>
130                <prop key="c3p0.min_size">10</prop>
131                <prop key="user">root</prop>
132                <prop key="password"></prop>
133            </props>
134        </property>
135    </bean>
136
137
138
139
140</beans>
Note: See TracBrowser for help on using the repository browser.