blob: 389ac8571626c1150cf860e7b1a37d3895d716ed [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:task="http://www.springframework.org/schema/task"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/task
http://www.springframework.org/schema/task/spring-task-3.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">
<context:property-placeholder location="classpath:application.properties" />
<alias name="userConfiguration#archiva" alias="userConfiguration#default" />
<alias name="authorizer#rbac" alias="authorizer#default"/>
<alias name="repositoryStatisticsManager#default" alias="repositoryStatisticsManager"/>
<alias name="environmentCheck#archiva-locked-admin-check" alias="environmentCheck#locked-admin-check"/>
<alias name="userManager#archiva" alias="userManager#default"/>
<alias name="authenticator#archiva" alias="authenticator#user-manager"/>
<alias name="rbacManager#archiva" alias="rbacManager#default"/>
<alias name="ldapConnectionFactory#archiva" alias="ldapConnectionFactory"/>
<alias name="ldapConnectionFactory#archiva" alias="ldapConnectionFactory#configurable"/>
<alias name="ldapRoleMapperConfiguration#archiva" alias="ldapRoleMapperConfiguration#default"/>
<bean id="loggerManager" class="org.codehaus.plexus.logging.slf4j.Slf4jLoggerManager"
init-method="initialize"/>
<!-- only here to cleanup temp indexes for groups increase number if use for something else -->
<task:executor id="springExecutor" pool-size="2"/>
<task:scheduler id="springScheduler" pool-size="2"/>
<task:annotation-driven executor="springExecutor" scheduler="springScheduler"/>
<bean id="mailSession" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName" value="java:comp/env/mail/Session">
</property>
</bean>
<bean name="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
<property name="session" ref="mailSession"/>
</bean>
<!-- START SNIPPET: configuration-files-list -->
<bean name="commons-configuration" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry"
init-method="initialize">
<property name="properties">
<value>
<![CDATA[
<configuration>
<system/>
<jndi prefix="java:comp/env" config-optional="true"/>
<xml fileName="${appserver.base}/conf/archiva.xml" config-optional="true"
config-name="org.apache.archiva.base"
config-at="org.apache.archiva"/>
<xml fileName="${appserver.base}/conf/shared.xml" config-optional="true"
config-name="org.apache.maven.shared.app.base" config-at="org.apache.maven.shared.app"/>
<xml fileName="${appserver.base}/conf/common.xml" config-optional="true"/>
<properties fileName="${appserver.base}/conf/security.properties" config-optional="true"
config-at="org.apache.archiva.redback"/>
<xml fileName="${appserver.home}/conf/archiva.xml" config-optional="true"
config-at="org.apache.archiva"/>
<xml fileName="${appserver.home}/conf/shared.xml" config-optional="true"
config-at="org.apache.maven.shared.app"/>
<xml fileName="${appserver.home}/conf/common.xml" config-optional="true"/>
<properties fileName="${appserver.home}/conf/security.properties" config-optional="true"
config-at="org.apache.archiva.redback"/>
<properties fileName="org/apache/archiva/redback-security.properties" config-at="org.apache.archiva.redback"/>
</configuration>
]]>
</value>
</property>
</bean>
<!-- END SNIPPET: configuration-files-list -->
<bean name="scheduler" class="org.apache.archiva.redback.components.scheduler.DefaultScheduler">
<property name="properties">
<props>
<prop key="org.quartz.scheduler.instanceName">scheduler1</prop>
<prop key="org.quartz.threadPool.class">org.quartz.simpl.SimpleThreadPool</prop>
<prop key="org.quartz.threadPool.threadCount">2</prop>
<prop key="org.quartz.threadPool.threadPriority">4</prop>
<prop key="org.quartz.jobStore.class">org.quartz.simpl.RAMJobStore</prop>
</props>
</property>
</bean>
<!--
<bean name="mimeTpes" class="org.apache.archiva.webdav.util.MimeTypes">
<property name="resource" value="archiva-mime-types.txt"/>
</bean>
-->
<!-- for change configuration of the users cache -->
<bean name="cache#users" class="org.apache.archiva.components.cache.ehcache.EhcacheCache"
init-method="initialize">
<property name="diskPersistent" value="false"/>
<property name="eternal" value="false"/>
<property name="maxElementsInMemory" value="1000"/>
<property name="memoryEvictionPolicy" value="LRU"/>
<property name="name" value="usersCache"/>
<property name="timeToIdleSeconds" value="14400"/>
<property name="timeToLiveSeconds" value="14400"/>
</bean>
<bean name="cache#url-failures-cache" class="org.apache.archiva.components.cache.ehcache.EhcacheCache" lazy-init="true"
destroy-method="dispose">
<property name="diskExpiryThreadIntervalSeconds" value="600"/>
<property name="diskPersistent" value="true"/>
<property name="diskStorePath" value="${appserver.base}/tmp/urlcache"/>
<property name="maxElementsInMemory" value="1000"/>
<property name="memoryEvictionPolicy" value="LRU"/>
<property name="name" value="url-failures-cache"/>
<property name="overflowToDisk" value="false"/>
<!-- 45 minutes = 2700 seconds -->
<property name="timeToIdleSeconds" value="2700"/>
<!-- 30 minutes = 1800 seconds -->
<property name="timeToLiveSeconds" value="1800"/>
</bean>
<bean name="cache#keys" class="org.apache.archiva.components.cache.ehcache.EhcacheCache"
init-method="initialize">
<property name="diskPersistent" value="false"/>
<property name="eternal" value="false"/>
<property name="maxElementsInMemory" value="1000"/>
<property name="memoryEvictionPolicy" value="LRU"/>
<property name="name" value="keys"/>
<property name="timeToIdleSeconds" value="1800"/>
<property name="timeToLiveSeconds" value="14400"/>
</bean>
<bean name="cache#operations" class="org.apache.archiva.components.cache.ehcache.EhcacheCache"
init-method="initialize">
<property name="diskPersistent" value="false"/>
<property name="eternal" value="false"/>
<property name="maxElementsInMemory" value="1000"/>
<property name="memoryEvictionPolicy" value="LRU"/>
<property name="name" value="operations"/>
<property name="timeToIdleSeconds" value="1800"/>
<property name="timeToLiveSeconds" value="14400"/>
</bean>
<bean name="cache#permissions" class="org.apache.archiva.components.cache.ehcache.EhcacheCache"
init-method="initialize">
<property name="diskPersistent" value="false"/>
<property name="eternal" value="false"/>
<property name="maxElementsInMemory" value="1000"/>
<property name="memoryEvictionPolicy" value="LRU"/>
<property name="name" value="permissions"/>
<property name="timeToIdleSeconds" value="1800"/>
<property name="timeToLiveSeconds" value="14400"/>
</bean>
<bean name="cache#resources" class="org.apache.archiva.components.cache.ehcache.EhcacheCache"
init-method="initialize">
<property name="diskPersistent" value="false"/>
<property name="eternal" value="false"/>
<property name="maxElementsInMemory" value="1000"/>
<property name="memoryEvictionPolicy" value="LRU"/>
<property name="name" value="resources"/>
<property name="timeToIdleSeconds" value="1800"/>
<property name="timeToLiveSeconds" value="14400"/>
</bean>
<bean name="cache#roles" class="org.apache.archiva.components.cache.ehcache.EhcacheCache"
init-method="initialize">
<property name="diskPersistent" value="false"/>
<property name="eternal" value="false"/>
<property name="maxElementsInMemory" value="1000"/>
<property name="memoryEvictionPolicy" value="LRU"/>
<property name="name" value="roles"/>
<property name="timeToIdleSeconds" value="1800"/>
<property name="timeToLiveSeconds" value="14400"/>
</bean>
<bean name="cache#effectiveRoleSet" class="org.apache.archiva.components.cache.ehcache.EhcacheCache"
init-method="initialize">
<property name="diskPersistent" value="false"/>
<property name="eternal" value="false"/>
<property name="maxElementsInMemory" value="1000"/>
<property name="memoryEvictionPolicy" value="LRU"/>
<property name="name" value="effectiveRoleSet"/>
<property name="timeToIdleSeconds" value="1800"/>
<property name="timeToLiveSeconds" value="14400"/>
</bean>
<!-- ================================================================
Caches with Short Term entries
================================================================ -->
<bean name="cache#userAssignments" class="org.apache.archiva.components.cache.ehcache.EhcacheCache"
init-method="initialize">
<property name="diskPersistent" value="false"/>
<property name="eternal" value="false"/>
<property name="maxElementsInMemory" value="1000"/>
<property name="memoryEvictionPolicy" value="LRU"/>
<property name="name" value="userAssignments"/>
<property name="timeToIdleSeconds" value="300"/>
<property name="timeToLiveSeconds" value="600"/>
</bean>
<bean name="cache#userPermissions" class="org.apache.archiva.components.cache.ehcache.EhcacheCache"
init-method="initialize">
<property name="diskPersistent" value="false"/>
<property name="eternal" value="false"/>
<property name="maxElementsInMemory" value="1000"/>
<property name="memoryEvictionPolicy" value="LRU"/>
<property name="name" value="userPermissions"/>
<property name="timeToIdleSeconds" value="300"/>
<property name="timeToLiveSeconds" value="600"/>
</bean>
<bean name="cache#ldapRoles" class="org.apache.archiva.components.cache.ehcache.EhcacheCache"
init-method="initialize">
<property name="diskPersistent" value="false"/>
<property name="eternal" value="false"/>
<property name="maxElementsInMemory" value="1000"/>
<property name="memoryEvictionPolicy" value="LRU"/>
<property name="name" value="ldapRoles"/>
<property name="timeToIdleSeconds" value="300"/>
<property name="timeToLiveSeconds" value="600"/>
</bean>
<bean name="cache#namespaces" class="org.apache.archiva.components.cache.ehcache.EhcacheCache"
init-method="initialize">
<property name="diskPersistent" value="false"/>
<property name="eternal" value="false"/>
<property name="maxElementsInMemory" value="1000"/>
<property name="memoryEvictionPolicy" value="LRU"/>
<property name="name" value="namespaces"/>
<property name="timeToIdleSeconds" value="600"/>
<property name="timeToLiveSeconds" value="600"/>
</bean>
<!-- override jcr repository location -->
<!-- START SNIPPET: jcr-location -->
<!--
<bean id="jcr-config" class="org.apache.archiva.metadata.repository.jcr.ArchivaJcrRepositoryConfig" factory-method="create">
<constructor-arg value="${appserver.base}/conf/repository.xml"/>
<constructor-arg value="${appserver.base}/data/jcr"/>
</bean>
-->
<!-- END SNIPPET: jcr-location -->
<bean name="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="jpaVendorAdapter" >
<bean class="org.springframework.orm.jpa.vendor.OpenJpaVendorAdapter" />
</property>
<property name="persistenceXmlLocation" value="classpath:META-INF/persistence.xml" />
<property name="jpaPropertyMap">
<map>
<entry key="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>
<entry key="openjpa.jdbc.SchemaFactory" value="native(ForeignKeys=true)" />
<entry key="openjpa.jdbc.MappingDefaults"
value="ForeignKeyDeleteAction=restrict,JoinForeignKeyDeleteAction=restrict"/>
<entry key="openjpa.Log" value="${openjpa.Log:DefaultLevel=INFO,Runtime=ERROR,Tool=ERROR,SQL=ERROR,Schema=ERROR,MetaData=ERROR}" />
<entry key="openjpa.jdbc.DBDictionary" value="(disableSchemaFactoryColumnTypeErrors=true,BitTypeName=CHAR(1),BooleanTypeName=CHAR(1),BooleanRepresentation=STRING_YN)"/>
</map>
</property>
</bean>
<bean name="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager" >
<property name="entityManagerFactory" ref="entityManagerFactory" />
</bean>
<tx:annotation-driven />
</beans>