The plugins= attribute is broken in 5.4.1:
https://issues.apache.org/activemq/browse/AMQ-2939 

That syntax works in 5.3.2.

Unfortunately, I have never tried the <plugins> syntax, so I'm not much help 
there.
:(

--Allen

-----Original Message-----
From: Mentor11 [mailto:dhagen...@aol.com] 
Sent: Wednesday, October 06, 2010 4:05 PM
To: users@activemq.apache.org
Subject: Newbie Question about Plugins


Hi everyone,
I want to develop a simple plugin for ActiveMQ, but following the examples on 
http://activemq.apache.org/developing-plugins.html
doesn't get me anywhere.
My Plugin doesn't do anything it's just a MyPlugin.class implementing 
BrokerPlugin and a MyBroker.class extending BrokerFilter with a call to 
super(broker). So the following Questions are more about getting ActiveMQ to 
include MyPlugin rather than anything complicated.
So my first Question is where do I have to put the classes so that activemq 
finds them on startup?

My Second Question is where can I add the beans pointing to my Plugin?

I tried adding plugins="#MyPlugin" in the broker tab but I get following error

Java Runtime: Sun Microsystems Inc. 1.6.0_20 C:\Programme\Java\jdk1.6.0_20\jre
  Heap sizes: current=15872k  free=12056k  max=506816k
    JVM args: -Dcom.sun.management.jmxremote -Xmx512M 
-Dorg.apache.activemq.UseDedicatedTaskRunner=true
-Djava.util.logging.config.file=logging.properties
-Dactivemq.classpath=C:\Programme\apache-activemq-5.4.1\bin\../conf;C:\Programme\apache-activemq-5.4.1\bin\../conf;
-Dactivemq.home=C:\Programme\apache-activemq-5.4.1\bin\..
-Dactivemq.base=C:\Programme\apache-activemq-5.4.1\bin\..
ACTIVEMQ_HOME: C:\Programme\apache-activemq-5.4.1\bin\..
ACTIVEMQ_BASE: C:\Programme\apache-activemq-5.4.1\bin\..
Loading message broker from: xbean:conf/activemq.xml
ERROR: java.lang.RuntimeException: Failed to execute start task. Reason:
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line
34 in XML document from file
[C:\Programme\apache-activemq-5.4.1\conf\activemq.xml] is invalid; nested 
exception is org.xml.sax.SAXParseException: cvc-complex-type.3.2.2:
Attribute 'plugins' is not allowed to appear in element 'broker'.
java.lang.RuntimeException: Failed to execute start task. Reason:
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line
34 in XML document from file
[C:\Programme\apache-activemq-5.4.1\conf\activemq.xml] is invalid; nested 
exception is org.xml.sax.SAXParseException: cvc-complex-type.3.2.2:
Attribute 'plugins' is not allowed to appear in element 'broker'.

So plugins is not an allowed atrribute despite what's written on the link 
posted above?!
I also tried adding my plugin with plugins tag and I got this Error Invalid 
content was found starting with element 'plugin'. One of 
'{WC[##other:"http://activemq.apache.org/schema/core"]}' is expected.

These Error are not that the class files can't be found but syntax errors right?
So are the examples of the Website wrong?
--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Newbie-Question-about-Plugins-tp2965936p2965936.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to