Return-Path: X-Original-To: apmail-activemq-commits-archive@www.apache.org Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DA447CB98 for ; Wed, 12 Mar 2014 18:47:23 +0000 (UTC) Received: (qmail 72621 invoked by uid 500); 12 Mar 2014 18:47:05 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 72465 invoked by uid 500); 12 Mar 2014 18:47:03 -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 71771 invoked by uid 99); 12 Mar 2014 18:46:57 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Mar 2014 18:46:57 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id A55FF942720; Wed, 12 Mar 2014 18:46:57 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: hadrian@apache.org To: commits@activemq.apache.org Date: Wed, 12 Mar 2014 18:46:59 -0000 Message-Id: In-Reply-To: <3d4ff466928b40fb87c1367674ec91ea@git.apache.org> References: <3d4ff466928b40fb87c1367674ec91ea@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [03/17] git commit: https://issues.apache.org/jira/browse/AMQ-4905 - resolve by embedding spring xsd https://issues.apache.org/jira/browse/AMQ-4905 - resolve by embedding spring xsd Project: http://git-wip-us.apache.org/repos/asf/activemq/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/3444c89f Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/3444c89f Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/3444c89f Branch: refs/heads/activemq-5.9 Commit: 3444c89fd8cddfde9f08cb1e101c65f6824b3f27 Parents: 77b4d70 Author: gtully Authored: Wed Nov 27 16:04:14 2013 +0000 Committer: Hadrian Zbarcea Committed: Wed Mar 12 13:10:50 2014 -0400 ---------------------------------------------------------------------- activemq-runtime-config/pom.xml | 21 ++++++++++++++++++++ .../plugin/RuntimeConfigurationBroker.java | 17 ++-------------- 2 files changed, 23 insertions(+), 15 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/activemq/blob/3444c89f/activemq-runtime-config/pom.xml ---------------------------------------------------------------------- diff --git a/activemq-runtime-config/pom.xml b/activemq-runtime-config/pom.xml index 6e3ea16..a49b3a2 100755 --- a/activemq-runtime-config/pom.xml +++ b/activemq-runtime-config/pom.xml @@ -115,6 +115,7 @@ org.apache.activemq activemq-spring + ${project.version} jar true activemq.xsd @@ -123,6 +124,26 @@ src/main/resources + + unpack-spring-xsd + generate-sources + + unpack + + + + + org.springframework + spring-beans + ${spring-version} + jar + true + org/springframework/beans/factory/xml/spring-beans-3.0.xsd + + + src/main/resources + + http://git-wip-us.apache.org/repos/asf/activemq/blob/3444c89f/activemq-runtime-config/src/main/java/org/apache/activemq/plugin/RuntimeConfigurationBroker.java ---------------------------------------------------------------------- diff --git a/activemq-runtime-config/src/main/java/org/apache/activemq/plugin/RuntimeConfigurationBroker.java b/activemq-runtime-config/src/main/java/org/apache/activemq/plugin/RuntimeConfigurationBroker.java index 82a5ee3..1879b1c 100644 --- a/activemq-runtime-config/src/main/java/org/apache/activemq/plugin/RuntimeConfigurationBroker.java +++ b/activemq-runtime-config/src/main/java/org/apache/activemq/plugin/RuntimeConfigurationBroker.java @@ -809,7 +809,7 @@ public class RuntimeConfigurationBroker extends BrokerFilter { Object springBean = getClass().getClassLoader().loadClass(value).newInstance(); if (springBean instanceof FactoryBean) { // can't access the factory or created properties from spring context so we got to recreate - initialProperties.putAll((Properties) FactoryBean.class.getMethod("getObject", null).invoke(springBean)); + initialProperties.putAll((Properties) FactoryBean.class.getMethod("getObject", (Class[]) null).invoke(springBean)); } } catch (Throwable e) { LOG.debug("unexpected exception processing properties bean class: " + propertiesClazzes, e); @@ -856,20 +856,7 @@ public class RuntimeConfigurationBroker extends BrokerFilter { ArrayList schemas = new ArrayList(); schemas.add(new StreamSource(getClass().getResource("/activemq.xsd").toExternalForm())); - - // avoid going to the net to pull down the spring schema, - // REVISIT may need to be smarter in osgi - final PluggableSchemaResolver springResolver = - new PluggableSchemaResolver(getClass().getClassLoader()); - final InputSource beanInputSource = - springResolver.resolveEntity( - "http://www.springframework.org/schema/beans", - "http://www.springframework.org/schema/beans/spring-beans.xsd"); - if (beanInputSource != null) { - schemas.add(new StreamSource(beanInputSource.getByteStream())); - } else { - schemas.add(new StreamSource("http://www.springframework.org/schema/beans/spring-beans.xsd")); - } + schemas.add(new StreamSource(getClass().getResource("/org/springframework/beans/factory/xml/spring-beans-3.0.xsd").toExternalForm())); schema = schemaFactory.newSchema(schemas.toArray(new Source[]{})); } return schema;