Register ActiveMQ Spring namespace with eclipse 3.6
In a earlier post I described how to setup the eclipse XML editor to validate a Spring context file containing the AMQ namespace.
Looks like with eclipse 3.6 that does not work anymore, I was not able to actually use a JAR file as location like I used to set this up with eclipse 3.4.
So I’m directly associating the AMQ namespace with the XML schema available from the AMQ project.
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jms="http://www.springframework.org/schema/jms"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:amq="http://activemq.apache.org/schema/core"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/jms http://www.springframework.org/schema/jms/spring-jms.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
p:locations="classpath:jms.properties">
</bean>
<amq:broker useJmx="true" persistent="false">
<amq:transportConnectors>
<amq:transportConnector uri="${amq.brokerURL}" />
</amq:transportConnectors>
</amq:broker>
</beans>
Go to the eclipse XML catalog editor and add a custom entry:
Location: http://activemq.apache.org/schema/core/activemq-core-5.4.1.xsd Key type: Schema location Key: http://activemq.apache.org/schema/core/activemq-core.xsd

1 Comment
jock - 2011/09/06
Yet another great article! Definitely looking forward to more