<? XML version= "1.0" encoding="UTF-8"?>
<! DOCTYPE beans Public "-//spring//dtd bean//en" "/spring-beans.dtd">
<beans>
<!--an asynchronous thread pool--
<Bean id= "threadPool" class=" Org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor ">
<!--number of core threads--
<property name= "corepoolsize" value= "ten" />
<!--maximum Thread count--
<property name= "maxpoolsize" value= " /> "
<!--queue Maximum length >=mainexecutor.maxsize--
<property name="queuecapacity" value= " /> "
<!--thread pool to maintain idle time allowed by threads--
<property name= "keepaliveseconds" value= " /> "
<!--thread pool processing policy for rejected tasks (wireless path available)--
<property name="Rejectedexecutionhandler">
<Bean class="Java.util.concurrent.threadpoolexecutor$callerrunspolicy" />
</Property>
</Bean>
<Bean id="Mainexecutor" class= "supben. Mainexecutor ">
<property name= "threadPool" ref="ThreadPool" />
</Bean>
<Bean id= "springscheduleexecutortask" class=" Org.springframework.scheduling.concurrent.ScheduledExecutorTask ">
<property name= "runnable" ref="Mainexecutor" />
<!--container starts to execute after 10 seconds
<property name="delay" value="10000" />
<!--each task interval 5 seconds--
<property name= "period" value= " /> "
</Bean>
<Bean id= "springscheduledexecutorfactorybean" class=" Org.springframework.scheduling.concurrent.ScheduledExecutorFactoryBean ">
<property name="Scheduledexecutortasks">
<list>
<ref bean="Springscheduleexecutortask" />
</list>
</Property>
</Bean>
</Beans>
5 Elements of a spring thread pool