source: raptor-distribution/MSIs/raptor-mua/tags/v1.0.1/source/mua/conf/database.xml @ 1725

Revision 1725, 4.5 KB checked in by rhyssmith, 5 years ago (diff)

Tagging raptor-mua v1.0.1-1 release of Raptor MUA MSI

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