jasperreports-server-ce/common/shared-config/applicationContext-olap-con...

92 lines
4.5 KiB
XML
Executable File

<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright © 2005 - 2018 TIBCO Software Inc.
~ http://www.jaspersoft.com.
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU Affero General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU Affero General Public License for more details.
~
~ You should have received a copy of the GNU Affero General Public License
~ along with this program. If not, see <https://www.gnu.org/licenses/>.
-->
<beans 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.1.xsd">
<alias name="${bean.olapConnectionService}" alias="olapConnectionService"/>
<bean id="olapConnectionServiceCE"
class="com.jaspersoft.jasperserver.api.metadata.olap.service.impl.OlapConnectionServiceImpl">
<property name="repository" ref="${bean.repositoryService}"/>
<property name="encodingProvider" ref="encodingProvider"/>
<property name="userService" ref="${bean.userAuthorityService}"/>
<property name="tenantService" ref="${bean.tenantService}"/>
<property name="useContentChecksum" value="${UseContentChecksum}"/>
<!-- in the absence of a JNDI service, use jndiFallbackResolver look up the properties in the file. -->
<property name="jndiFallbackResolver" ref="jndiFallbackResolver"/>
<property name="jdbcDriverService" ref="jdbcDriverService"/>
<property name="profileAttributesResolver" ref="profileAttributesResolver"/>
<!-- olap4j caching config
see javadoc here http://www.olap4j.org/api/org/olap4j/driver/xmla/cache/XmlaOlap4jNamedMemoryCache.html -->
<!--property name="OLAP4J_CACHE" value="org.olap4j.driver.xmla.cache.XmlaOlap4jNamedMemoryCache"/-->
<property name="OLAP4J_CACHE" value="${class.olap4jCache}"/>
<property name="OLAP4J_CACHE_NAME" value="JasperServerXMLACache"/>
<property name="OLAP4J_CACHE_MODE" value="LFU"/>
<property name="OLAP4J_CACHE_TIMEOUT" value="600"/>
<property name="OLAP4J_CACHE_SIZE" value="1000"/>
</bean>
<!--
<bean id="mondrianConnectionCacheFactory" class="org.springframework.cache.ehcache.EhCacheFactoryBean">
<property name="cacheManager">
<ref bean="cacheManager"/>
</property>
<property name="cacheName">
<value>mondrianConnections</value>
</property>
</bean>
-->
<bean id="olapManagementService"
class="com.jaspersoft.jasperserver.api.metadata.olap.service.impl.OlapManagementServiceImpl">
<property name="repositoryService" ref="${bean.repositoryService}"/>
<property name="olapConnectionService" ref="olapConnectionService"/>
<property name="mondrianConnectionCache" ref="sharedMondrianConnectionCacheFactory"/>
<property name="olapFiltersCache" ref="olapFiltersCache"/>
<!-- <property name="sharedMondrianConectionCacheFactory" ref="sharedMondrianConnectionCacheFactory"/> -->
</bean>
<bean id="olapFiltersCache" class="org.springframework.cache.ehcache.EhCacheFactoryBean"
lazy-init="true">
<property name="cacheManager" ref="${bean.olapCacheManager}"/>
<property name="cacheName" value="olapFilters" />
</bean>
<!-- Setup a cache for Mondrian connections to synch cache flushing -->
<bean id="olapCacheManager" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean" lazy-init="true" depends-on="sysProperties">
<property name="configLocation">
<value>${resource.root}/olap-ehcache.xml</value>
</property>
</bean>
<bean id="sharedMondrianConnectionCacheFactory" class="org.springframework.cache.ehcache.EhCacheFactoryBean"
lazy-init="true" depends-on="contextApplicationContextProvider">
<property name="cacheManager" ref="${bean.olapCacheManager}"/>
<property name="cacheName">
<value>sharedMondrianConnections</value>
</property>
</bean>
<bean id="xmlaUpdateListener" class="com.jaspersoft.jasperserver.war.xmla.XMLAUpdateListener"/>
</beans>