META-INF.dynamic-data-source-spring.xml Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of portal-impl Show documentation
Show all versions of portal-impl Show documentation
Contains implementation for the portal services.
<?xml version="1.0"?> <beans default-destroy-method="destroy" default-init-method="afterPropertiesSet" xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd" > <bean id="chainableMethodAdviceInjector.dynamicDataSourceAdvice" class="com.liferay.portal.spring.aop.ChainableMethodAdviceInjector"> <property name="childMethodInterceptor" ref="transactionAdvice" /> <property name="injectCondition" value="true" /> <property name="newChainableMethodAdvice" ref="dynamicDataSourceAdvice" /> <property name="parentChainableMethodAdvice" ref="serviceAdvice" /> </bean> <bean id="dynamicDataSourceAdvice" class="com.liferay.portal.dao.jdbc.aop.DynamicDataSourceAdvice"> <property name="dynamicDataSourceTargetSource" ref="dynamicDataSourceTargetSource" /> <property name="transactionAttributeSource" ref="transactionAttributeSource" /> </bean> <bean name="dynamicDataSourceTargetSource" class="com.liferay.portal.dao.jdbc.aop.DynamicDataSourceTargetSource"> <property name="readDataSource"> <bean class="com.liferay.portal.dao.jdbc.spring.DataSourceFactoryBean"> <property name="propertyPrefix" value="jdbc.read." /> </bean> </property> <property name="writeDataSource"> <bean class="com.liferay.portal.dao.jdbc.spring.DataSourceFactoryBean"> <property name="propertyPrefix" value="jdbc.write." /> </bean> </property> </bean> <bean id="liferayDataSource" class="org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy"> <property name="targetDataSource"> <bean class="org.springframework.aop.framework.ProxyFactoryBean"> <property name="targetSource" ref="dynamicDataSourceTargetSource" /> </bean> </property> </bean> <bean id="com.liferay.portal.kernel.util.InfrastructureUtil" class="com.liferay.portal.kernel.util.InfrastructureUtil"> <property name="dataSource" ref="liferayDataSource" /> <property name="dynamicDataSourceTargetSource" ref="dynamicDataSourceTargetSource" /> <property name="mailSession" ref="mailSession" /> <property name="transactionManager" ref="liferayTransactionManager" /> </bean> </beans>