karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré (JIRA) <j...@apache.org>
Subject [jira] [Commented] (KARAF-3151) Blueprint managed-properties doesn't call the update-method
Date Mon, 06 Oct 2014 17:16:34 GMT

    [ https://issues.apache.org/jira/browse/KARAF-3151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14160523#comment-14160523
] 

Jean-Baptiste Onofré commented on KARAF-3151:
---------------------------------------------

I just tested on Karaf 3.0.2-SNAPSHOT with the following blueprint XML:

{code}
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0">

    <cm:property-placeholder persistent-id="my.config" update-strategy="reload">
        <cm:default-properties>
            <cm:property name="title" value="Default"/>
        </cm:default-properties>
    </cm:property-placeholder>

    <bean class="net.nanthrax.karaf.test.MyBean" init-method="refresh">
        <property name="title" value="${title}" />
    </bean>

</blueprint>
{code}

It works fine. The configuration change (using config:* commands or directly in the cfg file)
results to a call to the bean.

I'm testing the second syntax (with cm:managed-properties inline in the bean).

> Blueprint managed-properties doesn't call the update-method
> -----------------------------------------------------------
>
>                 Key: KARAF-3151
>                 URL: https://issues.apache.org/jira/browse/KARAF-3151
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-core
>    Affects Versions: 3.0.2
>            Reporter: Jean-Baptiste Onofré
>            Assignee: Jean-Baptiste Onofré
>            Priority: Blocker
>             Fix For: 3.0.2
>
>
> When defining a bean in blueprint descriptor like this:
> {code}
> <bean id="myBean" class="..." scope="singleton" destroy-method="destroy">
>   <cm:managed-properties persistent-id="my.config.id" update-strategy="component-managed"
update-method="updateOrInit"/>
> </bean>
> {code}
> when the etc/my.config.id.cfg file is modified (for instance changing a property), the
bean is not called.
> It seems to work fine with Karaf 3.0.1, but not in 3.0.2-SNAPSHOT. I'm retesting in 3.0.2-SNAPSHOT
and 4.0.0-SNAPSHOT (I'm suspecting a change in Aries Blueprint).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message