Michael Hanl | bd852b8 | 2015-11-18 22:17:00 +0100 | [diff] [blame] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
margaretha | 62055f7 | 2017-04-11 19:17:43 +0200 | [diff] [blame] | 3 | xmlns:p="http://www.springframework.org/schema/p" xmlns:util="http://www.springframework.org/schema/util" |
| 4 | xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx" |
margaretha | ade7d4a | 2017-07-20 19:53:35 +0200 | [diff] [blame] | 5 | xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context" |
| 6 | xmlns:cache="http://www.springframework.org/schema/cache" |
margaretha | 62055f7 | 2017-04-11 19:17:43 +0200 | [diff] [blame] | 7 | xsi:schemaLocation="http://www.springframework.org/schema/beans |
margaretha | ade7d4a | 2017-07-20 19:53:35 +0200 | [diff] [blame] | 8 | http://www.springframework.org/schema/beans/spring-beans-4.0.xsd |
| 9 | http://www.springframework.org/schema/tx |
| 10 | http://www.springframework.org/schema/tx/spring-tx-4.0.xsd |
| 11 | http://www.springframework.org/schema/aop |
| 12 | http://www.springframework.org/schema/aop/spring-aop-4.0.xsd |
| 13 | http://www.springframework.org/schema/context |
| 14 | http://www.springframework.org/schema/context/spring-context-4.0.xsd |
| 15 | http://www.springframework.org/schema/util |
| 16 | http://www.springframework.org/schema/util/spring-util-4.0.xsd"> |
Michael Hanl | bd852b8 | 2015-11-18 22:17:00 +0100 | [diff] [blame] | 17 | |
margaretha | ade7d4a | 2017-07-20 19:53:35 +0200 | [diff] [blame] | 18 | <context:component-scan base-package="de.ids_mannheim.korap" /> |
| 19 | <context:annotation-config /> |
Michael Hanl | bd852b8 | 2015-11-18 22:17:00 +0100 | [diff] [blame] | 20 | |
margaretha | 62055f7 | 2017-04-11 19:17:43 +0200 | [diff] [blame] | 21 | <bean id="props" |
| 22 | class="org.springframework.beans.factory.config.PropertiesFactoryBean"> |
| 23 | <property name="ignoreResourceNotFound" value="true" /> |
| 24 | <property name="locations"> |
| 25 | <array> |
margaretha | 0c47c65 | 2017-04-19 18:44:40 +0200 | [diff] [blame] | 26 | <value>classpath:kustvakt-test.conf</value> |
| 27 | <value>file:./kustvakt-test.conf</value> |
margaretha | 62055f7 | 2017-04-11 19:17:43 +0200 | [diff] [blame] | 28 | </array> |
| 29 | </property> |
| 30 | </bean> |
Michael Hanl | bd852b8 | 2015-11-18 22:17:00 +0100 | [diff] [blame] | 31 | |
margaretha | ade7d4a | 2017-07-20 19:53:35 +0200 | [diff] [blame] | 32 | <bean id="placeholders" |
| 33 | class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer"> |
margaretha | 62055f7 | 2017-04-11 19:17:43 +0200 | [diff] [blame] | 34 | <property name="ignoreResourceNotFound" value="true" /> |
| 35 | <property name="locations"> |
| 36 | <array> |
margaretha | 6c2a20f | 2017-07-24 15:33:01 +0200 | [diff] [blame] | 37 | <value>classpath:test-jdbc.properties</value> |
margaretha | ade7d4a | 2017-07-20 19:53:35 +0200 | [diff] [blame] | 38 | <value>classpath:hibernate.properties</value> |
margaretha | f18298b | 2017-09-14 22:14:32 +0200 | [diff] [blame] | 39 | <value>classpath:kustvakt-test.conf</value> |
margaretha | 62055f7 | 2017-04-11 19:17:43 +0200 | [diff] [blame] | 40 | </array> |
| 41 | </property> |
| 42 | </bean> |
Michael Hanl | bd852b8 | 2015-11-18 22:17:00 +0100 | [diff] [blame] | 43 | |
margaretha | 62055f7 | 2017-04-11 19:17:43 +0200 | [diff] [blame] | 44 | <bean id='cacheManager' class='org.springframework.cache.ehcache.EhCacheCacheManager' |
| 45 | p:cacheManager-ref='ehcache' /> |
Michael Hanl | bd852b8 | 2015-11-18 22:17:00 +0100 | [diff] [blame] | 46 | |
margaretha | 62055f7 | 2017-04-11 19:17:43 +0200 | [diff] [blame] | 47 | <bean id='ehcache' |
| 48 | class='org.springframework.cache.ehcache.EhCacheManagerFactoryBean' |
| 49 | p:configLocation='classpath:ehcache.xml' p:shared='true' /> |
Michael Hanl | bd852b8 | 2015-11-18 22:17:00 +0100 | [diff] [blame] | 50 | |
margaretha | 62055f7 | 2017-04-11 19:17:43 +0200 | [diff] [blame] | 51 | <!-- props are injected from default-config.xml --> |
| 52 | <bean id="kustvakt_config" class="de.ids_mannheim.korap.config.KustvaktConfiguration"> |
margaretha | f68daa6 | 2017-09-21 02:11:24 +0200 | [diff] [blame] | 53 | <constructor-arg name="properties" ref="props" /> |
margaretha | 62055f7 | 2017-04-11 19:17:43 +0200 | [diff] [blame] | 54 | </bean> |
Michael Hanl | bd852b8 | 2015-11-18 22:17:00 +0100 | [diff] [blame] | 55 | |
margaretha | 6c2a20f | 2017-07-24 15:33:01 +0200 | [diff] [blame] | 56 | <bean id="dataSource" class="org.apache.commons.dbcp2.BasicDataSource" |
| 57 | lazy-init="true"> |
| 58 | <property name="driverClassName" value="${jdbc.driverClassName}" /> |
| 59 | <property name="url" value="${jdbc.url}" /> |
| 60 | <property name="username" value="${jdbc.username}" /> |
| 61 | <property name="password" value="${jdbc.password}" /> |
margaretha | 514e141 | 2017-10-10 15:54:20 +0200 | [diff] [blame] | 62 | <property name="maxTotal" value="1" /> |
| 63 | <property name="maxIdle" value="1" /> |
margaretha | 6c2a20f | 2017-07-24 15:33:01 +0200 | [diff] [blame] | 64 | <property name="minIdle" value="1" /> |
| 65 | <property name="maxWaitMillis" value="15000" /> |
| 66 | <!--<property name="poolPreparedStatements" value="true"/> --> |
| 67 | </bean> |
| 68 | |
margaretha | 514e141 | 2017-10-10 15:54:20 +0200 | [diff] [blame] | 69 | <!-- use SingleConnection only for testing! --> |
margaretha | 6c2a20f | 2017-07-24 15:33:01 +0200 | [diff] [blame] | 70 | <bean id="sqliteDataSource" |
margaretha | 62055f7 | 2017-04-11 19:17:43 +0200 | [diff] [blame] | 71 | class="org.springframework.jdbc.datasource.SingleConnectionDataSource" |
margaretha | 514e141 | 2017-10-10 15:54:20 +0200 | [diff] [blame] | 72 | lazy-init="true" destroy-method="destroy"> |
| 73 | <!-- <property name="driverClassName" value="${jdbc.driverClassName}" /> --> |
margaretha | 6c2a20f | 2017-07-24 15:33:01 +0200 | [diff] [blame] | 74 | <property name="url" value="${jdbc.url}" /> |
| 75 | <property name="username" value="${jdbc.username}" /> |
| 76 | <property name="password" value="${jdbc.password}" /> |
margaretha | 514e141 | 2017-10-10 15:54:20 +0200 | [diff] [blame] | 77 | <!-- Sqlite can only have a single connection --> |
margaretha | 62055f7 | 2017-04-11 19:17:43 +0200 | [diff] [blame] | 78 | <property name="suppressClose"> |
| 79 | <value>true</value> |
| 80 | </property> |
margaretha | 514e141 | 2017-10-10 15:54:20 +0200 | [diff] [blame] | 81 | </bean> |
| 82 | |
| 83 | <bean id="c3p0DataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" |
| 84 | destroy-method="close"> |
| 85 | <property name="driverClass" value="${jdbc.driverClassName}" /> |
| 86 | <property name="jdbcUrl" value="${jdbc.url}" /> |
| 87 | <property name="user" value="${jdbc.username}" /> |
| 88 | <property name="password" value="${jdbc.password}" /> |
| 89 | <property name="maxPoolSize" value="1" /> |
| 90 | <property name="minPoolSize" value="1" /> |
| 91 | <property name="maxStatements" value="1" /> |
| 92 | <property name="testConnectionOnCheckout" value="true" /> |
margaretha | 62055f7 | 2017-04-11 19:17:43 +0200 | [diff] [blame] | 93 | </bean> |
Michael Hanl | bd852b8 | 2015-11-18 22:17:00 +0100 | [diff] [blame] | 94 | |
margaretha | 62055f7 | 2017-04-11 19:17:43 +0200 | [diff] [blame] | 95 | <!-- to configure database for sqlite, mysql, etc. migrations --> |
| 96 | <bean id="flyway" class="org.flywaydb.core.Flyway" init-method="migrate"> |
margaretha | 514e141 | 2017-10-10 15:54:20 +0200 | [diff] [blame] | 97 | <property name="baselineOnMigrate" value="false" /> |
| 98 | <property name="locations" value="${jdbc.schemaPath}" /> |
margaretha | 6c2a20f | 2017-07-24 15:33:01 +0200 | [diff] [blame] | 99 | <property name="dataSource" ref="sqliteDataSource" /> |
margaretha | 62055f7 | 2017-04-11 19:17:43 +0200 | [diff] [blame] | 100 | </bean> |
Michael Hanl | bd852b8 | 2015-11-18 22:17:00 +0100 | [diff] [blame] | 101 | |
margaretha | 62055f7 | 2017-04-11 19:17:43 +0200 | [diff] [blame] | 102 | <bean id="kustvakt_db" class="de.ids_mannheim.korap.handlers.JDBCClient"> |
margaretha | bc9caf4 | 2017-09-21 18:52:52 +0200 | [diff] [blame] | 103 | <constructor-arg index="0" ref="sqliteDataSource" /> |
| 104 | <property name="database" value="sqlite" /> |
margaretha | 62055f7 | 2017-04-11 19:17:43 +0200 | [diff] [blame] | 105 | </bean> |
Michael Hanl | bd852b8 | 2015-11-18 22:17:00 +0100 | [diff] [blame] | 106 | |
margaretha | ade7d4a | 2017-07-20 19:53:35 +0200 | [diff] [blame] | 107 | <bean id="entityManagerFactory" |
| 108 | class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> |
| 109 | <property name="dataSource" ref="dataSource" /> |
| 110 | <property name="packagesToScan" value="de.ids_mannheim.korap.entity" /> |
| 111 | <property name="jpaVendorAdapter"> |
| 112 | <bean id="jpaVendorAdapter" |
| 113 | class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"> |
| 114 | <property name="databasePlatform" value="${hibernate.dialect}" /> |
| 115 | </bean> |
| 116 | </property> |
| 117 | <property name="jpaProperties"> |
| 118 | <props> |
| 119 | <prop key="hibernate.dialect">${hibernate.dialect}</prop> |
| 120 | <prop key="hibernate.hbm2ddl.auto">${hibernate.hbm2ddl.auto}</prop> |
| 121 | <prop key="hibernate.show_sql">${hibernate.show_sql}</prop> |
| 122 | <prop key="hibernate.cache.use_query_cache">${hibernate.cache.use_query_cache}</prop> |
| 123 | <prop key="hibernate.cache.use_second_level_cache">${hibernate.cache.use_second_level_cache} |
| 124 | </prop> |
| 125 | <prop key="hibernate.cache.provider_class">${hibernate.cache.provider}</prop> |
| 126 | <prop key="hibernate.cache.region.factory_class">${hibernate.cache.region.factory}</prop> |
| 127 | <!-- <prop key="net.sf.ehcache.configurationResourceName">classpath:ehcache.xml</prop> --> |
| 128 | </props> |
| 129 | </property> |
margaretha | 62055f7 | 2017-04-11 19:17:43 +0200 | [diff] [blame] | 130 | </bean> |
Michael Hanl | e4fc775 | 2016-02-17 11:41:18 +0100 | [diff] [blame] | 131 | |
margaretha | ade7d4a | 2017-07-20 19:53:35 +0200 | [diff] [blame] | 132 | <tx:annotation-driven proxy-target-class="true" |
| 133 | transaction-manager="transactionManager" /> |
| 134 | <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager"> |
| 135 | <property name="entityManagerFactory" ref="entityManagerFactory" /> |
margaretha | 62055f7 | 2017-04-11 19:17:43 +0200 | [diff] [blame] | 136 | </bean> |
Michael Hanl | e4fc775 | 2016-02-17 11:41:18 +0100 | [diff] [blame] | 137 | |
margaretha | ade7d4a | 2017-07-20 19:53:35 +0200 | [diff] [blame] | 138 | <bean id="transactionTemplate" |
| 139 | class="org.springframework.transaction.support.TransactionTemplate"> |
| 140 | <constructor-arg ref="transactionManager" /> |
| 141 | </bean> |
| 142 | |
| 143 | <!-- Data access objects --> |
| 144 | <bean id="resourceDao" class="de.ids_mannheim.korap.dao.ResourceDao"/> |
| 145 | <!-- <bean id="annotationDao" class="de.ids_mannheim.korap.dao.AnnotationDao"/> --> |
| 146 | |
margaretha | 6c2a20f | 2017-07-24 15:33:01 +0200 | [diff] [blame] | 147 | <!-- Krill --> |
| 148 | <bean id="search_krill" class="de.ids_mannheim.korap.web.SearchKrill"> |
| 149 | <constructor-arg value="${krill.indexDir}"/> |
| 150 | </bean> |
| 151 | |
margaretha | 62055f7 | 2017-04-11 19:17:43 +0200 | [diff] [blame] | 152 | <bean id="kustvakt_auditing" class="de.ids_mannheim.korap.handlers.JDBCAuditing"> |
| 153 | <constructor-arg ref="kustvakt_db" /> |
| 154 | </bean> |
Michael Hanl | bd852b8 | 2015-11-18 22:17:00 +0100 | [diff] [blame] | 155 | |
margaretha | 62055f7 | 2017-04-11 19:17:43 +0200 | [diff] [blame] | 156 | <bean id="kustvakt_userdb" class="de.ids_mannheim.korap.handlers.EntityDao"> |
| 157 | <constructor-arg ref="kustvakt_db" /> |
| 158 | </bean> |
Michael Hanl | bd852b8 | 2015-11-18 22:17:00 +0100 | [diff] [blame] | 159 | |
margaretha | 62055f7 | 2017-04-11 19:17:43 +0200 | [diff] [blame] | 160 | <bean id="kustvakt_admindb" class="de.ids_mannheim.korap.handlers.AdminDao"> |
| 161 | <constructor-arg ref="kustvakt_db" /> |
| 162 | </bean> |
Michael Hanl | bd852b8 | 2015-11-18 22:17:00 +0100 | [diff] [blame] | 163 | |
margaretha | 62055f7 | 2017-04-11 19:17:43 +0200 | [diff] [blame] | 164 | <bean id="resource_provider" class="de.ids_mannheim.korap.handlers.ResourceDao"> |
| 165 | <constructor-arg ref="kustvakt_db" /> |
| 166 | </bean> |
Michael Hanl | f8fcc7a | 2016-06-03 17:41:07 +0200 | [diff] [blame] | 167 | |
margaretha | 62055f7 | 2017-04-11 19:17:43 +0200 | [diff] [blame] | 168 | <bean id="document_provider" class="de.ids_mannheim.korap.handlers.DocumentDao"> |
| 169 | <constructor-arg ref="kustvakt_db" /> |
| 170 | </bean> |
Michael Hanl | bd852b8 | 2015-11-18 22:17:00 +0100 | [diff] [blame] | 171 | |
margaretha | 62055f7 | 2017-04-11 19:17:43 +0200 | [diff] [blame] | 172 | <bean id="kustvakt_policies" class="de.ids_mannheim.korap.security.ac.PolicyDao"> |
| 173 | <constructor-arg ref="kustvakt_db" /> |
| 174 | </bean> |
Michael Hanl | bd852b8 | 2015-11-18 22:17:00 +0100 | [diff] [blame] | 175 | |
margaretha | 62055f7 | 2017-04-11 19:17:43 +0200 | [diff] [blame] | 176 | <bean name="kustvakt_encryption" |
| 177 | class="de.ids_mannheim.korap.interfaces.defaults.KustvaktEncryption"> |
| 178 | <constructor-arg ref="kustvakt_config" /> |
| 179 | </bean> |
Michael Hanl | bd852b8 | 2015-11-18 22:17:00 +0100 | [diff] [blame] | 180 | |
margaretha | 62055f7 | 2017-04-11 19:17:43 +0200 | [diff] [blame] | 181 | <!-- authentication providers to use --> |
| 182 | <bean id="api_auth" class="de.ids_mannheim.korap.security.auth.APIAuthentication"> |
| 183 | <constructor-arg type="de.ids_mannheim.korap.config.KustvaktConfiguration" |
| 184 | ref="kustvakt_config" /> |
| 185 | </bean> |
Michael Hanl | bd852b8 | 2015-11-18 22:17:00 +0100 | [diff] [blame] | 186 | |
margaretha | 62055f7 | 2017-04-11 19:17:43 +0200 | [diff] [blame] | 187 | <bean id="openid_auth" |
| 188 | class="de.ids_mannheim.korap.security.auth.OpenIDconnectAuthentication"> |
| 189 | <constructor-arg type="de.ids_mannheim.korap.config.KustvaktConfiguration" |
| 190 | ref="kustvakt_config" /> |
| 191 | <constructor-arg |
| 192 | type="de.ids_mannheim.korap.interfaces.db.PersistenceClient" ref="kustvakt_db" /> |
| 193 | </bean> |
| 194 | |
| 195 | <bean id="basic_auth" class="de.ids_mannheim.korap.security.auth.BasicHttpAuth" /> |
Michael Hanl | bd852b8 | 2015-11-18 22:17:00 +0100 | [diff] [blame] | 196 | |
| 197 | |
margaretha | 62055f7 | 2017-04-11 19:17:43 +0200 | [diff] [blame] | 198 | <bean id="session_auth" |
| 199 | class="de.ids_mannheim.korap.security.auth.SessionAuthentication"> |
| 200 | <constructor-arg type="de.ids_mannheim.korap.config.KustvaktConfiguration" |
| 201 | ref="kustvakt_config" /> |
| 202 | <constructor-arg type="de.ids_mannheim.korap.interfaces.EncryptionIface" |
| 203 | ref="kustvakt_encryption" /> |
| 204 | </bean> |
Michael Hanl | bd852b8 | 2015-11-18 22:17:00 +0100 | [diff] [blame] | 205 | |
margaretha | 62055f7 | 2017-04-11 19:17:43 +0200 | [diff] [blame] | 206 | <util:list id="kustvakt_authproviders" |
| 207 | value-type="de.ids_mannheim.korap.interfaces.AuthenticationIface"> |
| 208 | <ref bean="basic_auth" /> |
| 209 | <ref bean="session_auth" /> |
| 210 | <ref bean="api_auth" /> |
| 211 | <ref bean="openid_auth" /> |
| 212 | </util:list> |
Michael Hanl | bd852b8 | 2015-11-18 22:17:00 +0100 | [diff] [blame] | 213 | |
margaretha | ade7d4a | 2017-07-20 19:53:35 +0200 | [diff] [blame] | 214 | |
margaretha | 62055f7 | 2017-04-11 19:17:43 +0200 | [diff] [blame] | 215 | <bean id="userdata_details" class="de.ids_mannheim.korap.handlers.UserDetailsDao"> |
margaretha | ade7d4a | 2017-07-20 19:53:35 +0200 | [diff] [blame] | 216 | <constructor-arg ref="kustvakt_db" /> |
margaretha | 62055f7 | 2017-04-11 19:17:43 +0200 | [diff] [blame] | 217 | </bean> |
margaretha | ade7d4a | 2017-07-20 19:53:35 +0200 | [diff] [blame] | 218 | |
margaretha | 62055f7 | 2017-04-11 19:17:43 +0200 | [diff] [blame] | 219 | <bean id="userdata_settings" class="de.ids_mannheim.korap.handlers.UserSettingsDao"> |
margaretha | ade7d4a | 2017-07-20 19:53:35 +0200 | [diff] [blame] | 220 | <constructor-arg ref="kustvakt_db" /> |
margaretha | 62055f7 | 2017-04-11 19:17:43 +0200 | [diff] [blame] | 221 | </bean> |
Michael Hanl | daf8660 | 2016-05-12 14:31:52 +0200 | [diff] [blame] | 222 | |
margaretha | 62055f7 | 2017-04-11 19:17:43 +0200 | [diff] [blame] | 223 | <util:list id="kustvakt_userdata" |
| 224 | value-type="de.ids_mannheim.korap.interfaces.db.UserdataDbIface"> |
| 225 | <ref bean="userdata_details" /> |
| 226 | <ref bean="userdata_settings" /> |
| 227 | </util:list> |
Michael Hanl | daf8660 | 2016-05-12 14:31:52 +0200 | [diff] [blame] | 228 | |
margaretha | 62055f7 | 2017-04-11 19:17:43 +0200 | [diff] [blame] | 229 | <util:list id="kustvakt_resources" |
| 230 | value-type="de.ids_mannheim.korap.interfaces.db.ResourceOperationIface"> |
| 231 | <ref bean="document_provider" /> |
| 232 | <ref bean="resource_provider" /> |
| 233 | </util:list> |
Michael Hanl | f8fcc7a | 2016-06-03 17:41:07 +0200 | [diff] [blame] | 234 | |
margaretha | 62055f7 | 2017-04-11 19:17:43 +0200 | [diff] [blame] | 235 | <!-- specify type for constructor argument --> |
| 236 | <bean id="kustvakt_authenticationmanager" |
| 237 | class="de.ids_mannheim.korap.security.auth.KustvaktAuthenticationManager"> |
| 238 | <constructor-arg |
| 239 | type="de.ids_mannheim.korap.interfaces.db.EntityHandlerIface" ref="kustvakt_userdb" /> |
| 240 | <constructor-arg |
| 241 | type="de.ids_mannheim.korap.interfaces.db.AdminHandlerIface" ref="kustvakt_admindb" /> |
| 242 | <constructor-arg type="de.ids_mannheim.korap.interfaces.EncryptionIface" |
| 243 | ref="kustvakt_encryption" /> |
| 244 | <constructor-arg ref="kustvakt_config" /> |
| 245 | <constructor-arg type="de.ids_mannheim.korap.interfaces.db.AuditingIface" |
| 246 | ref="kustvakt_auditing" /> |
| 247 | <constructor-arg ref="kustvakt_userdata" /> |
| 248 | <!-- inject authentication providers to use --> |
| 249 | <property name="providers" ref="kustvakt_authproviders" /> |
| 250 | </bean> |
Michael Hanl | bd852b8 | 2015-11-18 22:17:00 +0100 | [diff] [blame] | 251 | |
margaretha | 62055f7 | 2017-04-11 19:17:43 +0200 | [diff] [blame] | 252 | <!-- todo: if db interfaces not loaded via spring, does transaction even |
| 253 | work then? --> |
| 254 | <!-- the transactional advice (i.e. what 'happens'; see the <aop:advisor/> |
| 255 | bean below) --> |
| 256 | <tx:advice id="txAdvice" transaction-manager="txManager"> |
| 257 | <!-- the transactional semantics... --> |
| 258 | <tx:attributes> |
| 259 | <!-- all methods starting with 'get' are read-only --> |
| 260 | <tx:method name="get*" read-only="true" rollback-for="KorAPException" /> |
| 261 | <!-- other methods use the default transaction settings (see below) --> |
| 262 | <tx:method name="*" rollback-for="KorAPException" /> |
| 263 | </tx:attributes> |
| 264 | </tx:advice> |
Michael Hanl | bd852b8 | 2015-11-18 22:17:00 +0100 | [diff] [blame] | 265 | |
margaretha | 62055f7 | 2017-04-11 19:17:43 +0200 | [diff] [blame] | 266 | <!-- ensure that the above transactional advice runs for any execution of |
| 267 | an operation defined by the service interface --> |
| 268 | <aop:config> |
| 269 | <aop:pointcut id="service" |
| 270 | expression="execution(* de.ids_mannheim.korap.interfaces.db.*.*(..))" /> |
| 271 | <aop:advisor advice-ref="txAdvice" pointcut-ref="service" /> |
| 272 | </aop:config> |
Michael Hanl | bd852b8 | 2015-11-18 22:17:00 +0100 | [diff] [blame] | 273 | |
margaretha | 62055f7 | 2017-04-11 19:17:43 +0200 | [diff] [blame] | 274 | <!-- similarly, don't forget the PlatformTransactionManager --> |
| 275 | <bean id="txManager" |
| 276 | class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> |
| 277 | <property name="dataSource" ref="dataSource" /> |
| 278 | </bean> |
Michael Hanl | bd852b8 | 2015-11-18 22:17:00 +0100 | [diff] [blame] | 279 | </beans> |