<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>
  
   <!-- ===================================== -->
   <!-- Tenants Cache                         -->
   <!-- ===================================== -->

   <!-- The cross-transaction shared cache for in-memory Tenants -->
   
   <bean name="tenantsSharedCache" class="org.alfresco.repo.cache.EhCacheAdapter">
      <property name="cache">
         <bean class="org.springframework.cache.ehcache.EhCacheFactoryBean" >
            <property name="cacheManager">
               <ref bean="internalEHCacheManager" />
            </property>
            <property name="cacheName">
               <value>org.alfresco.cache.tenantsCache</value>
            </property>
         </bean>
      </property>
   </bean>
   
   <!-- The transactional cache for in-memory Tenants -->
   
   <bean name="tenantsCache" class="org.alfresco.repo.cache.TransactionalCache">
      <property name="sharedCache">
         <ref bean="tenantsSharedCache" />
      </property>
      <property name="name">
         <value>org.alfresco.tenantsTransactionalCache</value>
      </property>
      <property name="maxCacheSize">
         <value>10</value>
      </property>
   </bean>
   

   <!--                                     -->
   <!-- MT Service Implementation -->
   <!--                                     -->
             
   <bean id="tenantService" class="org.alfresco.repo.tenant.MultiTServiceImpl">
   
      <property name="tenantsCache">
         <ref bean="tenantsCache"/>
      </property>
      
   </bean>
       
</beans>
