Hi Charles,

yes you have the servicemix.home variable (defined in the startup script).

You can use it in a xbean with a propertyPlaceHolde like this (for example):

<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="locations">
            <list>
                        <value>classpath:/application.properties</value>
                        <value>classpath:/servicemix.properties</value>
            </list>
        </property>
    </bean>

<rmi:consumer port="${rmi.port}" service="my:app endpoint="rmi" name="smx/rmi/My" remoteInterface="org.apache.servicemix.rmi.sample.My">
        <rmi:pojo>
            <bean class="org.apache.servicemix.rmi.sample.MyImpl">
                <property location="home" value="${servicemix.home}"/>
            </bean>
        </rmi:pojo>
    </rmi:consumer>

Regards
JB

Charles Moulliard wrote:
Hi,

I would like to know if we have an env variable available under SMX3 to have
access to the folder/directory where the config files are :

ex : ${servicemix.home}/conf

Can we use this variable from a spring xml file (where we would like to use
propertyPlaceHolder) to replace values defined in a properties file
(${servicemix.home}/conf/application.properties)

Kind regards,

Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*****************************
blog : http://cmoulliard.blogspot.com
twitter : http://twitter.com/cmoulliard
Linkedlin : http://www.linkedin.com/in/charlesmoulliard

Apache Camel Group :
http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm

Reply via email to