<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:util="http://www.springframework.org/schema/util"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:context="http://www.springframework.org/schema/context"
	xmlns:camel="http://camel.apache.org/schema/spring"
	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://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
                http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.1.xsd">

	<bean id="cachedConnectionFactory"
		class="org.springframework.jms.connection.CachingConnectionFactory"
		depends-on="embeddedBroker">
		<property name="targetConnectionFactory"
			ref="activemqConnectionFactory"></property>
		<property name="sessionCacheSize" value="10"></property>
	</bean>
	<!-- This is used for the connections from internal clients to embedded 
		(internal) node broker. Since in this case establishing ssl connection is 
		overkill, vm connection is used instead -->
	<bean id="activemqConnectionFactory"
		class="org.apache.activemq.ActiveMQConnectionFactory">
		<property name="brokerURL" value="vm://wonBroker" />
		<property name="maxThreadPoolSize" value="10" />
	</bean>
	<!-- Configuring Broker -->
	<!-- we used to have the o.a.a.x.PooledBrokerFactoryBean here, but it does 
		not set the main spring context as its parent context in its onPropertiesSet() 
		method, so we can't use any of our beans inside the broker's spring context 
		- but we need to use the same trustStoreService bean inside and outside the 
		broker, so we changed to use the o.a.a.x.BrokerFactoryBean instead -->
	<bean id="embeddedBroker"
		class="org.apache.activemq.xbean.BrokerFactoryBean">
		<property name="config"
			value="classpath:spring/component/broker/activemq.xml" />
		<property name="start" value="true" />
	</bean>
	<bean id="activeMQService"
		class="won.protocol.jms.ActiveMQServiceImpl">
		<constructor-arg name="type" value="AtomProtocol" />
	</bean>
	<bean id="brokerComponentFactory"
		class="won.protocol.jms.BrokerComponentFactory" />
	<bean name="atomProtocolCamelConfigurator"
		class="won.node.camel.AtomProtocolCamelConfiguratorImpl">
		<property name="componentName" value="activemq" />
		<property name="messagingContext" ref="messagingContext" />
	</bean>
</beans>
Refactor node camel/activemq spring files
Refactor node camel/activemq spring files