Changeset 263


Ignore:
Timestamp:
11/25/10 17:44:43 (2 years ago)
Author:
philsmart
Message:
 
Location:
UA/trunk/src/main
Files:
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • UA/trunk/src/main/webapp/WEB-INF/beans.xml

    r179 r263  
    114114        <!--  DONE --> 
    115115 
     116        <!--  HIBERNATE DAO --> 
     117        <bean id="icaSessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> 
     118                <property name="dataSource"><ref local="icaDatasource" /> 
     119                </property> 
     120                <property name="hibernateProperties"> 
     121                        <props> 
     122                                <prop key="hibernate.dialect"> org.hibernate.dialect.PostgreSQLDialect</prop> <!-- database type --> 
     123                                <prop key="hibernate.show_sql">false</prop>  <!-- outputs the SQL queries used to the standard logger --> 
     124                          <prop key="hibernate.hbm2ddl.auto">create</prop> <!-- update changes the db if mapping changes, creates the db if none exists, in production do not use any of these 
     125--> 
     126                                <prop key="hibernate.c3p0.minPoolSize">5</prop> <!-- IMPORTANT this then uses the c3po pooling which is better than hibs implementation for production systems 
     127--> 
     128                                <prop key="hibernate.c3p0.maxPoolSize">20</prop> 
     129                                <prop key="hibernate.c3p0.timeout">600</prop> 
     130                                <prop key="hibernate.c3p0.max_statement">50</prop> 
     131                        </props> 
     132                </property> 
     133                <!--  OR mapping files. --> 
     134                <property name="mappingResources"> 
     135                        <list> 
     136                                <value>uk/ac/cardiff/model/entry.hbm.xml</value> 
     137                        </list> 
     138                </property> 
     139        </bean> 
     140 
     141                <!-- 
     142                Set Up Basic Apache DataSource for accessing the hibernate database 
     143        --> 
     144        <bean id="icaDatasource" class="org.apache.commons.dbcp.BasicDataSource" 
     145                destroy-method="close"> 
     146                <property name="driverClassName" value="org.postgresql.Driver" /> 
     147                <property name="url" value="jdbc:postgresql://localhost/ica" /> 
     148                <property name="username" value="postgres" /> 
     149                <property name="password" value="" /> <!--  no password, bad idea! --> 
     150        </bean> 
     151 
     152 
    116153        <import resource="collector-registry.xml" /> 
    117154 
Note: See TracChangeset for help on using the changeset viewer.