activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Allen Reese <are...@yahoo-inc.com>
Subject configuring plugins with activemq 5.4.1
Date Wed, 22 Sep 2010 19:48:02 GMT
With Activemq 5.3.2, I had this in my activemq.xml:
 
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:amq="http://activemq.apache.org/schema/core" 
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="
    http://activemq.apache.org/schema/core
        http://activemq.apache.org/schema/core/activemq-core-5.4.1.xsd
    http://camel.apache.org/schema/spring
    http://camel.apache.org/schema/spring/camel-spring.xsd
    http://www.springframework.org/schema/beans
	http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
	">

<bean id="myPlugin" class="com.yahoo.MyPlugin">
	<property name="disabled">
		<value>false</value>
	</property>
</bean>

<broker xmlns="http://activemq.apache.org/schema/core"
	brokerName="broker1" dataDirectory="${activemq.base}/data" plugins="#myPlugin">
	<transportConnectors>
		<transportConnector name="openwire" uri="tcp://0.0.0.0:61616" />
	</transportConnectors>
</broker>
</beans>

However, when I upgrade to 5.4.1, this no longer works as plugins is no longer supported as
an attribute of the broker element.

I'm not really certain how to wire in a custom plugin any more, can anyone provide some information
on how to do this with the 5.4.1 schema?

Here was my first shot at it, but I know I'm missing how to tie the bean to the namespace.

<beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:amq="http://activemq.apache.org/schema/core" 
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="
    http://activemq.apache.org/schema/core
        http://activemq.apache.org/schema/core/activemq-core-5.4.1.xsd
    http://camel.apache.org/schema/spring
    http://camel.apache.org/schema/spring/camel-spring.xsd
    http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"
      >

<bean id="myPlugin" class="com.yahoo.MyPlugin">
	<property name="disabled">
		<value>false</value>
	</property>
</bean>

	<broker xmlns="http://activemq.apache.org/schema/core"
		brokerName="broker1" dataDirectory="${activemq.base}/data">
	<plugins><myPlugin xmlns="http://yahoo.com/schema/java"/></plugins>
		<transportConnectors>
			<transportConnector name="stomp" uri="tcp://0.0.0.0:61616" />
		</transportConnectors>
	</broker>
</beans>

Thanks.

--Allen Reese
Mime
View raw message