mirror of https://github.com/apache/activemq.git
AMQ-5932 - removing all traces of Spring DM
Spring DM is not longer needed anymore after the upgrade to Camel 2.19.x as everything is using Blueprint
This commit is contained in:
parent
2311749aa2
commit
b3dff48a0a
|
@ -1,144 +0,0 @@
|
|||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF 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.
|
||||
-->
|
||||
<beans
|
||||
xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:amq="http://activemq.apache.org/schema/core"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:osgi="http://www.springframework.org/schema/osgi"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
|
||||
http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
|
||||
http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd">
|
||||
|
||||
<!-- Allows us to use system properties as variables in this configuration file -->
|
||||
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
|
||||
|
||||
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="${name}" dataDirectory="${karaf.data}/activemq/${name}" useShutdownHook="false" startAsync="true">
|
||||
|
||||
<!--
|
||||
For better performances use VM cursor and small memory limit.
|
||||
For more information, see:
|
||||
|
||||
http://activemq.apache.org/message-cursors.html
|
||||
|
||||
Also, if your producer is "hanging", it's probably due to producer flow control.
|
||||
For more information, see:
|
||||
http://activemq.apache.org/producer-flow-control.html
|
||||
-->
|
||||
|
||||
<destinationPolicy>
|
||||
<policyMap>
|
||||
<policyEntries>
|
||||
<policyEntry topic=">" producerFlowControl="true" memoryLimit="1mb">
|
||||
<pendingSubscriberPolicy>
|
||||
<vmCursor />
|
||||
</pendingSubscriberPolicy>
|
||||
</policyEntry>
|
||||
<policyEntry queue=">" producerFlowControl="true" memoryLimit="1mb">
|
||||
<!-- Use VM cursor for better latency
|
||||
For more information, see:
|
||||
|
||||
http://activemq.apache.org/message-cursors.html
|
||||
|
||||
<pendingQueuePolicy>
|
||||
<vmQueueCursor/>
|
||||
</pendingQueuePolicy>
|
||||
-->
|
||||
</policyEntry>
|
||||
</policyEntries>
|
||||
</policyMap>
|
||||
</destinationPolicy>
|
||||
|
||||
<!-- Use the following to configure how ActiveMQ is exposed in JMX -->
|
||||
<managementContext>
|
||||
<managementContext createConnector="false"/>
|
||||
</managementContext>
|
||||
|
||||
<!--
|
||||
Configure message persistence for the broker. The default persistence
|
||||
mechanism is the KahaDB store (identified by the kahaDB tag).
|
||||
For more information, see:
|
||||
|
||||
http://activemq.apache.org/persistence.html
|
||||
-->
|
||||
<persistenceAdapter>
|
||||
<kahaDB directory="${karaf.data}/activemq/${name}/kahadb"/>
|
||||
</persistenceAdapter>
|
||||
|
||||
<!--
|
||||
The systemUsage controls the maximum amount of space the broker will
|
||||
use before slowing down producers. For more information, see:
|
||||
|
||||
http://activemq.apache.org/producer-flow-control.html
|
||||
|
||||
<systemUsage>
|
||||
<systemUsage>
|
||||
<memoryUsage>
|
||||
<memoryUsage limit="20 mb"/>
|
||||
</memoryUsage>
|
||||
<storeUsage>
|
||||
<storeUsage limit="1 gb" name="foo"/>
|
||||
</storeUsage>
|
||||
<tempUsage>
|
||||
<tempUsage limit="100 mb"/>
|
||||
</tempUsage>
|
||||
</systemUsage>
|
||||
</systemUsage>
|
||||
-->
|
||||
|
||||
<shutdownHooks>
|
||||
<bean xmlns="http://www.springframework.org/schema/beans" id="hook" class="org.apache.activemq.hooks.osgi.SpringOsgiContextHook" />
|
||||
</shutdownHooks>
|
||||
|
||||
<!-- The transport connectors ActiveMQ will listen to -->
|
||||
<transportConnectors>
|
||||
<transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/>
|
||||
<transportConnector name="stomp" uri="stomp://0.0.0.0:61613"/>
|
||||
</transportConnectors>
|
||||
|
||||
</broker>
|
||||
|
||||
<bean id="activemqConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
|
||||
<property name="brokerURL" value="tcp://0.0.0.0:61616" />
|
||||
</bean>
|
||||
|
||||
<bean id="pooledConnectionFactory" class="org.apache.activemq.pool.PooledConnectionFactory">
|
||||
<property name="maxConnections" value="8" />
|
||||
<property name="connectionFactory" ref="activemqConnectionFactory" />
|
||||
</bean>
|
||||
|
||||
<bean id="resourceManager" class="org.apache.activemq.jms.pool.GenericResourceManager" init-method="recoverResource">
|
||||
<property name="transactionManager" ref="transactionManager" />
|
||||
<property name="connectionFactory" ref="activemqConnectionFactory" />
|
||||
<property name="resourceName" value="activemq.${name}" />
|
||||
</bean>
|
||||
|
||||
<osgi:reference id="transactionManager" interface="javax.transaction.TransactionManager" />
|
||||
|
||||
<osgi:service ref="pooledConnectionFactory">
|
||||
|
||||
<osgi:interfaces>
|
||||
<value>javax.jms.ConnectionFactory</value>
|
||||
</osgi:interfaces>
|
||||
<osgi:service-properties>
|
||||
<entry key="name" value="${name}"/>
|
||||
</osgi:service-properties>
|
||||
</osgi:service>
|
||||
|
||||
</beans>
|
||||
|
||||
|
|
@ -87,7 +87,6 @@
|
|||
</activemq.osgi.export>
|
||||
<activemq.osgi.private.pkg>
|
||||
org.apache.xbean*,
|
||||
org.springframework.osgi*,
|
||||
org.fusesource.hawtdispatch*,
|
||||
org.fusesource.mqtt*,
|
||||
org.fusesource.hawtbuf*,
|
||||
|
@ -180,29 +179,6 @@
|
|||
<artifactId>camel-blueprint</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.osgi</groupId>
|
||||
<artifactId>spring-osgi-core</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>org.springframework.aop</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>org.springframework.beans</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>org.springframework.context</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>org.springframework.core</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>activemq-runtime-config</artifactId>
|
||||
|
@ -303,7 +279,6 @@
|
|||
<Embed-Dependency>
|
||||
*;groupId=org.apache.activemq;inline=META-INF/services/*,
|
||||
*;groupId=org.apache.qpid;inline=META-INF/services/*,
|
||||
*;groupId=org.springframework.osgi;inline=true
|
||||
*;groupId=org.apache.xbean;inline=true
|
||||
<!--
|
||||
groupId=org.fusesource.leveldbjni;inline=META-INF/native/*,
|
||||
|
|
|
@ -204,30 +204,6 @@
|
|||
<artifactId>activemq-ra</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.osgi</groupId>
|
||||
<artifactId>spring-osgi-core</artifactId>
|
||||
<scope>provided</scope>
|
||||
<optional>true</optional>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>org.springframework.context</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>org.springframework.beans</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>org.springframework.aop</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>org.springframework.core</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
|
|
@ -1,51 +0,0 @@
|
|||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF 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.
|
||||
*/
|
||||
package org.apache.activemq.hooks.osgi;
|
||||
|
||||
import org.osgi.framework.BundleException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationContextAware;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
import org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext;
|
||||
|
||||
public class SpringOsgiContextHook implements Runnable, ApplicationContextAware {
|
||||
|
||||
private static final transient Logger LOG = LoggerFactory.getLogger(SpringOsgiContextHook.class);
|
||||
ApplicationContext applicationContext;
|
||||
|
||||
public void run() {
|
||||
if (applicationContext instanceof ConfigurableApplicationContext) {
|
||||
((ConfigurableApplicationContext) applicationContext).close();
|
||||
}
|
||||
if (applicationContext instanceof OsgiBundleXmlApplicationContext){
|
||||
try {
|
||||
((OsgiBundleXmlApplicationContext)applicationContext).getBundle().stop();
|
||||
} catch (BundleException e) {
|
||||
LOG.info("Error stopping OSGi bundle " + e, e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
|
||||
this.applicationContext = applicationContext;
|
||||
}
|
||||
|
||||
}
|
|
@ -18,12 +18,10 @@
|
|||
<beans
|
||||
xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:amq="http://activemq.apache.org/schema/core"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:osgi="http://www.springframework.org/schema/osgi"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance""
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
|
||||
http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd">
|
||||
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
|
||||
|
||||
<bean id="placeholderConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" />
|
||||
|
||||
|
|
6
pom.xml
6
pom.xml
|
@ -119,7 +119,6 @@
|
|||
<slf4j-version>1.7.13</slf4j-version>
|
||||
<snappy-version>1.1.2</snappy-version>
|
||||
<spring-version>4.3.9.RELEASE</spring-version>
|
||||
<spring-osgi-version>1.2.1</spring-osgi-version>
|
||||
<stax2-api-version>3.0.2</stax2-api-version>
|
||||
<taglibs-version>1.2.5</taglibs-version>
|
||||
<velocity-version>1.7</velocity-version>
|
||||
|
@ -809,11 +808,6 @@
|
|||
<artifactId>spring-oxm</artifactId>
|
||||
<version>${spring-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.osgi</groupId>
|
||||
<artifactId>spring-osgi-core</artifactId>
|
||||
<version>${spring-osgi-version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Optional Derby support-->
|
||||
<dependency>
|
||||
|
|
Loading…
Reference in New Issue