You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

135 lines
8.3 KiB

<?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:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd"
>
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean">
<property name="persistenceUnitName" value="openmeetings" />
</bean>
<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="entityManagerFactory" />
</bean>
<bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" />
<tx:annotation-driven transaction-manager="transactionManager" proxy-target-class="true" />
<context:annotation-config />
<!-- Start annotation Prometheus metrics
<aop:aspectj-autoproxy/>
End annotation -->
<context:component-scan base-package="org.apache.openmeetings" />
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
p:location="classpath:openmeetings.properties" />
<!-- sessions clean-up -->
<bean id="cleanSessionsJobDetails" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"
p:targetObject-ref="cleanupJob" p:targetMethod="cleanSessions" p:concurrent="false" />
<bean id="triggerCleanSessions" class="org.springframework.scheduling.quartz.SimpleTriggerFactoryBean"
p:jobDetail-ref="cleanSessionsJobDetails" p:startDelay="5000" p:repeatInterval="300000" />
<!-- test setup clean-up -->
<bean id="cleanTestSetupJobDetail" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"
p:targetObject-ref="cleanupJob" p:targetMethod="cleanTestSetup" p:concurrent="false" />
<bean id="triggerCleanTestSetup" class="org.springframework.scheduling.quartz.SimpleTriggerFactoryBean"
p:jobDetail-ref="cleanTestSetupJobDetail" p:startDelay="1800000" p:repeatInterval="1800000" />
<!-- expired recordings clean-up -->
<bean id="cleanExpiredRecJobDetails" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"
p:targetObject-ref="cleanupJob" p:targetMethod="cleanExpiredRecordings" p:concurrent="false" />
<bean id="triggerCleanExpiredRec" class="org.springframework.scheduling.quartz.SimpleTriggerFactoryBean"
p:jobDetail-ref="cleanExpiredRecJobDetails" p:startDelay="5000" p:repeatInterval="3600000" />
<!-- expired reset hash -->
<bean id="cleanExpiredResetHashJobDetails" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"
p:targetObject-ref="cleanupJob" p:targetMethod="cleanExpiredResetHash" p:concurrent="false" />
<bean id="triggerCleanExpiredResetHash" class="org.springframework.scheduling.quartz.SimpleTriggerFactoryBean"
p:jobDetail-ref="cleanExpiredResetHashJobDetails" p:startDelay="5000" p:repeatInterval="3600000" />
<!-- user IP address -->
<bean id="cleanPersonalData" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"
p:targetObject-ref="cleanupJob" p:targetMethod="cleanPersonalData" p:concurrent="false" />
<bean id="triggerCleanPersonalData" class="org.springframework.scheduling.quartz.SimpleTriggerFactoryBean"
p:jobDetail-ref="cleanPersonalData" p:startDelay="5000" p:repeatInterval="3600000" />
<bean id="meetingReminderJobDetail" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"
p:targetObject-ref="reminderJob" p:targetMethod="remindMeetings" p:concurrent="false" />
<bean id="triggerMeetingReminder" class="org.springframework.scheduling.quartz.SimpleTriggerFactoryBean"
p:jobDetail-ref="meetingReminderJobDetail" p:startDelay="5000" p:repeatInterval="100000"/>
<bean id="expiringRecordingJobDetail" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"
p:targetObject-ref="reminderJob" p:targetMethod="remindExpiringRecordings" p:concurrent="false" />
<bean id="triggerExpiringRecording" class="org.springframework.scheduling.quartz.SimpleTriggerFactoryBean"
p:jobDetail-ref="expiringRecordingJobDetail" p:startDelay="5000" p:repeatInterval="3600000"/>
<bean id="loadRssJobDetail" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"
p:targetObject-ref="reminderJob" p:targetMethod="loadRss" p:concurrent="false" />
<bean id="triggerLoadRss" class="org.springframework.scheduling.quartz.SimpleTriggerFactoryBean"
p:jobDetail-ref="loadRssJobDetail" p:startDelay="5000" p:repeatInterval="600000"/>
<bean id="checkHealthJobDetail" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"
p:targetObject-ref="reminderJob" p:targetMethod="checkHealth" p:concurrent="false" />
<bean id="triggerCheckHealth" class="org.springframework.scheduling.quartz.SimpleTriggerFactoryBean"
p:jobDetail-ref="checkHealthJobDetail" p:startDelay="5000" p:repeatInterval="15000"/>
<bean id="notifyNewGroupUsersDetail" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"
p:targetObject-ref="reminderJob" p:targetMethod="notifyNewGroupUsers" p:concurrent="false" />
<bean id="triggerNotifyNewGroupUsers" class="org.springframework.scheduling.quartz.SimpleTriggerFactoryBean"
p:jobDetail-ref="notifyNewGroupUsersDetail" p:startDelay="5000" p:repeatInterval="3600000"/>
<!-- Mail related jobs -->
<bean id="resetSendingMailStatus" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"
p:targetObject-ref="mailHandler" p:targetMethod="resetSendingStatus" p:concurrent="false" />
<bean id="triggerResetSendingMailStatus" class="org.springframework.scheduling.quartz.SimpleTriggerFactoryBean"
p:jobDetail-ref="resetSendingMailStatus" p:startDelay="60000" p:repeatInterval="900000" />
<bean id="sendMails" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"
p:targetObject-ref="mailHandler" p:targetMethod="sendMails" p:concurrent="false" />
<bean id="triggerSendMails" class="org.springframework.scheduling.quartz.SimpleTriggerFactoryBean"
p:jobDetail-ref="sendMails" p:startDelay="60000" p:repeatInterval="60000" />
<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref bean="triggerCleanSessions" />
<ref bean="triggerCleanTestSetup" />
<ref bean="triggerCleanExpiredRec" />
<ref bean="triggerCleanExpiredResetHash" />
<ref bean="triggerCleanPersonalData" />
<ref bean="triggerMeetingReminder" />
<ref bean="triggerExpiringRecording" />
<ref bean="triggerResetSendingMailStatus" />
<ref bean="triggerSendMails" />
<ref bean="triggerLoadRss" />
<ref bean="triggerCheckHealth" />
<ref bean="triggerNotifyNewGroupUsers" />
</list>
</property>
</bean>
<!-- End of Services -->
<!-- Thread Executor -->
<bean id="taskExecutor" class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
<property name="corePoolSize" value="5" />
<property name="maxPoolSize" value="10" />
<property name="queueCapacity" value="25" />
</bean>
</beans>