Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: ccd09100b35a47b98378701ba6a2d2e56b9bd48b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
		"http://www.springframework.org/dtd/spring-beans.dtd">
<beans>

	<!-- ######################################################## -->
	<bean id="propertyConfigurer"
		class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
		<property name="locations">
			<list>
				<value> plugin:/META-INF/server.properties </value>
			</list>
		</property>
	</bean>

	<!--
		CDO Server Part 
	-->

	<!-- ######################################################## -->
	<bean id="oidEncoder" class="org.eclipse.emf.cdo.core.impl.OIDEncoderImpl">
		<property name="fragmentBits">
			<value>48</value>
		</property>
	</bean>

		<!-- ######################################################## -->
	<bean id="packageManager" class="org.eclipse.emf.cdo.server.impl.PackageManagerImpl"/>

	<!-- ######################################################## -->
	<bean id="resourceManager" class="org.eclipse.emf.cdo.server.impl.ResourceManagerImpl"/>

	<!-- ######################################################## -->
	<bean id="columnConverter" class="org.eclipse.emf.cdo.server.impl.ColumnConverterImpl"/>

	<!-- ######################################################## -->
	<bean id="serverCDOProtocol" class="org.eclipse.emf.cdo.server.protocol.ServerCDOProtocolImpl">
		<property name="protocolManager">
			<ref bean="protocolManager"/>
		</property>
		<property name="transactionTemplate">
			<ref local="transactionTemplate"/>
		</property>
		<property name="mapper">
			<ref local="mapper"/>
		</property>
		<property name="serverCDOResProtocol">
			<ref local="serverCDOResProtocol"/>
		</property>
	</bean>

	<!-- ######################################################## -->
	<bean id="serverCDOResProtocol"
		class="org.eclipse.emf.cdo.server.protocol.ServerCDOResProtocolImpl">
		<property name="protocolManager">
			<ref bean="protocolManager"/>
		</property>
		<property name="transactionTemplate">
			<ref local="transactionTemplate"/>
		</property>
		<property name="mapper">
			<ref local="mapper"/>
		</property>
	</bean>

	<!-- ######################################################## -->
	<bean id="dataSource" class="org.eclipse.net4j.spring.db.ContextClassLoaderDataSource">
		<property name="driverClassName">
			<value>${jdbc.driver}</value>
		</property>
		<property name="url">
			<value>${jdbc.url}</value>
		</property>
		<property name="username">
			<value>${jdbc.username}</value>
		</property>
		<property name="password">
			<value>${jdbc.password}</value>
		</property>
	</bean>

	<!-- ######################################################## -->
	<bean id="transactionManager"
		class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
		<property name="dataSource">
			<ref local="dataSource"/>
		</property>
	</bean>

	<!-- ######################################################## -->
	<bean id="transactionTemplate"
		class="org.springframework.transaction.support.TransactionTemplate">
		<property name="transactionManager">
			<ref local="transactionManager"/>
		</property>
	</bean>

	<!-- ######################################################## -->
	<bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
		<property name="dataSource">
			<ref local="dataSource"/>
		</property>
	</bean>

	<!-- ######################################################## -->
	<bean id="mapper" class="org.eclipse.emf.cdo.server.impl.MapperImpl">
		<property name="columnConverter">
			<ref local="columnConverter"/>
		</property>
		<property name="packageManager">
			<ref local="packageManager"/>
		</property>
		<property name="resourceManager">
			<ref local="resourceManager"/>
		</property>
		<property name="dataSource">
			<ref local="dataSource"/>
		</property>
		<property name="jdbcTemplate">
			<ref local="jdbcTemplate"/>
		</property>
		<property name="oidEncoder" >
			<ref bean="oidEncoder"/>
		</property>
		<property name="sqlDialectName">
			<value>${jdbc.dialect}</value>
		</property>
	</bean>

</beans>

Back to the top