Project

General

Profile

Download (2.68 KB) Statistics
| Branch: | Tag: | Revision:
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:context="http://www.springframework.org/schema/context"
4
	xmlns:tx="http://www.springframework.org/schema/tx" xmlns:aop="http://www.springframework.org/schema/aop"
5
	xsi:schemaLocation="http://www.springframework.org/schema/beans 
6
    http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
7
    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
8
    http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
9
    http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
10
    ">
11

    
12
	<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
13
		<property name="sessionFactory" ref="sessionFactory" />
14
	</bean>
15
	
16
	<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
17
	    <property name="namingStrategy">
18
	    	<bean class="org.hibernate.cfg.DefaultComponentSafeNamingStrategy" />
19
	    </property>
20
	    
21
		<!-- <property name="entityInterceptor">
22
    		<bean class="eu.etaxonomy.cdm.persistence.hibernate.CdmHibernateInterceptor" />
23
    	</property>
24
 	     
25
  		 <property name="entityInterceptor">
26
    		<bean class="eu.etaxonomy.cdm.persistence.hibernate.CdmSecurityHibernateInterceptor"/>
27
  		</property>
28
  		-->
29
	    <property name="configLocation" value="classpath:eu/etaxonomy/cdm/hibernate.cfg.xml"/>
30
	    <property  name="configurationClass" value="org.hibernate.cfg.AnnotationConfiguration"/>
31
	    <!--
32
            If dataSource is set, this will override corresponding settings in Hibernate properties.
33
            If this is set, the Hibernate settings should not define a connection provider to 
34
            avoid meaningless double configuration.
35
            
36
            see also org.springframework.orm.hibernate3.AbstractSessionFactoryBean.setDataSource(DataSource dataSource)
37
         --> 
38
	    <property name="dataSource" ref="dataSource"/>
39
	    <property name="hibernateProperties" ref="hibernateProperties"/>
40
	</bean>
41
	
42
	<!-- 
43
	   Configuration for the BeanInitialization
44
	 -->
45
	<bean id="titleCacheAutoInitializer" class="eu.etaxonomy.cdm.persistence.dao.TitleCacheAutoInitializer"></bean>
46
	<bean id="defaultBeanInitializer" class="eu.etaxonomy.cdm.persistence.dao.hibernate.HibernateBeanInitializer">
47
	   <property name="beanAutoInitializers">
48
	       <map>
49
	           <entry key="eu.etaxonomy.cdm.model.common.IdentifiableEntity"  value-ref="titleCacheAutoInitializer" />
50
	       </map>
51
	   </property>
52
	</bean>
53
	
54
	
55
</beans>
(5-5/6)