You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by cmoulliard <cm...@gmail.com> on 2010/06/24 10:48:25 UTC
activemq.conf - import xml tags using XInclude
Hi,
Is it possible to import activemq xml tags from other xml files ? I try to
use XI:include but activemq generates the following error
ERROR: java.lang.Exception:
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'org.apache.activemq.xbean.XBeanBrokerService#0' define
d in class path resource [activemq.xml]: Error setting property values;
nested exception is org.springframework.beans.NotWritablePropertyException:
Invalid property 'incl
ude' of bean class [org.apache.activemq.xbean.XBeanBrokerService]: Bean
property 'include' is not writable or has an invalid setter method. Does the
parameter type of the
setter match the return type of the getter?
java.lang.Exception:
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'org.apache.activemq.xbean.XBeanBrokerService#0' defined in cl
ass path resource [activemq.xml]: Error setting property values; nested
exception is org.springframework.beans.NotWritablePropertyException: Invalid
property 'include' of
bean class [org.apache.activemq.xbean.XBeanBrokerService]: Bean property
'include' is not writable or has an invalid setter method. Does the
parameter type of the setter
match the return type of the getter?
at
org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:99)
<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"
xmlns:xi="http://www.w3.org/2001/XInclude"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://activemq.apache.org/schema/core
http://activemq.apache.org/schema/core/activemq-core.xsd">
<!--
The <broker> element is used to configure the ActiveMQ broker.
-->
<broker xmlns="http://activemq.apache.org/schema/core">
...
<xi:include href="destinations.xml" />
-----
Charles Moulliard
SOA Architect
My Blog : http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/
--
View this message in context: http://old.nabble.com/activemq.conf---import-xml-tags-using-XInclude-tp28980321p28980321.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: activemq.conf - import xml tags using XInclude
Posted by cobrien <cl...@ttmsolutions.com>.
Clark
I am not quite clear on what you are trying to accomplish but spring does
allow one to break up bean definitions into multiple files: The link below
describes the syntax.
http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/beans.html#beans-factory-xml-import
www.ttmsolutions.com
ActiveMQ reference guide at
http://bit.ly/AMQRefGuide
cmoulliard wrote:
>
> Hi,
>
> Is it possible to import activemq xml tags from other xml files ? I try to
> use XI:include but activemq generates the following error
>
> ERROR: java.lang.Exception:
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'org.apache.activemq.xbean.XBeanBrokerService#0' define
> d in class path resource [activemq.xml]: Error setting property values;
> nested exception is
> org.springframework.beans.NotWritablePropertyException: Invalid property
> 'incl
> ude' of bean class [org.apache.activemq.xbean.XBeanBrokerService]: Bean
> property 'include' is not writable or has an invalid setter method. Does
> the parameter type of the
> setter match the return type of the getter?
> java.lang.Exception:
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'org.apache.activemq.xbean.XBeanBrokerService#0' defined in
> cl
> ass path resource [activemq.xml]: Error setting property values; nested
> exception is org.springframework.beans.NotWritablePropertyException:
> Invalid property 'include' of
> bean class [org.apache.activemq.xbean.XBeanBrokerService]: Bean property
> 'include' is not writable or has an invalid setter method. Does the
> parameter type of the setter
> match the return type of the getter?
> at
> org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:99)
>
> <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"
> xmlns:xi="http://www.w3.org/2001/XInclude"
> xsi:schemaLocation="http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
> http://activemq.apache.org/schema/core
> http://activemq.apache.org/schema/core/activemq-core.xsd">
>
> <!--
> The <broker> element is used to configure the ActiveMQ broker.
> -->
> <broker xmlns="http://activemq.apache.org/schema/core">
> ...
> <xi:include href="destinations.xml" />
>
>
--
View this message in context: http://old.nabble.com/activemq.conf---import-xml-tags-using-XInclude-tp28980321p28994311.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: activemq.conf - import xml tags using XInclude
Posted by James Casey <ja...@gmail.com>.
Charles,
you can do this with XML entities. In your activemq.xml put at the top
(before the <beans> definition):
<!DOCTYPE activemq [
<!ENTITY network-connectors SYSTEM "/etc/activemq/activemq.d/network.xml">
and then you can refer to this simply with:
&network-connectors;
inside the <broker> element.
We use in production on activemq 5.3.x.
cheers,
James.
--
On 24 June 2010 10:48, cmoulliard <cm...@gmail.com> wrote:
>
> Hi,
>
> Is it possible to import activemq xml tags from other xml files ? I try to
> use XI:include but activemq generates the following error
>
> ERROR: java.lang.Exception:
> org.springframework.beans.factory.BeanCreationException: Error creating bean
> with name 'org.apache.activemq.xbean.XBeanBrokerService#0' define
> d in class path resource [activemq.xml]: Error setting property values;
> nested exception is org.springframework.beans.NotWritablePropertyException:
> Invalid property 'incl
> ude' of bean class [org.apache.activemq.xbean.XBeanBrokerService]: Bean
> property 'include' is not writable or has an invalid setter method. Does the
> parameter type of the
> setter match the return type of the getter?
> java.lang.Exception:
> org.springframework.beans.factory.BeanCreationException: Error creating bean
> with name 'org.apache.activemq.xbean.XBeanBrokerService#0' defined in cl
> ass path resource [activemq.xml]: Error setting property values; nested
> exception is org.springframework.beans.NotWritablePropertyException: Invalid
> property 'include' of
> bean class [org.apache.activemq.xbean.XBeanBrokerService]: Bean property
> 'include' is not writable or has an invalid setter method. Does the
> parameter type of the setter
> match the return type of the getter?
> at
> org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:99)
>
> <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"
> xmlns:xi="http://www.w3.org/2001/XInclude"
> xsi:schemaLocation="http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
> http://activemq.apache.org/schema/core
> http://activemq.apache.org/schema/core/activemq-core.xsd">
>
> <!--
> The <broker> element is used to configure the ActiveMQ broker.
> -->
> <broker xmlns="http://activemq.apache.org/schema/core">
> ...
> <xi:include href="destinations.xml" />
>
>
> -----
> Charles Moulliard
> SOA Architect
>
> My Blog : http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/
> --
> View this message in context: http://old.nabble.com/activemq.conf---import-xml-tags-using-XInclude-tp28980321p28980321.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>