You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by James Bradt <gm...@xoxy.net> on 2006/08/09 18:26:41 UTC

lwcontainer config question

In the "Deploying Lightweight Components Tutorial" wikipage, it states that 
the SU uses a servicemix.xml file for configuration (within a <serviceunit> 
tag).

My question is this, does the file need to be named servicemix.xml.  I did a 
quick search through the code base and I don't see where this is defined.

The reason for my asking is that I have some spring beans (dao type stuff) 
that is fairly generic across a few different SM SE's that I am building and 
I would like to define these beans once (in there own xml config) and have 
the specific xbeans for the SM 'stuff' in a separate file.

Thanks,
James




Re: lwcontainer config question

Posted by James Bradt <gm...@xoxy.net>.
Thanks for the info,

I've added it to the wiki.

James




Re: lwcontainer config question

Posted by Ramon Buckland <no...@thebuckland.com>.
Hi James,

You will be able to import the common beans using
the following

<import resource="classpath:otherBeans.xml" />

The resource is a SpringResource so ..

<import resource="file:path/to/file/jmx.xml" />

also works.


Some other tips that we find help

if you run ServiceMix (or JBoss) with a param
JAVA_OPTS="-DMYHOME=somepath/"
JAVA_OPTS=-DMYHOME=somepath/ # windows

then in the servicemix.xml and xbean.xml you can reference
${MYHOME}.
eg:

<import resource="file:${MYHOME}/path/to/file/jmx.xml" />

Then you can also import a properties file from this same path
to pull in other config you may need. (that you want outside an SU/SA 
bundle).

 
        <bean id="propertyConfigurer"
                
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> 

                <property name="locations">
                        <list>
                                
<value>file:${MYHOME}/conf/config.properties</value>
                        </list>
                </property>
        </bean>
 


James Bradt wrote:
> In the "Deploying Lightweight Components Tutorial" wikipage, it states that 
> the SU uses a servicemix.xml file for configuration (within a <serviceunit> 
> tag).
>
> My question is this, does the file need to be named servicemix.xml.  I did a 
> quick search through the code base and I don't see where this is defined.
>
> The reason for my asking is that I have some spring beans (dao type stuff) 
> that is fairly generic across a few different SM SE's that I am building and 
> I would like to define these beans once (in there own xml config) and have 
> the specific xbeans for the SM 'stuff' in a separate file.
>
> Thanks,
> James
>
>
>
>
>