There's been various gremlins all over the place in the support of pure spring XML handling. i.e. rather than using XBean to parse the XML, using a pure Spring Xml Application Context to parse ActiveMQ inside any Spring XML.
There's been quite a few JIRAs around this area... http://issues.apache.org/activemq/browse/AMQ-929 http://issues.apache.org/activemq/browse/AMQ-1016 http://issues.apache.org/activemq/browse/AMQ-1014 http://issues.apache.org/activemq/browse/AMQ-1002 http://issues.apache.org/activemq/browse/AMQ-1259 http://issues.apache.org/activemq/browse/AMQ-1276 Certainly the most lively has been this one :) https://issues.apache.org/activemq/browse/AMQ-1016 There were numerous issues. A) Bad XSDs caused by a bug in XBean which is now fixed in 3.x of XBean B) Lousy URLs for the XSDs. We've now got all the XSDs available at simpler URLs: releases of XSDs appear here... http://activemq.apache.org/schema/ such as http://activemq.apache.org/schema/activemq-core-4.1.1.xsd and snapshot schemas appear here http://activemq.apache.org/snapshot-schema/ such as http://activemq.apache.org/snapshot-schema/activemq-core-5.0-SNAPSHOT.xsd C) Spring was often unable to find the embedded XSD without some remote URL for the schema location. So the fix for anyone having spring problems is just to use the new correct XSD. For example... <beans xmlns="http://www.springframework.org/schema/beans" xmlns:amq="http://activemq.org/config/1.0" 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-2.0.xsd http://activemq.org/config/1.0 http://activemq.apache.org/snapshot-schema/activemq-core-5.0-SNAPSHOT.xsd"> (Note that we need a 4.1.2 release with the latest XBean to get a nice fixed XSD, see http://issues.apache.org/activemq/browse/AMQ-1276) I've updated the XML reference with links to the various XSDs etc http://cwiki.apache.org/ACTIVEMQ/xml-reference.html A few issues have come up in this rather long and complex set of JIRAs. (i) Should we encourage folks to put the exact version of ActiveMQ they are using in their configuration files? Or should we encourage them to use a non-versioned XSD that at runtime will be resolved against the activemq-core.jar? See http://cwiki.apache.org/ACTIVEMQ/xml-reference.html for background. Am thinking we default to the non-versioned one; then if folks really wanna use a versioned one, they just add the version in themselves. (ii) should we update the current namespace URI in 5.0 of ActiveMQ to reflect both good Spring 2 practice on naming URIs and XSDs, together with reflecting that we are actually at Apache now :) The current URI is http://activemq.org/config/1.0 it might be better to use http://activemq.apache.org/schema/activemq-core then it'd look more natural in spring docs? <beans xmlns="http://www.springframework.org/schema/beans" xmlns:amq="http://activemq.org/config/1.0" 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-2.0.xsd http://activemq.apache.org/schema/activemq-core http://activemq.apache.org/schema/activemq-core.xsd"> or http://activemq.apache.org/schema/activemq-core http://activemq.apache.org/schema/activemq-core-5.0.xsd"> if folks wanna put a version number in? This would mean breaking backwards compatibility with XML configuration files; but given its never really worked inside Spring 2.0 properly; and with 5.0 having some different XML defaults anyway - maybe its not such a big issue? (iii) Should we consider some kinda alias; such as http://activemq.apache.org/schema/activemq-core-5.x.xsd meaning 'use the latest version of 5.x you can find'. (Assuming we can figure out how to that :) Then if we release 5.1, 5.2, with minor XSD changes, folks get them for free without changing config files. (Admitedly they'd get that for free by just using no version in the URL). Thoughts? -- James ------- http://macstrac.blogspot.com/
