All Downloads are FREE. Search and download functionalities are using the official Maven repository.

t.commons.components.soitoolkit-commons-mule.2.0.0-M4.source-code.soitoolkit-mule-jms-xa-connector-activemq-embedded.xml Maven / Gradle / Ivy

There is a newer version: 2.0.0-M6
Show newest version
<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the soi-toolkit project under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The soi-toolkit project licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at
 
      http://www.apache.org/licenses/LICENSE-2.0
 
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<mule 
	xmlns="http://www.mulesoft.org/schema/mule/core"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:spring="http://www.springframework.org/schema/beans"
	xmlns:jms="http://www.mulesoft.org/schema/mule/jms"
	xmlns:amq="http://activemq.apache.org/schema/core"
	xsi:schemaLocation="
		http://www.springframework.org/schema/beans    http://www.springframework.org/schema/beans/spring-beans-current.xsd
		http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd 
		http://www.mulesoft.org/schema/mule/jms  http://www.mulesoft.org/schema/mule/jms/current/mule-jms.xsd
		http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd"> 

<!-- Already imported by soitoolkit-mule-jms-connector-activemq-embedded.xml, that always will be used together with this one... 
    <spring:beans>
        <spring:import resource="classpath:soitoolkit-mule-jms-connector-commons.xml"/>
		<amq:broker id="broker" brokerName="localhost" persistent="false" useJmx="false" start="true" >
			<amq:destinationPolicy>
				<amq:policyMap>
					<amq:policyEntries>
		                <amq:policyEntry queue=">" producerFlowControl="true" memoryLimit="1mb">
							<amq:deadLetterStrategy>
								<!- - Use the prefix 'DLQ.' for the destination name, and make the DLQ a 
									queue rather than a topic - ->
								<amq:individualDeadLetterStrategy
									queuePrefix="DLQ." useQueueForQueueMessages="true" />
							</amq:deadLetterStrategy>
						</amq:policyEntry>
					</amq:policyEntries>
				</amq:policyMap>
			</amq:destinationPolicy>
			<amq:transportConnectors>
				<amq:transportConnector uri="vm://localhost" />
			</amq:transportConnectors>
		</amq:broker>

    </spring:beans>
-->    

	<spring:bean name="soitoolkit-jms-xa-connection-factory"
		class="org.apache.activemq.ActiveMQXAConnectionFactory" depends-on="broker">
		<spring:property name="brokerURL" value="vm://localhost" />
		<spring:property name="redeliveryPolicy">
			<spring:bean class="org.apache.activemq.RedeliveryPolicy">
				<spring:property name="maximumRedeliveries" value="3" />
				<spring:property name="initialRedeliveryDelay" value="500" />			
			</spring:bean>
		</spring:property>
	</spring:bean>

	<jms:connector name="soitoolkit-jms-xa-connector"
		connectionFactory-ref="soitoolkit-jms-xa-connection-factory"
		disableTemporaryReplyToDestinations="true" 
		persistentDelivery="true"
		numberOfConsumers="2"
		specification="1.1"
		maxRedelivery="-1">
<!-- 
		<custom-exception-strategy class="org.soitoolkit.commons.mule.error.ExceptionHandler"/>
 -->
	</jms:connector>
		
</mule>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy