You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Allen Reese (JIRA)" <ji...@apache.org> on 2010/09/23 18:36:40 UTC

[jira] Created: (AMQ-2939) plugins attribute is missing from brokers element in XSD.

plugins attribute is missing from brokers element in XSD.
---------------------------------------------------------

                 Key: AMQ-2939
                 URL: https://issues.apache.org/activemq/browse/AMQ-2939
             Project: ActiveMQ
          Issue Type: Bug
          Components: Broker
    Affects Versions: 5.4.1, 5.4.0
         Environment: RHEL 4u8
JDK 1.6.0.23
            Reporter: Allen Reese


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>

Relevant email thread.

-----Original Message-----
From: chubrilo@gmail.com [mailto:chubrilo@gmail.com] On Behalf Of Dejan Bosanac
Sent: Thursday, September 23, 2010 4:19 AM
To: users@activemq.apache.org
Subject: Re: configuring plugins with activemq 5.4.1

Hi Allen,

can you raise an issue for this, as it is an obvious regression? It's probably due the fact that in 5.4 we're back to autogenerating schema.

Cheers
--
Dejan Bosanac - http://twitter.com/dejanb

Open Source Integration - http://fusesource.com/ ActiveMQ in Action - http://www.manning.com/snyder/ Blog - http://www.nighttale.net



On Wed, Sep 22, 2010 at 10:58 PM, Allen Reese <ar...@yahoo-inc.com> wrote:
> The problem is plugins as an attribute of broker seems to be removed in the 5.4.1 xsd.
>
> I want to configure the plugin once outside of the brokers, the reason is, I use an <import resource="brokers.xml">, and want to allow other people to reuse the plugin configuration without having to have it as part of their broker definition.
>
> I guess I'll keep playing around as I have some other ideas of how to do this, but I'm still confused if I setup my own xsd with an element for the plugin, how do I tie that to the plugin bean?
>
> --Allen
>
>
> -----Original Message-----
> From: Stan Lewis [mailto:slewis@fusesource.com]
> Sent: Wednesday, September 22, 2010 3:10 PM
> To: users@activemq.apache.org
> Subject: Re: configuring plugins with activemq 5.4.1
>
> Should be able to do something like:
>
> <plugins>
>   <bean xmlns="http://www.springframework.org/schema/beans"
> id="myPlugin" class="com.yahoo.MyPlugin">
>        <property name="disabled">
>                <value>false</value>
>        </property>
>   </bean>
> </plugins>
>
> for this, there's some other examples here:
>
> http://activemq.apache.org/developing-plugins.html#DevelopingPlugins-C
> onfiguringpluginswithoutcustomXML
>
> On Wed, Sep 22, 2010 at 3:48 PM, Allen Reese <ar...@yahoo-inc.com> wrote:
>> 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
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQ-2939) Disable Spring 3 schema validation

Posted by "Gary Tully (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-2939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=62897#action_62897 ] 

Gary Tully commented on AMQ-2939:
---------------------------------

For the ManagementContext, in r1028278 I have made the schema use a string value for the port attributes such that they can use property values even with validation.
Validation should still be optional though.

