<?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:context="http://www.springframework.org/schema/context"
	xmlns:mvc="http://www.springframework.org/schema/mvc"
	xmlns:util="http://www.springframework.org/schema/util"
	xmlns:task="http://www.springframework.org/schema/task"
	xmlns:p="http://www.springframework.org/schema/p"
	xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
		http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd
		http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.0.xsd
		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">

	<!-- Activate annotation configured components -->
	<mvc:annotation-driven/>
	<task:annotation-driven/>
	<context:annotation-config/>
	<context:property-placeholder location="classpath:app.properties" />

	<bean id="serverObjectFactory" class="com.highcharts.export.pool.ServerObjectFactory">
		<property name="host" value="${host}"/>
		<property name="basePort" value="${port}"/>
		<property name="exec" value="${exec}"/>
		<property name="script" value="${script}"/>
		<property name="readTimeout" value="${readTimeout}"/>
		<property name="connectTimeout" value="${connectTimeout}"/>
		<property name="maxTimeout" value="${maxTimeout}"/>
	</bean>

	<bean id="serverPool" class="com.highcharts.export.pool.BlockingQueuePool">
		<constructor-arg name="factory" ref="serverObjectFactory"/>
		<constructor-arg name="number"  value="${poolSize}"/>
		<constructor-arg name="maxWait" value="${maxWait}"/>
	</bean>


</beans>
