View difference between Paste ID: Bmbp4GyQ and
SHOW: | | - or go back to the newest paste.
1-
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" xmlns:context="http://www.springframework.org/schema/context"
5
	xmlns:p="http://www.springframework.org/schema/p"
6
	xsi:schemaLocation="
7
       http://www.springframework.org/schema/beans 
8
       http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
9
       http://www.springframework.org/schema/tx 
10
       http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
11
       http://www.springframework.org/schema/aop 
12
       http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
13
       http://www.springframework.org/schema/context
14
       http://www.springframework.org/schema/context/spring-context-2.5.xsd"
15
	default-autowire="byName">
16
17
	<!-- Validation -->
18
	<bean id="validatorFactory"
19
		class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean" />
20
21
22
	<bean id="beanValidationEventListener" class="hibex.dao.BeanValidationEventListener" />
23
24
	<!-- End validation -->
25
26
	<context:annotation-config />
27
	<context:component-scan base-package="hibex" />
28
29
	<bean id="dataSource"
30
		class="org.springframework.jdbc.datasource.DriverManagerDataSource"
31
		p:driverClassName="org.postgresql.Driver" p:url="jdbc:postgresql://localhost:5432/hibex"
32
		p:username="clubspace" p:password="clubspace" />
33
34
	<bean id="sessionFactory"
35
		class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
36
		<property name="dataSource" ref="dataSource" />
37
		<property name="configLocation" value="classpath:/hibernate.cfg.xml" />
38
		<property name="entityInterceptor" ref="beanValidationEventListener" />
39
	</bean>
40
41
	<!-- a PlatformTransactionManager is still required -->
42
	<bean id="transactionManager"
43
		class="org.springframework.orm.hibernate3.HibernateTransactionManager">
44
		<property name="dataSource" ref="dataSource" />
45
	</bean>
46
47
	<tx:annotation-driven />
48
49
	<aop:aspectj-autoproxy />
50
51
	<bean id="managerTemplate" abstract="true">
52
		<property name="sessionFactory">
53
			<ref bean="sessionFactory" />
54
		</property>
55
	</bean>
56
57
	<bean id="ownerManager" class="hibex.dao.GenericManager" parent="managerTemplate">
58
		<constructor-arg value="hibex.bo.OwnerBO" />
59
	</bean>
60
61
	<bean id="petManager" class="hibex.dao.GenericManager" parent="managerTemplate">
62
		<constructor-arg value="hibex.bo.PetBO" />
63
	</bean>
64
</beans>