> Disable Spring 3 schema validation
> ----------------------------------
>
>                 Key: AMQ-2939
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2939
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.4.0, 5.4.1
>         Environment: RHEL 4u8
> JDK 1.6.0.23
>            Reporter: Allen Reese
>         Attachments: amq-2939.patch
>
>
> 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>
> Relevant email thread.
> -----Original Message-----
> From: chubrilo@gmail.com [mailto:chubrilo@gmail.com] On Behalf Of Dejan Bosanac
> Sent: Thursday, September 23, 2010 4:19 AM
> To: users@activemq.apache.org
> Subject: Re: configuring plugins with activemq 5.4.1
> Hi Allen,
> can you raise an issue for this, as it is an obvious regression? It's probably due the fact that in 5.4 we're back to autogenerating schema.
> Cheers
> --
> Dejan Bosanac - http://twitter.com/dejanb
> Open Source Integration - http://fusesource.com/ ActiveMQ in Action - http://www.manning.com/snyder/ Blog - http://www.nighttale.net
> On Wed, Sep 22, 2010 at 10:58 PM, Allen Reese <ar...@yahoo-inc.com> wrote:
> > The problem is plugins as an attribute of broker seems to be removed in the 5.4.1 xsd.
> >
> > I want to configure the plugin once outside of the brokers, the reason is, I use an <import resource="brokers.xml">, and want to allow other people to reuse the plugin configuration without having to have it as part of their broker definition.
> >
> > I guess I'll keep playing around as I have some other ideas of how to do this, but I'm still confused if I setup my own xsd with an element for the plugin, how do I tie that to the plugin bean?
> >
> > --Allen
> >
> >
> > -----Original Message-----
> > From: Stan Lewis [mailto:slewis@fusesource.com]
> > Sent: Wednesday, September 22, 2010 3:10 PM
> > To: users@activemq.apache.org
> > Subject: Re: configuring plugins with activemq 5.4.1
> >
> > Should be able to do something like:
> >
> > <plugins>
> >   <bean xmlns="http://www.springframework.org/schema/beans"
> > id="myPlugin" class="com.yahoo.MyPlugin">
> >        <property name="disabled">
> >                <value>false</value>
> >        </property>
> >   </bean>
> > </plugins>
> >
> > for this, there's some other examples here:
> >
> > http://activemq.apache.org/developing-plugins.html#DevelopingPlugins-C
> > onfiguringpluginswithoutcustomXML
> >
> > On Wed, Sep 22, 2010 at 3:48 PM, Allen Reese <ar...@yahoo-inc.com> wrote:
> >> 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
> >

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQ-2939) Disable Spring 3 schema validation

Posted by "Gary Tully (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-2939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=63197#action_63197 ] 

Gary Tully commented on AMQ-2939:
---------------------------------

You probably need to introduce a subclass of the Xbean ResourceXmlApplicationContext to disable the validation.

The entry point is: org.apache.activemq.xbean.XBeanBrokerFactory#createApplicationContext in activemq-core

> Disable Spring 3 schema validation
> ----------------------------------
>
>                 Key: AMQ-2939
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2939
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.4.0, 5.4.1
>         Environment: RHEL 4u8
> JDK 1.6.0.23
>            Reporter: Allen Reese
>         Attachments: amq-2939.patch
>
>
> 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>
> Relevant email thread.
> -----Original Message-----
> From: chubrilo@gmail.com [mailto:chubrilo@gmail.com] On Behalf Of Dejan Bosanac
> Sent: Thursday, September 23, 2010 4:19 AM
> To: users@activemq.apache.org
> Subject: Re: configuring plugins with activemq 5.4.1
> Hi Allen,
> can you raise an issue for this, as it is an obvious regression? It's probably due the fact that in 5.4 we're back to autogenerating schema.
> Cheers
> --
> Dejan Bosanac - http://twitter.com/dejanb
> Open Source Integration - http://fusesource.com/ ActiveMQ in Action - http://www.manning.com/snyder/ Blog - http://www.nighttale.net
> On Wed, Sep 22, 2010 at 10:58 PM, Allen Reese <ar...@yahoo-inc.com> wrote:
> > The problem is plugins as an attribute of broker seems to be removed in the 5.4.1 xsd.
> >
> > I want to configure the plugin once outside of the brokers, the reason is, I use an <import resource="brokers.xml">, and want to allow other people to reuse the plugin configuration without having to have it as part of their broker definition.
> >
> > I guess I'll keep playing around as I have some other ideas of how to do this, but I'm still confused if I setup my own xsd with an element for the plugin, how do I tie that to the plugin bean?
> >
> > --Allen
> >
> >
> > -----Original Message-----
> > From: Stan Lewis [mailto:slewis@fusesource.com]
> > Sent: Wednesday, September 22, 2010 3:10 PM
> > To: users@activemq.apache.org
> > Subject: Re: configuring plugins with activemq 5.4.1
> >
> > Should be able to do something like:
> >
> > <plugins>
> >   <bean xmlns="http://www.springframework.org/schema/beans"
> > id="myPlugin" class="com.yahoo.MyPlugin">
> >        <property name="disabled">
> >                <value>false</value>
> >        </property>
> >   </bean>
> > </plugins>
> >
> > for this, there's some other examples here:
> >
> > http://activemq.apache.org/developing-plugins.html#DevelopingPlugins-C
> > onfiguringpluginswithoutcustomXML
> >
> > On Wed, Sep 22, 2010 at 3:48 PM, Allen Reese <ar...@yahoo-inc.com> wrote:
> >> 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
> >

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AMQ-2939) Disable Spring 3 schema validation

Posted by "Dejan Bosanac (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-2939?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dejan Bosanac updated AMQ-2939:
-------------------------------

    Summary: Disable Spring 3 schema validation  (was: plugins attribute is missing from brokers element in XSD.)

The root cause of all these problems is schema validation introduced in Spring 3. The solution would be to make this validation at least optional. I had a quick look a while ago, but didn't find a way to do it, so it requires additional research.

> Disable Spring 3 schema validation
> ----------------------------------
>
>                 Key: AMQ-2939
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2939
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.4.0, 5.4.1
>         Environment: RHEL 4u8
> JDK 1.6.0.23
>            Reporter: Allen Reese
>         Attachments: amq-2939.patch
>
>
> 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>
> Relevant email thread.
> -----Original Message-----
> From: chubrilo@gmail.com [mailto:chubrilo@gmail.com] On Behalf Of Dejan Bosanac
> Sent: Thursday, September 23, 2010 4:19 AM
> To: users@activemq.apache.org
> Subject: Re: configuring plugins with activemq 5.4.1
> Hi Allen,
> can you raise an issue for this, as it is an obvious regression? It's probably due the fact that in 5.4 we're back to autogenerating schema.
> Cheers
> --
> Dejan Bosanac - http://twitter.com/dejanb
> Open Source Integration - http://fusesource.com/ ActiveMQ in Action - http://www.manning.com/snyder/ Blog - http://www.nighttale.net
> On Wed, Sep 22, 2010 at 10:58 PM, Allen Reese <ar...@yahoo-inc.com> wrote:
> > The problem is plugins as an attribute of broker seems to be removed in the 5.4.1 xsd.
> >
> > I want to configure the plugin once outside of the brokers, the reason is, I use an <import resource="brokers.xml">, and want to allow other people to reuse the plugin configuration without having to have it as part of their broker definition.
> >
> > I guess I'll keep playing around as I have some other ideas of how to do this, but I'm still confused if I setup my own xsd with an element for the plugin, how do I tie that to the plugin bean?
> >
> > --Allen
> >
> >
> > -----Original Message-----
> > From: Stan Lewis [mailto:slewis@fusesource.com]
> > Sent: Wednesday, September 22, 2010 3:10 PM
> > To: users@activemq.apache.org
> > Subject: Re: configuring plugins with activemq 5.4.1
> >
> > Should be able to do something like:
> >
> > <plugins>
> >   <bean xmlns="http://www.springframework.org/schema/beans"
> > id="myPlugin" class="com.yahoo.MyPlugin">
> >        <property name="disabled">
> >                <value>false</value>
> >        </property>
> >   </bean>
> > </plugins>
> >
> > for this, there's some other examples here:
> >
> > http://activemq.apache.org/developing-plugins.html#DevelopingPlugins-C
> > onfiguringpluginswithoutcustomXML
> >
> > On Wed, Sep 22, 2010 at 3:48 PM, Allen Reese <ar...@yahoo-inc.com> wrote:
> >> 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
> >

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (AMQ-2939) Disable Spring 3 schema validation

Posted by "Gary Tully (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-2939?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Tully resolved AMQ-2939.
-----------------------------

       Resolution: Fixed
    Fix Version/s: 5.5.0
         Assignee: Gary Tully

r1034032

add validate query parameter support to the xbean broker factory so that schema validation can be disabled.{code}./bin/activemq xbean:conf/activemq.xml?validate=false{code}


> Disable Spring 3 schema validation
> ----------------------------------
>
>                 Key: AMQ-2939
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2939
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.4.0, 5.4.1
>         Environment: RHEL 4u8
> JDK 1.6.0.23
>            Reporter: Allen Reese
>            Assignee: Gary Tully
>             Fix For: 5.5.0
>
>         Attachments: amq-2939.patch
>
>
> 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>
> Relevant email thread.
> -----Original Message-----
> From: chubrilo@gmail.com [mailto:chubrilo@gmail.com] On Behalf Of Dejan Bosanac
> Sent: Thursday, September 23, 2010 4:19 AM
> To: users@activemq.apache.org
> Subject: Re: configuring plugins with activemq 5.4.1
> Hi Allen,
> can you raise an issue for this, as it is an obvious regression? It's probably due the fact that in 5.4 we're back to autogenerating schema.
> Cheers
> --
> Dejan Bosanac - http://twitter.com/dejanb
> Open Source Integration - http://fusesource.com/ ActiveMQ in Action - http://www.manning.com/snyder/ Blog - http://www.nighttale.net
> On Wed, Sep 22, 2010 at 10:58 PM, Allen Reese <ar...@yahoo-inc.com> wrote:
> > The problem is plugins as an attribute of broker seems to be removed in the 5.4.1 xsd.
> >
> > I want to configure the plugin once outside of the brokers, the reason is, I use an <import resource="brokers.xml">, and want to allow other people to reuse the plugin configuration without having to have it as part of their broker definition.
> >
> > I guess I'll keep playing around as I have some other ideas of how to do this, but I'm still confused if I setup my own xsd with an element for the plugin, how do I tie that to the plugin bean?
> >
> > --Allen
> >
> >
> > -----Original Message-----
> > From: Stan Lewis [mailto:slewis@fusesource.com]
> > Sent: Wednesday, September 22, 2010 3:10 PM
> > To: users@activemq.apache.org
> > Subject: Re: configuring plugins with activemq 5.4.1
> >
> > Should be able to do something like:
> >
> > <plugins>
> >   <bean xmlns="http://www.springframework.org/schema/beans"
> > id="myPlugin" class="com.yahoo.MyPlugin">
> >        <property name="disabled">
> >                <value>false</value>
> >        </property>
> >   </bean>
> > </plugins>
> >
> > for this, there's some other examples here:
> >
> > http://activemq.apache.org/developing-plugins.html#DevelopingPlugins-C
> > onfiguringpluginswithoutcustomXML
> >
> > On Wed, Sep 22, 2010 at 3:48 PM, Allen Reese <ar...@yahoo-inc.com> wrote:
> >> 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
> >

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQ-2939) Disable Spring 3 schema validation

Posted by "Mahmoud Ibrahim (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-2939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=63409#action_63409 ] 

Mahmoud Ibrahim commented on AMQ-2939:
--------------------------------------

@Gary Tully : 
i was using apache-activemq-5.3.2 with configured plugins and everything is working fine. i upgraded to apache-activemq-5.4.1 and i faced the following exception :
org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute 'plugins' is not allowed to appear in element 'broker'.

i am using embedded broker :
 BrokerService broker = BrokerFactory.createBroker("xbean:activemq.xml");

i don't know how to configure validate = false for spring 3.0.
i see it will fixed in 5.5.0 , but i don't have time waiting it. is there any workaround for it ??

> Disable Spring 3 schema validation
> ----------------------------------
>
>                 Key: AMQ-2939
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2939
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.4.0, 5.4.1
>         Environment: RHEL 4u8
> JDK 1.6.0.23
>            Reporter: Allen Reese
>            Assignee: Gary Tully
>             Fix For: 5.5.0
>
>         Attachments: amq-2939.patch
>
>
> 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>
> Relevant email thread.
> -----Original Message-----
> From: chubrilo@gmail.com [mailto:chubrilo@gmail.com] On Behalf Of Dejan Bosanac
> Sent: Thursday, September 23, 2010 4:19 AM
> To: users@activemq.apache.org
> Subject: Re: configuring plugins with activemq 5.4.1
> Hi Allen,
> can you raise an issue for this, as it is an obvious regression? It's probably due the fact that in 5.4 we're back to autogenerating schema.
> Cheers
> --
> Dejan Bosanac - http://twitter.com/dejanb
> Open Source Integration - http://fusesource.com/ ActiveMQ in Action - http://www.manning.com/snyder/ Blog - http://www.nighttale.net
> On Wed, Sep 22, 2010 at 10:58 PM, Allen Reese <ar...@yahoo-inc.com> wrote:
> > The problem is plugins as an attribute of broker seems to be removed in the 5.4.1 xsd.
> >
> > I want to configure the plugin once outside of the brokers, the reason is, I use an <import resource="brokers.xml">, and want to allow other people to reuse the plugin configuration without having to have it as part of their broker definition.
> >
> > I guess I'll keep playing around as I have some other ideas of how to do this, but I'm still confused if I setup my own xsd with an element for the plugin, how do I tie that to the plugin bean?
> >
> > --Allen
> >
> >
> > -----Original Message-----
> > From: Stan Lewis [mailto:slewis@fusesource.com]
> > Sent: Wednesday, September 22, 2010 3:10 PM
> > To: users@activemq.apache.org
> > Subject: Re: configuring plugins with activemq 5.4.1
> >
> > Should be able to do something like:
> >
> > <plugins>
> >   <bean xmlns="http://www.springframework.org/schema/beans"
> > id="myPlugin" class="com.yahoo.MyPlugin">
> >        <property name="disabled">
> >                <value>false</value>
> >        </property>
> >   </bean>
> > </plugins>
> >
> > for this, there's some other examples here:
> >
> > http://activemq.apache.org/developing-plugins.html#DevelopingPlugins-C
> > onfiguringpluginswithoutcustomXML
> >
> > On Wed, Sep 22, 2010 at 3:48 PM, Allen Reese <ar...@yahoo-inc.com> wrote:
> >> 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
> >

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQ-2939) plugins attribute is missing from brokers element in XSD.

Posted by "Dejan Bosanac (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-2939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=62888#action_62888 ] 

Dejan Bosanac commented on AMQ-2939:
------------------------------------

Adding some more side-effects of Spring 3 schema validation

{quote}
- in activemq.xml file I define the following configuration
<managementContext>
<managementContext createConnector="true" connectorPort="${activemq.jmx.port}" />
</managementContext>

- then I add some system properties on the command line of the JVM:
Java Runtime: Sun Microsystems Inc. 1.6.0_20 /usr/lib/jvm/java-6-sun-1.6.0.20/jre
 Heap sizes: current=253440k  free=250641k  max=506816k
   JVM args: -Dorg.apache.activemq.UseDedicatedTaskRunner=true -Xms256M -Xmx512M -Dactivemq.instance=testrbr -Dactivemq.jmx.port=1099 -Dactivemq.jetty.port=8161 -Djava.util.logging.config.file=logging.properties -Dcom.sun.management.jmxremote -Dactivemq.classpath=/mnt/export/activemq/testrbr/conf;/usr/share/activemq/conf; -Dactivemq.home=/usr/share/activemq -Dactivemq.base=/mnt/export/activemq/testrbr

Unfortunately this fails because of XML validation:
   Caused by: org.xml.sax.SAXParseException: cvc-datatype-valid.1.2.1: '${activemq.jmx.port}' is not a valid value for 'integer'.
{quote}


> plugins attribute is missing from brokers element in XSD.
> ---------------------------------------------------------
>
>                 Key: AMQ-2939
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2939
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.4.0, 5.4.1
>         Environment: RHEL 4u8
> JDK 1.6.0.23
>            Reporter: Allen Reese
>         Attachments: amq-2939.patch
>
>
> 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>
> Relevant email thread.
> -----Original Message-----
> From: chubrilo@gmail.com [mailto:chubrilo@gmail.com] On Behalf Of Dejan Bosanac
> Sent: Thursday, September 23, 2010 4:19 AM
> To: users@activemq.apache.org
> Subject: Re: configuring plugins with activemq 5.4.1
> Hi Allen,
> can you raise an issue for this, as it is an obvious regression? It's probably due the fact that in 5.4 we're back to autogenerating schema.
> Cheers
> --
> Dejan Bosanac - http://twitter.com/dejanb
> Open Source Integration - http://fusesource.com/ ActiveMQ in Action - http://www.manning.com/snyder/ Blog - http://www.nighttale.net
> On Wed, Sep 22, 2010 at 10:58 PM, Allen Reese <ar...@yahoo-inc.com> wrote:
> > The problem is plugins as an attribute of broker seems to be removed in the 5.4.1 xsd.
> >
> > I want to configure the plugin once outside of the brokers, the reason is, I use an <import resource="brokers.xml">, and want to allow other people to reuse the plugin configuration without having to have it as part of their broker definition.
> >
> > I guess I'll keep playing around as I have some other ideas of how to do this, but I'm still confused if I setup my own xsd with an element for the plugin, how do I tie that to the plugin bean?
> >
> > --Allen
> >
> >
> > -----Original Message-----
> > From: Stan Lewis [mailto:slewis@fusesource.com]
> > Sent: Wednesday, September 22, 2010 3:10 PM
> > To: users@activemq.apache.org
> > Subject: Re: configuring plugins with activemq 5.4.1
> >
> > Should be able to do something like:
> >
> > <plugins>
> >   <bean xmlns="http://www.springframework.org/schema/beans"
> > id="myPlugin" class="com.yahoo.MyPlugin">
> >        <property name="disabled">
> >                <value>false</value>
> >        </property>
> >   </bean>
> > </plugins>
> >
> > for this, there's some other examples here:
> >
> > http://activemq.apache.org/developing-plugins.html#DevelopingPlugins-C
> > onfiguringpluginswithoutcustomXML
> >
> > On Wed, Sep 22, 2010 at 3:48 PM, Allen Reese <ar...@yahoo-inc.com> wrote:
> >> 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
> >

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQ-2939) Disable Spring 3 schema validation

