You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Sufyan Arif <SA...@rdfgroup.com> on 2006/08/26 16:11:54 UTC

Splitting servicemix.xml file into multiple files

Hi,

 

Our servicemix file has grown to a large size and in order to minimise
merge conflicts (which are a nightmare to manage in xml) we want to
split the one large file into smaller files. As servicemix.xml is a
spring beans configuration I have been able to add import statements of
the form

 

<import resource="classpath:eip-router.xml"/>

 

This approach works ok for beans but it does not seem to work with
activation specs. I've read the post
http://www.nabble.com/importing-multiple-configuarion-files-tf1644047.ht
ml#a4459549 and the example it points to in the conf dir of servicemix
is only loading beans rather than activation specs.

 

So a concrete example is as follows:

 

<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://xbean.org/schemas/spring/1.0"

xmlns:spring="http://xbean.org/schemas/spring/1.0"

xmlns:sm="http://servicemix.apache.org/config/1.0"

xmlns:eip="http://servicemix.apache.org/eip/1.0"

xmlns:http="http://servicemix.apache.org/http/1.0"

xmlns:jms="http://servicemix.apache.org/jms/1.0"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://xbean.org/schemas/spring/1.0
../../conf/spring-beans.xsd http://servicemix.org/config/1.0
../../conf/servicemix.xsd">

 

 

     <import resource="classpath:eip-router.xml"/>

 

<sm:container spring:id="jbi"

              useMBeanServer="false"

              createMBeanServer="false"

              dumpStats="true"

              statsInterval="10">

 

   <sm:activationSpecs>

 

            ....Some activation specs defined here

   </sm:activationSpecs>

 

</sm:container>

 

The file eip-router.xml is found and loaded but the activation specs
defined in the eip-router.xml are not listed as a set of components in
the log. Whereas if the same activation specs were put into the top
level file then the components are found.

 

 

Any ideas whether this is possible?

 

Thanks

Sufyan

 


This transmission is confidential and intended solely for the person or organisation to whom it is addressed. It may contain privileged and confidential information. If you are not the intended recipient, you should not copy, distribute or take any action in reliance on it. If you have received this transmission in error, please notify the sender immediately. Any opinions or advice contained in this e-mail are those of the individual sender except where they are stated to be the views of RDF Group plc. All messages passing through this gateway are virus scanned.


Re: Splitting servicemix.xml file into multiple files

Posted by Guillaume Nodet <gn...@gmail.com>.
You could try using xml entities to split the activation specs.

See http://www-128.ibm.com/developerworks/xml/library/x-tipgentity.html
for examples.  However, i' m not sure how it would work with classpath :(
Need to try.

Another would be to use references in the list of activation specs and use
the <import /> tag:

  <sm:activationSpecs>
    <ref bean="myActivationSpec" />
    ...
 </sm..>

and

  <sm:activationSpec id="myActivationSpec" ....>
    ...
  </>

On 8/26/06, Sufyan Arif <SA...@rdfgroup.com> wrote:
>
> Hi,
>
>
>
> Our servicemix file has grown to a large size and in order to minimise
> merge conflicts (which are a nightmare to manage in xml) we want to
> split the one large file into smaller files. As servicemix.xml is a
> spring beans configuration I have been able to add import statements of
> the form
>
>
>
> <import resource="classpath:eip-router.xml"/>
>
>
>
> This approach works ok for beans but it does not seem to work with
> activation specs. I've read the post
> http://www.nabble.com/importing-multiple-configuarion-files-tf1644047.ht
> ml#a4459549 and the example it points to in the conf dir of servicemix
> is only loading beans rather than activation specs.
>
>
>
> So a concrete example is as follows:
>
>
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <beans xmlns="http://xbean.org/schemas/spring/1.0"
>
> xmlns:spring="http://xbean.org/schemas/spring/1.0"
>
> xmlns:sm="http://servicemix.apache.org/config/1.0"
>
> xmlns:eip="http://servicemix.apache.org/eip/1.0"
>
> xmlns:http="http://servicemix.apache.org/http/1.0"
>
> xmlns:jms="http://servicemix.apache.org/jms/1.0"
>
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
> xsi:schemaLocation="http://xbean.org/schemas/spring/1.0
> ../../conf/spring-beans.xsd http://servicemix.org/config/1.0
> ../../conf/servicemix.xsd">
>
>
>
>
>
>      <import resource="classpath:eip-router.xml"/>
>
>
>
> <sm:container spring:id="jbi"
>
>               useMBeanServer="false"
>
>               createMBeanServer="false"
>
>               dumpStats="true"
>
>               statsInterval="10">
>
>
>
>    <sm:activationSpecs>
>
>
>
>             ....Some activation specs defined here
>
>    </sm:activationSpecs>
>
>
>
> </sm:container>
>
>
>
> The file eip-router.xml is found and loaded but the activation specs
> defined in the eip-router.xml are not listed as a set of components in
> the log. Whereas if the same activation specs were put into the top
> level file then the components are found.
>
>
>
>
>
> Any ideas whether this is possible?
>
>
>
> Thanks
>
> Sufyan
>
>
>
>
> This transmission is confidential and intended solely for the person or
> organisation to whom it is addressed. It may contain privileged and
> confidential information. If you are not the intended recipient, you should
> not copy, distribute or take any action in reliance on it. If you have
> received this transmission in error, please notify the sender immediately.
> Any opinions or advice contained in this e-mail are those of the individual
> sender except where they are stated to be the views of RDF Group plc. All
> messages passing through this gateway are virus scanned.
>
>
>


-- 
Cheers,
Guillaume Nodet