-
Notifications
You must be signed in to change notification settings - Fork 1
/
beans.xml
109 lines (93 loc) · 4.71 KB
/
beans.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:oxm="http://www.springframework.org/schema/oxm" xmlns:util="http://www.springframework.org/schema/util" xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.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
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/oxm
http://www.springframework.org/schema/oxm/spring-oxm.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd">
<context:component-scan base-package="org.appng.application.scheduler" />
<bean id="scheduler" class="org.appng.application.scheduler.quartz.SchedulerFactoryBean" lazy-init="false">
<constructor-arg value="${quartzDriverDelegate}" />
<property name="schedulerName">
<value>Scheduler_${site.name}</value>
</property>
<property name="autoStartup" value="false" />
<property name="overwriteExistingJobs" value="true" />
<property name="dataSource" ref="dataSource" />
<property name="transactionManager">
<bean class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource" />
</bean>
</property>
<property name="jobFactory">
<bean class="org.appng.application.scheduler.quartz.SpringQuartzSchedulerFactory" />
</property>
<property name="quartzProperties">
<props>
<prop key="org.quartz.scheduler.instanceName">Scheduler_${site.name}</prop>
<prop key="org.quartz.scheduler.threadName">Scheduler_${site.name}</prop>
<prop key="org.quartz.threadPool.threadCount">3</prop>
<prop key="org.quartz.scheduler.skipUpdateCheck">true</prop>
<prop key="org.quartz.scheduler.interruptJobsOnShutdown">true</prop>
<prop key="org.quartz.scheduler.instanceId">AUTO</prop>
<prop key="org.quartz.scheduler.instanceIdGenerator.class">org.quartz.simpl.HostnameInstanceIdGenerator</prop>
<prop key="org.quartz.jobStore.isClustered">${platform.messagingEnabled:false}</prop>
<prop key="org.quartz.jobStore.clusterCheckinInterval">${quartzClusterCheckinInterval:20000}</prop>
</props>
</property>
</bean>
<bean id="jdbcTemplate" class="org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate">
<constructor-arg ref="dataSource" />
</bean>
<bean id="jobs" class="org.appng.application.scheduler.business.SchedulerDataSource">
<property name="scheduler" ref="scheduler" />
</bean>
<bean id="updateJob" class="org.appng.application.scheduler.business.UpdateSchedulerAction">
<property name="scheduler" ref="scheduler" />
</bean>
<bean id="createJob" class="org.appng.application.scheduler.business.CreateSchedulerAction">
<property name="scheduler" ref="scheduler" />
</bean>
<bean id="setJobState" class="org.appng.application.scheduler.business.SetSchedulerStateAction">
<property name="scheduler" ref="scheduler" />
</bean>
<bean id="indexJob" class="org.appng.application.scheduler.job.IndexJob">
<property name="description" value="Search job" />
<property name="jobDataMap">
<map>
<entry key="enabled" value="${indexEnabled}" />
<entry key="cronExpression" value="${indexExpression}" />
<entry key="jspFileType" value="${platform.jspFileType}" />
</map>
</property>
</bean>
<bean id="houseKeepingJob" class="org.appng.application.scheduler.job.JobRecordHouseKeepingJob">
<property name="description" value="Job Record House Keeping Job" />
<property name="jobDataMap">
<map>
<entry key="enabled" value="${houseKeepingEnabled}" />
<entry key="cronExpression" value="${houseKeepingExpression}" />
</map>
</property>
<property name="jobRecordService" ref="jobRecordService" />
</bean>
<!-- this is needed to support the dictionary view of appng-manager -->
<util:list id="messageSources">
<value>messages-scheduler</value>
<value>messages-core</value>
</util:list>
<bean id="objectMapper" class="com.fasterxml.jackson.databind.ObjectMapper">
</bean>
<bean class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter">
<property name="objectMapper" ref="objectMapper" />
<property name="prettyPrint" value="true" />
</bean>
</beans>