You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by youhaodeyi <yo...@gmail.com> on 2009/10/23 03:55:59 UTC

How can I define a service url in a property file?

I defined a service url in xbean.xml which will be packaged into a SU. If the
url is changed, I have to re-package the SU. How can I set the url in
another place like a property file?

thanks.
-- 
View this message in context: http://www.nabble.com/How-can-I-define-a-service-url-in-a-property-file--tp26019814p26019814.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: How can I define a service url in a property file?

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,

it's a Spring resource location.
You have deeper explanation here:
http://static.springsource.org/spring/docs/2.5.x/reference/resources.html

Anyway, the classpath:/myService.properties means in the classloader, so 
it will look for the file in the SMX container, after in the component 
classloader and finally in your SU classloader. So you can put the file 
where you want add add the directory in the main SMX classpath.

Regards
JB

youhaodeyi wrote:
> Hi,
> 
> In this tutorial, it defines the property file by 
> <bean
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
>       <property name="locations">
>          <value>classpath:/myService.properties</value>
>       </property>
>    </bean>
> 
> I wander what the classpath:/myService.properties mean. Does the classpath
> mean the CLASSPATH environment variable? 
> 
> 
> Jean-Baptiste Onofré wrote:
>> Hi,
>>
>> the best way is to use a properties file to be able to change some xbean 
>> properties "outside" the SU.
>>
>> You should take a look on this wiki page:
>> http://servicemix.apache.org/4-beginner-outsource-su-configuration-in-a-properties-file.html
>>
>> Regards
>> JB
>>
>> youhaodeyi wrote:
>>> I defined a service url in xbean.xml which will be packaged into a SU. If
>>> the
>>> url is changed, I have to re-package the SU. How can I set the url in
>>> another place like a property file?
>>>
>>> thanks.
>>
> 

Re: How can I define a service url in a property file?

Posted by youhaodeyi <yo...@gmail.com>.
Hi,

In this tutorial, it defines the property file by 
<bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
      <property name="locations">
         <value>classpath:/myService.properties</value>
      </property>
   </bean>

I wander what the classpath:/myService.properties mean. Does the classpath
mean the CLASSPATH environment variable? 


Jean-Baptiste Onofré wrote:
> 
> Hi,
> 
> the best way is to use a properties file to be able to change some xbean 
> properties "outside" the SU.
> 
> You should take a look on this wiki page:
> http://servicemix.apache.org/4-beginner-outsource-su-configuration-in-a-properties-file.html
> 
> Regards
> JB
> 
> youhaodeyi wrote:
>> I defined a service url in xbean.xml which will be packaged into a SU. If
>> the
>> url is changed, I have to re-package the SU. How can I set the url in
>> another place like a property file?
>> 
>> thanks.
> 
> 

-- 
View this message in context: http://old.nabble.com/How-can-I-define-a-service-url-in-a-property-file--tp26019814p26176761.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: How can I define a service url in a property file?

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,

the best way is to use a properties file to be able to change some xbean 
properties "outside" the SU.

You should take a look on this wiki page:
http://servicemix.apache.org/4-beginner-outsource-su-configuration-in-a-properties-file.html

Regards
JB

youhaodeyi wrote:
> I defined a service url in xbean.xml which will be packaged into a SU. If the
> url is changed, I have to re-package the SU. How can I set the url in
> another place like a property file?
> 
> thanks.