Posted by "Reynald Borer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-2939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=63196#action_63196 ] 

Reynald Borer commented on AMQ-2939:
------------------------------------

According to https://jira.springframework.org/browse/SPR-5014?focusedCommentId=48116&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_48116 there seems to be a way to programatically disable XML validation when creating the application context. I was not able the correct piece of code to change in ActiveMQ to test this unfortunately.

> Disable Spring 3 schema validation
> ----------------------------------
>
>                 Key: AMQ-2939
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2939
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.4.0, 5.4.1
>         Environment: RHEL 4u8
> JDK 1.6.0.23
>            Reporter: Allen Reese
>         Attachments: amq-2939.patch
>
>
> 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>
> Relevant email thread.
> -----Original Message-----
> From: chubrilo@gmail.com [mailto:chubrilo@gmail.com] On Behalf Of Dejan Bosanac
> Sent: Thursday, September 23, 2010 4:19 AM
> To: users@activemq.apache.org
> Subject: Re: configuring plugins with activemq 5.4.1
> Hi Allen,
> can you raise an issue for this, as it is an obvious regression? It's probably due the fact that in 5.4 we're back to autogenerating schema.
> Cheers
> --
> Dejan Bosanac - http://twitter.com/dejanb
> Open Source Integration - http://fusesource.com/ ActiveMQ in Action - http://www.manning.com/snyder/ Blog - http://www.nighttale.net
> On Wed, Sep 22, 2010 at 10:58 PM, Allen Reese <ar...@yahoo-inc.com> wrote:
> > The problem is plugins as an attribute of broker seems to be removed in the 5.4.1 xsd.
> >
> > I want to configure the plugin once outside of the brokers, the reason is, I use an <import resource="brokers.xml">, and want to allow other people to reuse the plugin configuration without having to have it as part of their broker definition.
> >
> > I guess I'll keep playing around as I have some other ideas of how to do this, but I'm still confused if I setup my own xsd with an element for the plugin, how do I tie that to the plugin bean?
> >
> > --Allen
> >
> >
> > -----Original Message-----
> > From: Stan Lewis [mailto:slewis@fusesource.com]
> > Sent: Wednesday, September 22, 2010 3:10 PM
> > To: users@activemq.apache.org
> > Subject: Re: configuring plugins with activemq 5.4.1
> >
> > Should be able to do something like:
> >
> > <plugins>
> >   <bean xmlns="http://www.springframework.org/schema/beans"
> > id="myPlugin" class="com.yahoo.MyPlugin">
> >        <property name="disabled">
> >                <value>false</value>
> >        </property>
> >   </bean>
> > </plugins>
> >
> > for this, there's some other examples here:
> >
> > http://activemq.apache.org/developing-plugins.html#DevelopingPlugins-C
> > onfiguringpluginswithoutcustomXML
> >
> > On Wed, Sep 22, 2010 at 3:48 PM, Allen Reese <ar...@yahoo-inc.com> wrote:
> >> 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
> >

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQ-2939) Disable Spring 3 schema validation

Posted by "Allen Reese (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-2939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=63410#action_63410 ] 

Allen Reese commented on AMQ-2939:
----------------------------------

You can use the <plugins> element instead.

I ended up doing this:

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


	<broker brokerName="broker" dataDirectory="${activemq.base}/data">
		<plugins xmlns:spring="http://www.springframework.org/schema/beans">
			<spring:ref local="myPlugin" />
 		</plugins>
	</broker>

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


	<broker brokerName="broker" dataDirectory="${activemq.base}/data" plugins="#myPlugin">
	</broker>



