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:dataSourceFactory-ref="postgresDataSourceFactory" />
30
	
31
	<bean id="databaseService"
32
		class="eu.dnetlib.enabling.database.DatabaseServiceImpl" 
33
		p:core-ref="dbCore"
34
		p:blackBoardNotificationHandler-ref="dbBlackBoardNotificationHandler"/>
35
		
36
	<bean id="dbBlackBoardNotificationHandler"
37
		class="eu.dnetlib.enabling.database.DatabaseBlackBoardNotificationHandler"
38
		p:blackboardHandler-ref="blackboardHandler"	p:core-ref="dbCore" />
39

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

    
54
	<bean id="velocityEngine" class="org.springframework.ui.velocity.VelocityEngineFactoryBean">
55
		<property name="velocityProperties">
56
			<value>
57
				resource.loader=class
58
				class.resource.loader.class=org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
59
         </value>
60
		</property>
61
	</bean>
62
	
63
	<bean id="sqlResultSetListenerFactory"
64
		class="eu.dnetlib.enabling.database.resultset.SQLResultSetListenerFactory"
65
		p:dbUtils-ref="dbUtils" />
66
		
67
	<!-- endpoints -->
68
	<jaxws:endpoint id="databaseServiceEndpoint" implementor="#databaseService"
69
		implementorClass="eu.dnetlib.rmi.data.DatabaseService"
70
		address="/database" />
71
	
72
</beans>
(2-2/2)