Hello Christian,

that was an interesting read. Thank you.

I tried to "incorporate" your simpleController example into my activemq.xml.

It works fine outside of the <plugins> definition, but when I do something
like this I get an IllegalArgumentException: Cannot locate
BeanDefinitionDecorator for element [simple].

<plugins>
    <bean xmlns="http://www.springframework.org/schema/beans";
        id="myBrokerPlugin" class="myPackage.MyBrokerPlugin">

        <simple xmlns="http://christianposta.com/schema/core";
myProperty="testMe">
            <simpleController>
                <simpleController controllerName="testMeToo" />
            </simpleController>

            <controllers>
                <complexController pattern="testPattern" />
                <complexController pattern="testPattern2" />
                <complexController pattern="testPattern3" />
            </controllers>
        </simple>

    <bean/>
</plugins>


How can I use this custom bean to configure my BrokerPlugin?

cheers,
F.





On Wed, Sep 25, 2013 at 2:32 PM, Christian Posta
<christian.po...@gmail.com>wrote:

> not sure if this will help, but i did write a blog about how ActiveMQ uses
> xbeans to generate its XSD:
>
> http://www.christianposta.com/blog/?p=111
>
>
> On Wed, Sep 25, 2013 at 3:26 AM, Frizz <frizzthe...@googlemail.com> wrote:
>
> > Hello,
> >
> > I create my own BrokerPlugin and configured it in activemq.xml like this:
> >
> > <broker xmlns="http://activemq.apache.org/schema/core";
> > brokerName="localhost" dataDirectory="${activemq.data}">
> >     <plugins>
> >         <bean xmlns="http://www.springframework.org/schema/beans";
> > id="myBrokerPlugin" class="myPackage.MyBrokerPlugin">
> >     </plugins>
> > ...
> >
> >
> > That works :-)
> >
> >
> > Now I want to make it more configurable. The idea is to use
> DestinationMaps
> > like in existing standard plugins (e.g. in AuthorizationPlugin).
> >
> > I created two new classes, QueueFilterMap and QueueFilterEntry, that use
> > XBeans.
> >
> > So my activemq.xml would look like this:
> >
> > <plugins>
> >     <bean xmlns="http://www.springframework.org/schema/beans";
> > id="myBrokerPlugin" class="myPackage.MyBrokerPlugin">
> >         <map>
> >             <queueFilterMap>
> >                 <queueFilterEntries>
> >                     <queueFilterEntry queue="USERS.>"/>
> >                 </queueFilterEntries>
> >             </queueFilterMap>
> >         </map>
> >     <bean/>
> > </plugins>
> >
> > Of course this does not validate. So my question is: How can I use XBeans
> > in activemq.xml?
> >
> > cheers,
> > F.
> >
>
>
>
> --
> *Christian Posta*
> http://www.christianposta.com/blog
> twitter: @christianposta
>

Reply via email to