You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by souciance <so...@gmail.com> on 2016/09/13 07:17:08 UTC

Access environment variables from blueprint

Hi,

Does anyone know how you can access environment variables in blueprint xml
syntax?

In Camel you can write:

@PropertyInject("{{env:EVENTBUS}}")
private String eventbus;

But I haven't found the equivalent for setting a property value based on an
environment variable in blueprint. Is this possible?

Thanks
Souciance





--
View this message in context: http://karaf.922171.n3.nabble.com/Access-environment-variables-from-blueprint-tp4047991.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Access environment variables from blueprint

Posted by souciance <so...@gmail.com>.
Hi,

Thanks for the info. I wrote on the jira story that it would be great to
have that feature in the blueprint core. Thanks for informing on the
fabric8 xml as well. Looking forward to the new features.

Best
Souciance

On Tue, Sep 13, 2016 at 9:44 AM, lburgazzoli [via Karaf] <
ml-node+s922171n4047993h5@n3.nabble.com> wrote:

> A new blueprint-core bundle with support for env vars [1] is on vote.
> In addition there is a fabric8-karaf-blueprint which is a blueprint
> port of camel property placeholder support [2]
>
>
> [1] https://issues.apache.org/jira/browse/ARIES-1311
> [2] https://github.com/fabric8-quickstarts/karaf-camel-amq/
> blob/master/src/main/resources/OSGI-INF/blueprint/
> camel-context.xml#L28-L41
>
>
> ---
> Luca Burgazzoli
>
>
> On Tue, Sep 13, 2016 at 9:17 AM, souciance
> <[hidden email] <http:///user/SendEmail.jtp?type=node&node=4047993&i=0>>
> wrote:
>
> > Hi,
> >
> > Does anyone know how you can access environment variables in blueprint
> xml
> > syntax?
> >
> > In Camel you can write:
> >
> > @PropertyInject("{{env:EVENTBUS}}")
> > private String eventbus;
> >
> > But I haven't found the equivalent for setting a property value based on
> an
> > environment variable in blueprint. Is this possible?
> >
> > Thanks
> > Souciance
> >
> >
> >
> >
> >
> > --
> > View this message in context: http://karaf.922171.n3.nabble.
> com/Access-environment-variables-from-blueprint-tp4047991.html
> > Sent from the Karaf - User mailing list archive at Nabble.com.
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://karaf.922171.n3.nabble.com/Access-environment-
> variables-from-blueprint-tp4047991p4047993.html
> To unsubscribe from Access environment variables from blueprint, click
> here
> <http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4047991&code=c291Y2lhbmNlLmVxZGFtLnJhc2h0aUBnbWFpbC5jb218NDA0Nzk5MXwxNTMyOTExNjU2>
> .
> NAML
> <http://karaf.922171.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://karaf.922171.n3.nabble.com/Access-environment-variables-from-blueprint-tp4047991p4047994.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Access environment variables from blueprint

Posted by Luca Burgazzoli <lb...@gmail.com>.
A new blueprint-core bundle with support for env vars [1] is on vote.
In addition there is a fabric8-karaf-blueprint which is a blueprint
port of camel property placeholder support [2]


[1] https://issues.apache.org/jira/browse/ARIES-1311
[2] https://github.com/fabric8-quickstarts/karaf-camel-amq/blob/master/src/main/resources/OSGI-INF/blueprint/camel-context.xml#L28-L41


---
Luca Burgazzoli


On Tue, Sep 13, 2016 at 9:17 AM, souciance
<so...@gmail.com> wrote:
> Hi,
>
> Does anyone know how you can access environment variables in blueprint xml
> syntax?
>
> In Camel you can write:
>
> @PropertyInject("{{env:EVENTBUS}}")
> private String eventbus;
>
> But I haven't found the equivalent for setting a property value based on an
> environment variable in blueprint. Is this possible?
>
> Thanks
> Souciance
>
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Access-environment-variables-from-blueprint-tp4047991.html
> Sent from the Karaf - User mailing list archive at Nabble.com.