> Disable Spring 3 schema validation
> ----------------------------------
>
>                 Key: AMQ-2939
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2939
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.4.0, 5.4.1
>         Environment: RHEL 4u8
> JDK 1.6.0.23
>            Reporter: Allen Reese
>            Assignee: Gary Tully
>             Fix For: 5.5.0
>
>         Attachments: amq-2939.patch
>
>
> 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>
> Relevant email thread.
> -----Original Message-----
> From: chubrilo@gmail.com [mailto:chubrilo@gmail.com] On Behalf Of Dejan Bosanac
> Sent: Thursday, September 23, 2010 4:19 AM
> To: users@activemq.apache.org
> Subject: Re: configuring plugins with activemq 5.4.1
> Hi Allen,
> can you raise an issue for this, as it is an obvious regression? It's probably due the fact that in 5.4 we're back to autogenerating schema.
> Cheers
> --
> Dejan Bosanac - http://twitter.com/dejanb
> Open Source Integration - http://fusesource.com/ ActiveMQ in Action - http://www.manning.com/snyder/ Blog - http://www.nighttale.net
> On Wed, Sep 22, 2010 at 10:58 PM, Allen Reese <ar...@yahoo-inc.com> wrote:
> > The problem is plugins as an attribute of broker seems to be removed in the 5.4.1 xsd.
> >
> > I want to configure the plugin once outside of the brokers, the reason is, I use an <import resource="brokers.xml">, and want to allow other people to reuse the plugin configuration without having to have it as part of their broker definition.
> >
> > I guess I'll keep playing around as I have some other ideas of how to do this, but I'm still confused if I setup my own xsd with an element for the plugin, how do I tie that to the plugin bean?
> >
> > --Allen
> >
> >
> > -----Original Message-----
> > From: Stan Lewis [mailto:slewis@fusesource.com]
> > Sent: Wednesday, September 22, 2010 3:10 PM
> > To: users@activemq.apache.org
> > Subject: Re: configuring plugins with activemq 5.4.1
> >
> > Should be able to do something like:
> >
> > <plugins>
> >   <bean xmlns="http://www.springframework.org/schema/beans"
> > id="myPlugin" class="com.yahoo.MyPlugin">
> >        <property name="disabled">
> >                <value>false</value>
> >        </property>
> >   </bean>
> > </plugins>
> >
> > for this, there's some other examples here:
> >
> > http://activemq.apache.org/developing-plugins.html#DevelopingPlugins-C
> > onfiguringpluginswithoutcustomXML
> >
> > On Wed, Sep 22, 2010 at 3:48 PM, Allen Reese <ar...@yahoo-inc.com> wrote:
> >> 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
> >

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AMQ-2939) plugins attribute is missing from brokers element in XSD.

Posted by "Allen Reese (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-2939?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Allen Reese updated AMQ-2939:
-----------------------------

    Attachment: amq-2939.patch

Patch the shows the regression in 5.4.1
Applying to 5.3.2, shows it succeeds.

Using ASF License as this is a direct copy of ActiveMQ code and config with 3 lines added.

> plugins attribute is missing from brokers element in XSD.
> ---------------------------------------------------------
>
>                 Key: AMQ-2939
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2939
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.4.0, 5.4.1
>         Environment: RHEL 4u8
> JDK 1.6.0.23
>            Reporter: Allen Reese
>         Attachments: amq-2939.patch
>
>
> 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>
> Relevant email thread.
> -----Original Message-----
> From: chubrilo@gmail.com [mailto:chubrilo@gmail.com] On Behalf Of Dejan Bosanac
> Sent: Thursday, September 23, 2010 4:19 AM
> To: users@activemq.apache.org
> Subject: Re: configuring plugins with activemq 5.4.1
> Hi Allen,
> can you raise an issue for this, as it is an obvious regression? It's probably due the fact that in 5.4 we're back to autogenerating schema.
> Cheers
> --
> Dejan Bosanac - http://twitter.com/dejanb
> Open Source Integration - http://fusesource.com/ ActiveMQ in Action - http://www.manning.com/snyder/ Blog - http://www.nighttale.net
> On Wed, Sep 22, 2010 at 10:58 PM, Allen Reese <ar...@yahoo-inc.com> wrote:
> > The problem is plugins as an attribute of broker seems to be removed in the 5.4.1 xsd.
> >
> > I want to configure the plugin once outside of the brokers, the reason is, I use an <import resource="brokers.xml">, and want to allow other people to reuse the plugin configuration without having to have it as part of their broker definition.
> >
> > I guess I'll keep playing around as I have some other ideas of how to do this, but I'm still confused if I setup my own xsd with an element for the plugin, how do I tie that to the plugin bean?
> >
> > --Allen
> >
> >
> > -----Original Message-----
> > From: Stan Lewis [mailto:slewis@fusesource.com]
> > Sent: Wednesday, September 22, 2010 3:10 PM
> > To: users@activemq.apache.org
> > Subject: Re: configuring plugins with activemq 5.4.1
> >
> > Should be able to do something like:
> >
> > <plugins>
> >   <bean xmlns="http://www.springframework.org/schema/beans"
> > id="myPlugin" class="com.yahoo.MyPlugin">
> >        <property name="disabled">
> >                <value>false</value>
> >        </property>
> >   </bean>
> > </plugins>
> >
> > for this, there's some other examples here:
> >
> > http://activemq.apache.org/developing-plugins.html#DevelopingPlugins-C
> > onfiguringpluginswithoutcustomXML
> >
> > On Wed, Sep 22, 2010 at 3:48 PM, Allen Reese <ar...@yahoo-inc.com> wrote:
> >> 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
> >

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (AMQ-2939) Disable Spring 3 schema validation

