diff --git a/activemq-runtime-config/pom.xml b/activemq-runtime-config/pom.xml index eead4ada87..d66656fc6d 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 + + 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 ce265347c4..90dba00f5f 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 @@ -804,7 +804,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); @@ -851,20 +851,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;