You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by tanshul22 <ta...@hotmail.com> on 2008/04/11 20:41:24 UTC

custom plugin

how do i configure the activemq.xml file to have my own custom plugin which
has its own jar in the lib directory.

thanks
-- 
View this message in context: http://www.nabble.com/custom-plugin-tp16628198s2354p16628198.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: custom plugin

Posted by tanshul22 <ta...@hotmail.com>.
Thanks

It works.


Dejan Bosanac wrote:
> 
> Hi,
> 
> if you want to avoid xbean, you can configure it in the <broker> tag, like
> this
> 
> <broker xmlns="http://activemq.org/config/1.0" plugins="#myPlugin">
> </broker>
> 
> <bean id="myPlugin" class="...">
> </bean>
> 
> Cheers
> -- 
> Dejan Bosanac
> www.scriptinginjava.net
> 
> On Tue, Apr 15, 2008 at 2:19 AM, Fred D <fr...@ttmsolutions.com>
> wrote:
> 
>>
>> This depends on what you mean by a "plugin".
>>
>> If you have extended the activemq code to add your own functionality and
>> there are some additional configuration parameters you should be able to
>> extend the xml file with your parameters. Activemq uses xbean, so you
>> should
>> add these to the xsd and point to your custom file.
>>
>>
>> tanshul22 wrote:
>> >
>> > how do i configure the activemq.xml file to have my own custom plugin
>> > which has its own jar in the lib directory.
>> >
>> > thanks
>> >
>>
>>
>> -----
>> Goto www.ttmsolutions.com for a free ActiveMQ user guide
>> --
>> View this message in context:
>> http://www.nabble.com/custom-plugin-tp16628198s2354p16692673.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -----
> Dejan Bosanac
> www.scriptinginjava.net
> 

-- 
View this message in context: http://www.nabble.com/custom-plugin-tp16628198s2354p16735765.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: custom plugin

Posted by Gary Tully <ga...@gmail.com>.
btw: the ordering constraint in the xml schema will be gone in 5.6
https://issues.apache.org/jira/browse/AMQ-3570

On 18 April 2012 06:10, LCamel <lc...@gmail.com> wrote:
> I found there was an related issue back in 2010 about schema validation:
> https://issues.apache.org/jira/browse/AMQ-2939
>
> The comment by Gary Tully can relieve the problem:
>    ./bin/activemq xbean:conf/activemq.xml?validate=false
>
> Is there a better way to solve it ? Thanks.
>
> Luoh Ren-Shan
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/custom-plugin-tp2358111p4566722.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



-- 
http://fusesource.com
http://blog.garytully.com

Re: custom plugin

Posted by LCamel <lc...@gmail.com>.
I found there was an related issue back in 2010 about schema validation:
https://issues.apache.org/jira/browse/AMQ-2939

The comment by Gary Tully can relieve the problem:
    ./bin/activemq xbean:conf/activemq.xml?validate=false

Is there a better way to solve it ? Thanks.

Luoh Ren-Shan

--
View this message in context: http://activemq.2283324.n4.nabble.com/custom-plugin-tp2358111p4566722.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: custom plugin

Posted by LCamel <lc...@gmail.com>.
Hi,

I'm following the instructions in
http://activemq.apache.org/interceptors.html
to write a very minimal plugin. My plugin class can be successfully loaded
by

    <bean id="myPlugin" class="org.myorg.MyPlugin"/>


However, if I tell the broker to load it as a plugin

<broker xmlns="http://activemq.apache.org/schema/core"
brokerName="localhost" dataDirectory="${activemq.base}/data"
destroyApplicationContextOnStop="true" plugins="#myPlugin">

, then ActiveMQ will refuse to start. The data/activemq.log has only one
line:

2012-04-18 09:59:11,999 | INFO  | Refreshing
org.apache.activemq.xbean.XBeanBrokerFactory$1@4178460d: startup date [Wed
Apr 18 09:59:11 CST 2012]; root of context hierarchy |
org.apache.activemq.xbean.XBeanBrokerFactory$1 | main

, and the java process quits.

I have my minimal plugin attached in the mail. I'm running ActiveMQ 5.5.0 on
Mac OS X 10.7.3.

Thank you.

Luoh Ren-Shan

http://activemq.2283324.n4.nabble.com/file/n4566496/foo.tgz foo.tgz 

--
View this message in context: http://activemq.2283324.n4.nabble.com/custom-plugin-tp2358111p4566496.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: custom plugin

Posted by Dejan Bosanac <de...@nighttale.net>.
Hi,

if you want to avoid xbean, you can configure it in the <broker> tag, like
this

<broker xmlns="http://activemq.org/config/1.0" plugins="#myPlugin">
</broker>

<bean id="myPlugin" class="...">
</bean>

Cheers
-- 
Dejan Bosanac
www.scriptinginjava.net

On Tue, Apr 15, 2008 at 2:19 AM, Fred D <fr...@ttmsolutions.com>
wrote:

>
> This depends on what you mean by a "plugin".
>
> If you have extended the activemq code to add your own functionality and
> there are some additional configuration parameters you should be able to
> extend the xml file with your parameters. Activemq uses xbean, so you
> should
> add these to the xsd and point to your custom file.
>
>
> tanshul22 wrote:
> >
> > how do i configure the activemq.xml file to have my own custom plugin
> > which has its own jar in the lib directory.
> >
> > thanks
> >
>
>
> -----
> Goto www.ttmsolutions.com for a free ActiveMQ user guide
> --
> View this message in context:
> http://www.nabble.com/custom-plugin-tp16628198s2354p16692673.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>

Re: custom plugin

Posted by Fred D <fr...@ttmsolutions.com>.
This depends on what you mean by a "plugin".

If you have extended the activemq code to add your own functionality and
there are some additional configuration parameters you should be able to
extend the xml file with your parameters. Activemq uses xbean, so you should
add these to the xsd and point to your custom file.


tanshul22 wrote:
> 
> how do i configure the activemq.xml file to have my own custom plugin
> which has its own jar in the lib directory.
> 
> thanks
> 


-----
Goto www.ttmsolutions.com for a free ActiveMQ user guide 
-- 
View this message in context: http://www.nabble.com/custom-plugin-tp16628198s2354p16692673.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.