Return-Path: Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: (qmail 96144 invoked from network); 20 Jul 2010 12:08:30 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 20 Jul 2010 12:08:30 -0000 Received: (qmail 27397 invoked by uid 500); 20 Jul 2010 12:08:30 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 27334 invoked by uid 500); 20 Jul 2010 12:08:28 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 27327 invoked by uid 99); 20 Jul 2010 12:08:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Jul 2010 12:08:27 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Jul 2010 12:08:22 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 78808238896F; Tue, 20 Jul 2010 12:07:28 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r965820 - in /activemq/trunk/activemq-core/src: main/java/org/apache/activemq/broker/ main/java/org/apache/activemq/spring/ main/java/org/apache/activemq/transport/stomp/ main/java/org/apache/activemq/xbean/ test/java/org/apache/activemq/xb... Date: Tue, 20 Jul 2010 12:07:28 -0000 To: commits@activemq.apache.org From: dejanb@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100720120728.78808238896F@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: dejanb Date: Tue Jul 20 12:07:27 2010 New Revision: 965820 URL: http://svn.apache.org/viewvc?rev=965820&view=rev Log: https://issues.apache.org/activemq/browse/AMQ-2702 - remove runtime spring dependency Added: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerContext.java activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerContextAware.java activemq/trunk/activemq-core/src/main/java/org/apache/activemq/spring/SpringBrokerContext.java Removed: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/xbean/ApplicationContextAwareTest.java Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/JmsFrameTranslator.java activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/ProtocolConverter.java activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompNIOTransportFactory.java activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompSslTransportFactory.java activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompTransportFactory.java activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompTransportFilter.java activemq/trunk/activemq-core/src/main/java/org/apache/activemq/xbean/XBeanBrokerService.java activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/transport/stomp/niostomp-auth-broker.xml activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/transport/stomp/sslstomp-auth-broker.xml activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/transport/stomp/sslstomp-mutual-auth-broker.xml activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/transport/stomp/stomp-auth-broker.xml Added: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerContext.java URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerContext.java?rev=965820&view=auto ============================================================================== --- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerContext.java (added) +++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerContext.java Tue Jul 20 12:07:27 2010 @@ -0,0 +1,32 @@ +/** + * 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.broker; + +import java.util.Map; + +/** + * + * Provide context object for broker classes + * + */ +public interface BrokerContext { + + Object getBean(String name); + + public Map getBeansOfType(Class type); + +} Added: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerContextAware.java URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerContextAware.java?rev=965820&view=auto ============================================================================== --- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerContextAware.java (added) +++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerContextAware.java Tue Jul 20 12:07:27 2010 @@ -0,0 +1,27 @@ +/** + * 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.broker; + +/** + * + * Interface to be implemented by any object that wishes to have instance of @see BrokerContext + * + */ +public interface BrokerContextAware { + + void setBrokerContext(BrokerContext brokerContext); +} Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java?rev=965820&r1=965819&r2=965820&view=diff ============================================================================== --- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java (original) +++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java Tue Jul 20 12:07:27 2010 @@ -34,10 +34,12 @@ import java.util.concurrent.ThreadFactor import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; + import javax.annotation.PostConstruct; import javax.annotation.PreDestroy; import javax.management.MalformedObjectNameException; import javax.management.ObjectName; + import org.apache.activemq.ActiveMQConnectionMetaData; import org.apache.activemq.ConfigurationException; import org.apache.activemq.Service; @@ -196,6 +198,7 @@ public class BrokerService implements Se private ThreadPoolExecutor executor; private boolean slave = true; private int schedulePeriodForDestinationPurge=5000; + private BrokerContext brokerContext; static { @@ -2324,5 +2327,14 @@ public class BrokerService implements Se public void setSchedulePeriodForDestinationPurge(int schedulePeriodForDestinationPurge) { this.schedulePeriodForDestinationPurge = schedulePeriodForDestinationPurge; - } + } + + public BrokerContext getBrokerContext() { + return brokerContext; + } + + public void setBrokerContext(BrokerContext brokerContext) { + this.brokerContext = brokerContext; + } + } Added: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/spring/SpringBrokerContext.java URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/spring/SpringBrokerContext.java?rev=965820&view=auto ============================================================================== --- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/spring/SpringBrokerContext.java (added) +++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/spring/SpringBrokerContext.java Tue Jul 20 12:07:27 2010 @@ -0,0 +1,30 @@ +package org.apache.activemq.spring; + +import java.util.Map; + +import org.apache.activemq.broker.BrokerContext; +import org.springframework.beans.BeansException; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; + +public class SpringBrokerContext implements BrokerContext, ApplicationContextAware { + + ApplicationContext applicationContext; + + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { + this.applicationContext = applicationContext; + } + + public Object getBean(String name) { + try { + return applicationContext.getBean(name); + } catch (BeansException ex) { + return null; + } + } + + public Map getBeansOfType(Class type) { + return applicationContext.getBeansOfType(type); + } + +} Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/JmsFrameTranslator.java URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/JmsFrameTranslator.java?rev=965820&r1=965819&r2=965820&view=diff ============================================================================== --- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/JmsFrameTranslator.java (original) +++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/JmsFrameTranslator.java Tue Jul 20 12:07:27 2010 @@ -26,6 +26,8 @@ import java.util.Map; import javax.jms.JMSException; import org.apache.activemq.advisory.AdvisorySupport; +import org.apache.activemq.broker.BrokerContext; +import org.apache.activemq.broker.BrokerContextAware; import org.apache.activemq.command.ActiveMQMapMessage; import org.apache.activemq.command.ActiveMQMessage; import org.apache.activemq.command.ActiveMQObjectMessage; @@ -34,7 +36,6 @@ import org.apache.activemq.util.Jettison import org.codehaus.jettison.mapped.Configuration; import org.springframework.beans.BeansException; import org.springframework.context.ApplicationContext; -import org.springframework.context.ApplicationContextAware; import com.thoughtworks.xstream.XStream; import com.thoughtworks.xstream.io.HierarchicalStreamReader; @@ -49,10 +50,10 @@ import com.thoughtworks.xstream.io.xml.X * @author Dejan Bosanac */ public class JmsFrameTranslator extends LegacyFrameTranslator implements - ApplicationContextAware { + BrokerContextAware { XStream xStream = null; - ApplicationContext applicationContext; + BrokerContext brokerContext; public ActiveMQMessage convertFrame(ProtocolConverter converter, StompFrame command) throws JMSException, ProtocolException { @@ -230,15 +231,13 @@ public class JmsFrameTranslator extends // ------------------------------------------------------------------------- protected XStream createXStream() { XStream xstream = null; - if (applicationContext != null) { - String[] names = applicationContext - .getBeanNamesForType(XStream.class); - for (int i = 0; i < names.length; i++) { - String name = names[i]; - xstream = (XStream) applicationContext.getBean(name); - if (xstream != null) { - break; - } + if (brokerContext != null) { + Map beans = brokerContext.getBeansOfType(XStream.class); + for (XStream bean : beans.values()) { + if (bean != null) { + xstream = bean; + break; + } } } @@ -249,9 +248,8 @@ public class JmsFrameTranslator extends } - public void setApplicationContext(ApplicationContext applicationContext) - throws BeansException { - this.applicationContext = applicationContext; + public void setBrokerContext(BrokerContext brokerContext) { + this.brokerContext = brokerContext; } } Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/ProtocolConverter.java URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/ProtocolConverter.java?rev=965820&r1=965819&r2=965820&view=diff ============================================================================== --- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/ProtocolConverter.java (original) +++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/ProtocolConverter.java Tue Jul 20 12:07:27 2010 @@ -27,6 +27,8 @@ import java.util.concurrent.atomic.Atomi import javax.jms.JMSException; +import org.apache.activemq.broker.BrokerContext; +import org.apache.activemq.broker.BrokerContextAware; import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.command.ActiveMQMessage; import org.apache.activemq.command.ActiveMQTempQueue; @@ -58,7 +60,6 @@ import org.apache.activemq.util.IOExcept import org.apache.activemq.util.IdGenerator; import org.apache.activemq.util.IntrospectionSupport; import org.apache.activemq.util.LongSequenceGenerator; -import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; /** @@ -89,12 +90,12 @@ public class ProtocolConverter { private final AtomicBoolean connected = new AtomicBoolean(false); private final FrameTranslator frameTranslator; private final FactoryFinder FRAME_TRANSLATOR_FINDER = new FactoryFinder("META-INF/services/org/apache/activemq/transport/frametranslator/"); - private final ApplicationContext applicationContext; + private final BrokerContext brokerContext; - public ProtocolConverter(StompTransport stompTransport, FrameTranslator translator, ApplicationContext applicationContext) { + public ProtocolConverter(StompTransport stompTransport, FrameTranslator translator, BrokerContext brokerContext) { this.stompTransport = stompTransport; this.frameTranslator = translator; - this.applicationContext = applicationContext; + this.brokerContext = brokerContext; } protected int generateCommandId() { @@ -145,8 +146,8 @@ public class ProtocolConverter { if (header != null) { translator = (FrameTranslator) FRAME_TRANSLATOR_FINDER .newInstance(header); - if (translator instanceof ApplicationContextAware) { - ((ApplicationContextAware)translator).setApplicationContext(applicationContext); + if (translator instanceof BrokerContextAware) { + ((BrokerContextAware)translator).setBrokerContext(brokerContext); } } } catch (Exception ignore) { Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompNIOTransportFactory.java URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompNIOTransportFactory.java?rev=965820&r1=965819&r2=965820&view=diff ============================================================================== --- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompNIOTransportFactory.java (original) +++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompNIOTransportFactory.java Tue Jul 20 12:07:27 2010 @@ -26,17 +26,16 @@ import java.util.Map; import javax.net.ServerSocketFactory; import javax.net.SocketFactory; +import org.apache.activemq.broker.BrokerContext; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.broker.BrokerServiceAware; import org.apache.activemq.transport.Transport; -import org.apache.activemq.transport.nio.NIOTransport; import org.apache.activemq.transport.nio.NIOTransportFactory; import org.apache.activemq.transport.tcp.TcpTransport; import org.apache.activemq.transport.tcp.TcpTransportServer; import org.apache.activemq.util.IntrospectionSupport; import org.apache.activemq.wireformat.WireFormat; import org.apache.activemq.xbean.XBeanBrokerService; -import org.springframework.context.ApplicationContext; /** * A STOMP over NIO transport factory @@ -45,7 +44,7 @@ import org.springframework.context.Appli */ public class StompNIOTransportFactory extends NIOTransportFactory implements BrokerServiceAware { - private ApplicationContext applicationContext = null; + private BrokerContext brokerContext = null; protected String getDefaultWireFormatType() { return "stomp"; @@ -64,7 +63,7 @@ public class StompNIOTransportFactory ex } public Transport compositeConfigure(Transport transport, WireFormat format, Map options) { - transport = new StompTransportFilter(transport, new LegacyFrameTranslator(), applicationContext); + transport = new StompTransportFilter(transport, new LegacyFrameTranslator(), brokerContext); IntrospectionSupport.setProperties(transport, options); return super.compositeConfigure(transport, format, options); } @@ -76,9 +75,7 @@ public class StompNIOTransportFactory ex } public void setBrokerService(BrokerService brokerService) { - if (brokerService instanceof XBeanBrokerService) { - this.applicationContext = ((XBeanBrokerService)brokerService).getApplicationContext(); - } + this.brokerContext = brokerService.getBrokerContext(); } } Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompSslTransportFactory.java URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompSslTransportFactory.java?rev=965820&r1=965819&r2=965820&view=diff ============================================================================== --- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompSslTransportFactory.java (original) +++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompSslTransportFactory.java Tue Jul 20 12:07:27 2010 @@ -18,14 +18,13 @@ package org.apache.activemq.transport.st import java.util.Map; +import org.apache.activemq.broker.BrokerContext; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.broker.BrokerServiceAware; import org.apache.activemq.transport.Transport; import org.apache.activemq.transport.tcp.SslTransportFactory; import org.apache.activemq.util.IntrospectionSupport; import org.apache.activemq.wireformat.WireFormat; -import org.apache.activemq.xbean.XBeanBrokerService; -import org.springframework.context.ApplicationContext; /** * A STOMP over SSL transport factory @@ -34,22 +33,20 @@ import org.springframework.context.Appli */ public class StompSslTransportFactory extends SslTransportFactory implements BrokerServiceAware { - private ApplicationContext applicationContext = null; + private BrokerContext brokerContext = null; protected String getDefaultWireFormatType() { return "stomp"; } public Transport compositeConfigure(Transport transport, WireFormat format, Map options) { - transport = new StompTransportFilter(transport, new LegacyFrameTranslator(), applicationContext); + transport = new StompTransportFilter(transport, new LegacyFrameTranslator(), brokerContext); IntrospectionSupport.setProperties(transport, options); return super.compositeConfigure(transport, format, options); } public void setBrokerService(BrokerService brokerService) { - if (brokerService instanceof XBeanBrokerService) { - this.applicationContext = ((XBeanBrokerService)brokerService).getApplicationContext(); - } + this.brokerContext = brokerService.getBrokerContext(); } } Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompTransportFactory.java URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompTransportFactory.java?rev=965820&r1=965819&r2=965820&view=diff ============================================================================== --- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompTransportFactory.java (original) +++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompTransportFactory.java Tue Jul 20 12:07:27 2010 @@ -18,6 +18,7 @@ package org.apache.activemq.transport.st import java.util.Map; +import org.apache.activemq.broker.BrokerContext; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.broker.BrokerServiceAware; import org.apache.activemq.transport.Transport; @@ -25,7 +26,6 @@ import org.apache.activemq.transport.tcp import org.apache.activemq.util.IntrospectionSupport; import org.apache.activemq.wireformat.WireFormat; import org.apache.activemq.xbean.XBeanBrokerService; -import org.springframework.context.ApplicationContext; /** * A STOMP transport factory @@ -34,14 +34,14 @@ import org.springframework.context.Appli */ public class StompTransportFactory extends TcpTransportFactory implements BrokerServiceAware { - private ApplicationContext applicationContext = null; + private BrokerContext brokerContext = null; protected String getDefaultWireFormatType() { return "stomp"; } public Transport compositeConfigure(Transport transport, WireFormat format, Map options) { - transport = new StompTransportFilter(transport, new LegacyFrameTranslator(), applicationContext); + transport = new StompTransportFilter(transport, new LegacyFrameTranslator(), brokerContext); IntrospectionSupport.setProperties(transport, options); return super.compositeConfigure(transport, format, options); } @@ -53,8 +53,6 @@ public class StompTransportFactory exten } public void setBrokerService(BrokerService brokerService) { - if (brokerService instanceof XBeanBrokerService) { - this.applicationContext = ((XBeanBrokerService)brokerService).getApplicationContext(); - } + this.brokerContext = brokerService.getBrokerContext(); } } Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompTransportFilter.java URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompTransportFilter.java?rev=965820&r1=965819&r2=965820&view=diff ============================================================================== --- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompTransportFilter.java (original) +++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompTransportFilter.java Tue Jul 20 12:07:27 2010 @@ -21,8 +21,8 @@ import java.security.cert.X509Certificat import javax.jms.JMSException; +import org.apache.activemq.broker.BrokerContext; import org.apache.activemq.command.Command; - import org.apache.activemq.transport.Transport; import org.apache.activemq.transport.TransportFilter; import org.apache.activemq.transport.TransportListener; @@ -30,7 +30,6 @@ import org.apache.activemq.transport.tcp import org.apache.activemq.util.IOExceptionSupport; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.springframework.context.ApplicationContext; /** * The StompTransportFilter normally sits on top of a TcpTransport that has been @@ -47,10 +46,10 @@ public class StompTransportFilter extend private boolean trace; - public StompTransportFilter(Transport next, FrameTranslator translator, ApplicationContext applicationContext) { + public StompTransportFilter(Transport next, FrameTranslator translator, BrokerContext brokerContext) { super(next); this.frameTranslator = translator; - this.protocolConverter = new ProtocolConverter(this, translator, applicationContext); + this.protocolConverter = new ProtocolConverter(this, translator, brokerContext); } public void oneway(Object o) throws IOException { Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/xbean/XBeanBrokerService.java URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/xbean/XBeanBrokerService.java?rev=965820&r1=965819&r2=965820&view=diff ============================================================================== --- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/xbean/XBeanBrokerService.java (original) +++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/xbean/XBeanBrokerService.java Tue Jul 20 12:07:27 2010 @@ -25,9 +25,6 @@ import org.apache.activemq.broker.Broker import org.apache.activemq.usage.SystemUsage; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.springframework.beans.BeansException; -import org.springframework.context.ApplicationContext; -import org.springframework.context.ApplicationContextAware; /** * An ActiveMQ Message Broker. It consists of a number of transport @@ -43,11 +40,10 @@ import org.springframework.context.Appli * {code} * @version $Revision: 1.1 $ */ -public class XBeanBrokerService extends BrokerService implements ApplicationContextAware { +public class XBeanBrokerService extends BrokerService { private static final transient Log LOG = LogFactory.getLog(XBeanBrokerService.class); private boolean start = true; - private ApplicationContext applicationContext = null; public XBeanBrokerService() { } @@ -112,15 +108,5 @@ public class XBeanBrokerService extends public void setDestroyApplicationContextOnStop(boolean destroy) { LOG.warn("destroyApplicationContextOnStop parameter is deprecated, please use shutdown hooks instead"); } - - public void setApplicationContext(ApplicationContext applicationContext) - throws BeansException { - this.applicationContext = applicationContext; - } - - public ApplicationContext getApplicationContext() { - return applicationContext; - } - } Modified: activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/transport/stomp/niostomp-auth-broker.xml URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/transport/stomp/niostomp-auth-broker.xml?rev=965820&r1=965819&r2=965820&view=diff ============================================================================== --- activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/transport/stomp/niostomp-auth-broker.xml (original) +++ activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/transport/stomp/niostomp-auth-broker.xml Tue Jul 20 12:07:27 2010 @@ -30,8 +30,10 @@ org.apache.activemq.transport.stomp.SamplePojo + + - + Modified: activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/transport/stomp/sslstomp-auth-broker.xml URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/transport/stomp/sslstomp-auth-broker.xml?rev=965820&r1=965819&r2=965820&view=diff ============================================================================== --- activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/transport/stomp/sslstomp-auth-broker.xml (original) +++ activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/transport/stomp/sslstomp-auth-broker.xml Tue Jul 20 12:07:27 2010 @@ -31,7 +31,9 @@ org.apache.activemq.transport.stomp.SamplePojo - + + + Modified: activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/transport/stomp/sslstomp-mutual-auth-broker.xml URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/transport/stomp/sslstomp-mutual-auth-broker.xml?rev=965820&r1=965819&r2=965820&view=diff ============================================================================== --- activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/transport/stomp/sslstomp-mutual-auth-broker.xml (original) +++ activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/transport/stomp/sslstomp-mutual-auth-broker.xml Tue Jul 20 12:07:27 2010 @@ -29,8 +29,10 @@ org.apache.activemq.transport.stomp.SamplePojo + + - + Modified: activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/transport/stomp/stomp-auth-broker.xml URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/transport/stomp/stomp-auth-broker.xml?rev=965820&r1=965819&r2=965820&view=diff ============================================================================== --- activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/transport/stomp/stomp-auth-broker.xml (original) +++ activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/transport/stomp/stomp-auth-broker.xml Tue Jul 20 12:07:27 2010 @@ -31,7 +31,9 @@ org.apache.activemq.transport.stomp.SamplePojo - + + +