peternameyakj
2024-07-21 25e1d54f2295934446473fe85cf022fa6140b4e0
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
<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:mvc="http://www.springframework.org/schema/mvc"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
        http://www.springframework.org/schema/context
        http://www.springframework.org/schema/context/spring-context-4.1.xsd
        http://www.springframework.org/schema/mvc
        http://www.springframework.org/schema/mvc/spring-mvc-4.1.xsd">
 
    <bean id="redis" class="project.redis.interal.Redis">
    </bean>
    <bean id="redisHandler"
        class="project.redis.interal.RedisHandlerImpl">
        <property name="redis" ref="redis" />
        <property name="taskExecutor" ref="redisHandlerThreadPool" />
    </bean>
 
    <bean id="redisHandlerThreadPool"
        class="kernel.concurrent.ThreadPoolTaskExecutor">
        <property name="corePoolSize" value="10" />
        <property name="keepAliveSeconds" value="60" />
        <property name="maxPoolSize" value="150" />
        <property name="queueCapacity" value="1000" />
        <property name="rejectedExecutionHandler"
            ref="redisHandlerThreadRejectExecutingHandler" />
    </bean>
 
    <bean id="sysLogService" class="project.log.internal.SysLogServiceImpl"/>
 
    <bean id="redisHandlerThreadRejectExecutingHandler"
        class="kernel.util.RejectExecutionHandlerDelegator">
        <property name="rejectExecutionHandlers">
            <list>
                <bean class="project.redis.interal.OffLineEventRejectExecutingHandler" >
                <property name="sysLogService"  ref="sysLogService" />
                </bean>
            </list>
        </property>
    </bean>
 
</beans>