Repository: activemq Updated Branches: refs/heads/master 2311749aa -> b3dff48a0
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 Project: http://git-wip-us.apache.org/repos/asf/activemq/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/b3dff48a Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/b3dff48a Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/b3dff48a Branch: refs/heads/master Commit: b3dff48a0a4726c41eba6c2be8efbdbc19d1c095 Parents: 2311749 Author: Christopher L. Shannon (cshannon) <christopher.l.shan...@gmail.com> Authored: Sat Jun 24 08:59:45 2017 -0400 Committer: Christopher L. Shannon (cshannon) <christopher.l.shan...@gmail.com> Committed: Sat Jun 24 08:59:45 2017 -0400 ---------------------------------------------------------------------- .../apache/activemq/karaf/commands/spring.xml | 144 ------------------- activemq-osgi/pom.xml | 25 ---- activemq-spring/pom.xml | 24 ---- .../hooks/osgi/SpringOsgiContextHook.java | 51 ------- .../src/main/webapp/WEB-INF/activemq.xml | 6 +- pom.xml | 6 - 6 files changed, 2 insertions(+), 254 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/activemq/blob/b3dff48a/activemq-karaf/src/main/resources/org/apache/activemq/karaf/commands/spring.xml ---------------------------------------------------------------------- diff --git a/activemq-karaf/src/main/resources/org/apache/activemq/karaf/commands/spring.xml b/activemq-karaf/src/main/resources/org/apache/activemq/karaf/commands/spring.xml deleted file mode 100644 index 3b65ce8..0000000 --- a/activemq-karaf/src/main/resources/org/apache/activemq/karaf/commands/spring.xml +++ /dev/null @@ -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> - - http://git-wip-us.apache.org/repos/asf/activemq/blob/b3dff48a/activemq-osgi/pom.xml ---------------------------------------------------------------------- diff --git a/activemq-osgi/pom.xml b/activemq-osgi/pom.xml index 80eecf4..5190cc5 100644 --- a/activemq-osgi/pom.xml +++ b/activemq-osgi/pom.xml @@ -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*, @@ -181,29 +180,6 @@ </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> </dependency> @@ -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/*, http://git-wip-us.apache.org/repos/asf/activemq/blob/b3dff48a/activemq-spring/pom.xml ---------------------------------------------------------------------- diff --git a/activemq-spring/pom.xml b/activemq-spring/pom.xml index 447a969..2a39e6d 100644 --- a/activemq-spring/pom.xml +++ b/activemq-spring/pom.xml @@ -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> http://git-wip-us.apache.org/repos/asf/activemq/blob/b3dff48a/activemq-spring/src/main/java/org/apache/activemq/hooks/osgi/SpringOsgiContextHook.java ---------------------------------------------------------------------- diff --git a/activemq-spring/src/main/java/org/apache/activemq/hooks/osgi/SpringOsgiContextHook.java b/activemq-spring/src/main/java/org/apache/activemq/hooks/osgi/SpringOsgiContextHook.java deleted file mode 100644 index 45c7bec..0000000 --- a/activemq-spring/src/main/java/org/apache/activemq/hooks/osgi/SpringOsgiContextHook.java +++ /dev/null @@ -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; - } - -} http://git-wip-us.apache.org/repos/asf/activemq/blob/b3dff48a/activemq-web-console/src/main/webapp/WEB-INF/activemq.xml ---------------------------------------------------------------------- diff --git a/activemq-web-console/src/main/webapp/WEB-INF/activemq.xml b/activemq-web-console/src/main/webapp/WEB-INF/activemq.xml index c7ed77f..279f993 100644 --- a/activemq-web-console/src/main/webapp/WEB-INF/activemq.xml +++ b/activemq-web-console/src/main/webapp/WEB-INF/activemq.xml @@ -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" /> http://git-wip-us.apache.org/repos/asf/activemq/blob/b3dff48a/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index b4dde08..de95259 100644 --- a/pom.xml +++ b/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>