Project

General

Profile

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:jaxws="http://cxf.apache.org/jaxws"
4
	xmlns:sec="http://cxf.apache.org/configuration/security" xmlns:wsa="http://cxf.apache.org/ws/addressing"
5
	xmlns:p="http://www.springframework.org/schema/p" xmlns:http="http://cxf.apache.org/transports/http/configuration"
6
	xmlns:util="http://www.springframework.org/schema/util" xmlns:t="http://dnetlib.eu/springbeans/t"
7
	xmlns:template="http://dnetlib.eu/springbeans/template" xmlns:tx="http://www.springframework.org/schema/tx"
8
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
9
                            http://cxf.apache.org/ws/addressing http://cxf.apache.org/schemas/ws-addr-conf.xsd
10
                            http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd
11
                            http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd
12
                            http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
13
                            http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
14
                            http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd
15
                            http://dnetlib.eu/springbeans/template http://dnetlib.eu/springbeans/template.xsd">		
16

    
17
	<bean id="postgresDataSourceFactory"
18
		class="eu.dnetlib.enabling.database.DataSourceFactoryImpl"
19
		p:driverClassName="org.postgresql.Driver"
20
		p:baseUrl="${dnet.dbservice.postgres.baseurl}"
21
		p:username="${dnet.dbservice.postgres.username}"
22
		p:password="${dnet.dbservice.postgres.password}" />
23
	
24
	<bean id="transactionTemplateFactory" 
25
	 	class="eu.dnetlib.enabling.database.TransactionTemplateFactoryImpl" />
26
	
27
	<bean id="jdbcTemplateFactory"
28
		class="eu.dnetlib.enabling.database.utils.JdbcTemplateFactory"
29
	    p:fetchSize="${dnet.dbservice.jdbc.fetchsize}"
30
		p:dataSourceFactory-ref="postgresDataSourceFactory" />
31
	
32
	<bean id="databaseService"
33
		class="eu.dnetlib.enabling.database.DatabaseServiceImpl" 
34
		p:core-ref="dbCore"
35
		p:blackBoardNotificationHandler-ref="dbBlackBoardNotificationHandler"
36
		p:xsltResultsetFactory-ref="xsltResultSetFactory" />
37
		
38
	<bean id="dbBlackBoardNotificationHandler"
39
		class="eu.dnetlib.enabling.database.DatabaseBlackBoardNotificationHandler"
40
		p:blackboardHandler-ref="blackboardHandler"	p:core-ref="dbCore" 
41
		p:xsltResultsetFactory-ref="xsltResultSetFactory" />
42

    
43
	<bean id="dbCore"
44
		class="eu.dnetlib.enabling.database.DatabaseServiceCore"  
45
		p:dbUtils-ref="dbUtils"
46
		p:resultSetFactory-ref="resultSetFactory"
47
		p:resultSetListenerFactory-ref="sqlResultSetListenerFactory"
48
		p:clientResultSetFactory-ref="resultSetClientFactory" />
49
		
50
	<bean id="dbUtils" 
51
		class="eu.dnetlib.enabling.database.utils.DatabaseUtils"
52
		p:jdbcTemplateFactory-ref="jdbcTemplateFactory"
53
		p:transactionTemplateFactory-ref="transactionTemplateFactory"
54
		p:dataSourceFactory-ref="postgresDataSourceFactory" 
55
		p:velocityEngine-ref="velocityEngine" 
56
		p:dbPrefix="${dnet.dbservice.postgres.db.prefix}"
57
		p:defaultDB="${dnet.dbservice.postgres.default.db}"
58
		p:numbersOfRecordsForTransaction="${dnet.dbservice.transaction.numbersOfRecords}" />
59

    
60
	<bean id="velocityEngine" class="org.springframework.ui.velocity.VelocityEngineFactoryBean">
61
		<property name="velocityProperties">
62
			<value>
63
				resource.loader=class
64
				class.resource.loader.class=org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
65
         </value>
66
		</property>
67
	</bean>
68
	
69
	<bean id="sqlResultSetListenerFactory"
70
		class="eu.dnetlib.enabling.database.resultset.SQLResultSetListenerFactory"
71
		p:dbUtils-ref="dbUtils" />
72
		
73
	<!-- endpoints -->
74
	<jaxws:endpoint id="databaseServiceEndpoint" implementor="#databaseService"
75
		implementorClass="eu.dnetlib.enabling.database.rmi.DatabaseService"
76
		address="/database" />
77
	
78
	<template:instance name="serviceRegistrationManager"
79
		t:serviceRegistrationManagerClass="eu.dnetlib.enabling.tools.registration.ValidatingServiceRegistrationManagerImpl"
80
		t:name="databaseServiceRegistrationManager" t:service="databaseService"
81
		t:endpoint="databaseServiceEndpoint" t:jobScheduler="jobScheduler"
82
		t:serviceRegistrator="blackboardServiceRegistrator" />
83
	
84
</beans>
(2-2/2)