To access system properties, use for example:

        <ext:property-placeholder placeholder-prefix="$[" placeholder-suffix="]" 
/>
        <cm:property-placeholder id="placeholder" persistent-id="pid">
                <cm:default-properties>
                        <cm:property name="userHome" value="$[user.home]" />
                </cm:default-properties>
        </cm:property-placeholder>

but accessing environment variables is still an open issue: 
https://issues.apache.org/jira/browse/ARIES-1311

- Martin

On 17.02.2016 10:32, Frizz wrote:
Do have an example for this?

On Tue, Feb 16, 2016 at 7:20 PM, Jean-Baptiste Onofré <[email protected] 
<mailto:[email protected]>> wrote:

    Hi,

    why don't you use directly aries blueprint ext and cm ?

    Regards
    JB


    On 02/16/2016 07:18 PM, Frizz wrote:

        I am trying to set a System Property in my Blueprint Configuration File,
        similar to the Spring approach that is described here:
        
http://stackoverflow.com/questions/3339736/set-system-property-with-spring-configuration-file

        My code looks like this:

        <bean id="mySysProp"
        
class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
            <property name = "targetObject" value="#{@systemProperties}" />
            <property name = "targetMethod" value="putAll" />
            <property name = "arguments" />
                <list>
        <value>org.blabla.packages</value>
                    <value>*</value>
                <list>
            </property>
        </bean>

        It doesn't throw an exception or something - but it's not setting the
        system property either. What might be the problem?

        I am using Apache Karaf 4.0.x (which uses Apache Aries Blueprint).


-- Jean-Baptiste Onofré
    [email protected] <mailto:[email protected]>
    http://blog.nanthrax.net
    Talend - http://www.talend.com



Reply via email to