Posted by "Gary Tully (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-2939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=63197#action_63197 ] 

Gary Tully edited comment on AMQ-2939 at 11/9/10 7:42 AM:
----------------------------------------------------------

@Reynald 
You probably need to introduce a subclass of the Xbean ResourceXmlApplicationContext to disable the validation.

The entry point is: org.apache.activemq.xbean.XBeanBrokerFactory#createApplicationContext in activemq-core

      was (Author: gtully):
    You probably need to introduce a subclass of the Xbean ResourceXmlApplicationContext to disable the validation.

The entry point is: org.apache.activemq.xbean.XBeanBrokerFactory#createApplicationContext in activemq-core
  
> Disable Spring 3 schema validation
> ----------------------------------
>
>                 Key: AMQ-2939
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2939
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.4.0, 5.4.1
>         Environment: RHEL 4u8
> JDK 1.6.0.23
>            Reporter: Allen Reese
>         Attachments: amq-2939.patch
>
>
> 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>
> Relevant email thread.
> -----Original Message-----
> From: chubrilo@gmail.com [mailto:chubrilo@gmail.com] On Behalf Of Dejan Bosanac
> Sent: Thursday, September 23, 2010 4:19 AM
> To: users@activemq.apache.org
> Subject: Re: configuring plugins with activemq 5.4.1
> Hi Allen,
> can you raise an issue for this, as it is an obvious regression? It's probably due the fact that in 5.4 we're back to autogenerating schema.
> Cheers
> --
> Dejan Bosanac - http://twitter.com/dejanb
> Open Source Integration - http://fusesource.com/ ActiveMQ in Action - http://www.manning.com/snyder/ Blog - http://www.nighttale.net
> On Wed, Sep 22, 2010 at 10:58 PM, Allen Reese <ar...@yahoo-inc.com> wrote:
> > The problem is plugins as an attribute of broker seems to be removed in the 5.4.1 xsd.
> >
> > I want to configure the plugin once outside of the brokers, the reason is, I use an <import resource="brokers.xml">, and want to allow other people to reuse the plugin configuration without having to have it as part of their broker definition.
> >
> > I guess I'll keep playing around as I have some other ideas of how to do this, but I'm still confused if I setup my own xsd with an element for the plugin, how do I tie that to the plugin bean?
> >
> > --Allen
> >
> >
> > -----Original Message-----
> > From: Stan Lewis [mailto:slewis@fusesource.com]
> > Sent: Wednesday, September 22, 2010 3:10 PM
> > To: users@activemq.apache.org
> > Subject: Re: configuring plugins with activemq 5.4.1
> >
> > Should be able to do something like:
> >
> > <plugins>
> >   <bean xmlns="http://www.springframework.org/schema/beans"
> > id="myPlugin" class="com.yahoo.MyPlugin">
> >        <property name="disabled">
> >                <value>false</value>
> >        </property>
> >   </bean>
> > </plugins>
> >
> > for this, there's some other examples here:
> >
> > http://activemq.apache.org/developing-plugins.html#DevelopingPlugins-C
> > onfiguringpluginswithoutcustomXML
> >
> > On Wed, Sep 22, 2010 at 3:48 PM, Allen Reese <ar...@yahoo-inc.com> wrote:
> >> 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
> >

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.