When Service Mix starts its defines "servicemix.home" variable available for
JVM:
            System.getProperty("servicemix.home").

It always points to servicemix installation directory (eg
E:/tools/servicemix-3.2.1)
This is the best because you will always get location of container where
your service unit play. ;)

For testing purpose you can define surfire property:
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <systemProperties>
                        <property>
                            <name>servicemix.home</name>
                            <value>${project.build.outputDirectory}</value>
                        </property>
                    </systemProperties>
                </configuration>
            </plugin>

Regards,
Luke


gnodet wrote:
> 
> I think you should be able to use the SERVICEMIX_HOME system variable.
> Another way would be to use the classloader:
>    anyclass.getClassLoader().getResource("servicemix.properties")
> Actually, this last solution may be better as you will directly have a
> URL to the file you need to modify.
> 
> On Thu, Sep 4, 2008 at 12:30 PM, Gianfranco Boccalon
> <[EMAIL PROTECTED]> wrote:
>> Is it possible, within a servicemix-bean component, having the ServiceMix
>> location, or the location of the "conf" folder ?
>> I need to change a property file stored within the conf folder.
>>
>> Thanks
>> Gianfranco
>>
> 
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/ServiceMix-location-tp19307640p19432363.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to