-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from aandryashin/multiple-contexts
Separate application contexts
- Loading branch information
Showing
14 changed files
with
257 additions
and
205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?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" | ||
xsi:schemaLocation=" | ||
http://www.springframework.org/schema/beans | ||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd | ||
http://camel.apache.org/schema/spring | ||
http://camel.apache.org/schema/spring/camel-spring.xsd | ||
http://www.springframework.org/schema/context | ||
http://www.springframework.org/schema/context/spring-context-3.0.xsd"> | ||
|
||
<bean id="jmsConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory"> | ||
<property name="brokerURL" value="failover:${jms.broker.list}"/> | ||
</bean> | ||
|
||
<bean id="pooledConnectionFactory" class="org.apache.activemq.pool.PooledConnectionFactory" | ||
depends-on="camelotCamelContext" init-method="start" destroy-method="stop"> | ||
<property name="timeBetweenExpirationCheckMillis" value="${activemq.pool.timeBetweenExpirationCheckMillis}"/> | ||
<property name="idleTimeout" value="${activemq.pool.idleTimeout}"/> | ||
<property name="maxConnections" value="${activemq.pool.maxConnections}"/> | ||
<property name="maximumActiveSessionPerConnection" value="${activemq.pool.maximumActiveSessionPerConnection}"/> | ||
<property name="connectionFactory" ref="jmsConnectionFactory"/> | ||
</bean> | ||
|
||
<bean id="jmsConfig" class="org.apache.camel.component.jms.JmsConfiguration"> | ||
<property name="connectionFactory" ref="pooledConnectionFactory"/> | ||
<property name="transacted" value="false"/> | ||
<property name="testConnectionOnStartup" value="true"/> | ||
</bean> | ||
|
||
<bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent"> | ||
<property name="configuration" ref="jmsConfig"/> | ||
<property name="testConnectionOnStartup" value="true"/> | ||
</bean> | ||
|
||
</beans> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?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" | ||
xsi:schemaLocation=" | ||
http://www.springframework.org/schema/beans | ||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd | ||
http://camel.apache.org/schema/spring | ||
http://camel.apache.org/schema/spring/camel-spring.xsd | ||
http://www.springframework.org/schema/context | ||
http://www.springframework.org/schema/context/spring-context-3.0.xsd"> | ||
|
||
<!-- Routes --> | ||
<camelContext id="camelotCamelContext" xmlns="http://camel.apache.org/schema/spring"> | ||
<jmxAgent id="agent" disabled="true"/> | ||
|
||
<endpoint id="events.input" uri="${camelot.input.uri}"/> | ||
<endpoint id="events.output" uri="${camelot.output.uri}"/> | ||
|
||
<route id="stopped"> | ||
<from ref="events.output"/> | ||
<stop/> | ||
</route> | ||
</camelContext> | ||
|
||
</beans> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?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:hz="http://www.hazelcast.com/schema/spring" | ||
xmlns:context="http://www.springframework.org/schema/context" | ||
xsi:schemaLocation=" | ||
http://www.springframework.org/schema/beans | ||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd | ||
http://www.hazelcast.com/schema/spring | ||
http://www.hazelcast.com/schema/spring/hazelcast-spring-3.2.xsd | ||
http://www.springframework.org/schema/context | ||
http://www.springframework.org/schema/context/spring-context-3.0.xsd"> | ||
|
||
<hz:hazelcast id="hazelcastInstance"> | ||
<hz:config> | ||
<hz:group name="${hazelcast.group.name}" password="${hazelcast.group.password}"/> | ||
<hz:properties> | ||
<hz:property name="hazelcast.merge.first.run.delay.seconds">${hazelcast.merge.first.run.delay.seconds} | ||
</hz:property> | ||
<hz:property name="hazelcast.merge.next.run.delay.seconds">${hazelcast.merge.next.run.delay.seconds} | ||
</hz:property> | ||
<hz:property name="hazelcast.max.no.heartbeat.seconds">${hazelcast.max.no.heartbeat.seconds} | ||
</hz:property> | ||
<hz:property name="hazelcast.logging.type">${hazelcast.logging.type}</hz:property> | ||
</hz:properties> | ||
<hz:network port="${hazelcast.port}" port-auto-increment="${hazelcast.port.auto.increment}"> | ||
<hz:join> | ||
<hz:multicast enabled="false" multicast-group="224.2.2.3" multicast-port="54327"/> | ||
<hz:tcp-ip enabled="${hazelcast.tcp-ip.enabled}"> | ||
<hz:members>${hazelcast.hosts}</hz:members> | ||
</hz:tcp-ip> | ||
</hz:join> | ||
<hz:interfaces> | ||
<hz:interface>${hazelcast.interface}</hz:interface> | ||
</hz:interfaces> | ||
</hz:network> | ||
|
||
<hz:map name="${hazelcast.map.name}" | ||
backup-count="${hazelcast.backup.count}" | ||
async-backup-count="${hazelcast.async.backup.count}" | ||
max-size="${hazelcast.map.max-size}" | ||
eviction-percentage="${hazelcast.map.eviction-percentage}" | ||
read-backup-data="${hazelcast.map.read-backup-data}" | ||
eviction-policy="${hazelcast.map.eviction-policy}" | ||
merge-policy="${hazelcast.map.merge-policy}"> | ||
</hz:map> | ||
</hz:config> | ||
</hz:hazelcast> | ||
|
||
<!-- Builders Factories --> | ||
<bean id="FACTORY-HZ" class="ru.yandex.qatools.camelot.core.builders.BuildersFactoryWithHazelcastImpl"> | ||
<constructor-arg name="hazelcastInstance" ref="hazelcastInstance"/> | ||
<property name="waitForLockSec" value="${camelot.hazelcast.waitForLockSec}"/> | ||
</bean> | ||
|
||
</beans> |
28 changes: 28 additions & 0 deletions
28
camelot-core/src/main/resources/camelot-loaders-context.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?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" | ||
xsi:schemaLocation=" | ||
http://www.springframework.org/schema/beans | ||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd | ||
http://camel.apache.org/schema/spring | ||
http://camel.apache.org/schema/spring/camel-spring.xsd | ||
http://www.springframework.org/schema/context | ||
http://www.springframework.org/schema/context/spring-context-3.0.xsd"> | ||
|
||
<bean id="LOADER-MAVEN" class="ru.yandex.qatools.camelot.core.impl.MavenRepositoryPluginLoader"> | ||
<constructor-arg name="localRepository" value="${plugins.local.repository}"/> | ||
<constructor-arg name="remoteRepositories" value="${plugins.remote.repositories}"/> | ||
<constructor-arg name="updatePolicy" value="${plugins.config.updatePolicy}"/> | ||
<constructor-arg name="checksumPolicy" value="${plugins.config.checksumPolicy}"/> | ||
</bean> | ||
<bean id="LOADER-CLASSPATH" class="ru.yandex.qatools.camelot.core.impl.SameClasspathPluginLoader"/> | ||
|
||
<bean id="schedulerFactory" class="org.quartz.impl.StdSchedulerFactory"/> | ||
<bean id="scheduler" factory-bean="schedulerFactory" factory-method="getScheduler"/> | ||
|
||
<bean id="FACTORY-MEM" class="ru.yandex.qatools.camelot.core.builders.BuildersFactoryImpl"> | ||
<property name="waitForLockSec" value="${camelot.mem.waitForLockSec}"/> | ||
</bean> | ||
|
||
</beans> |
Oops, something went wrong.