aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Grzegorz Grzybek (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ARIES-1858) Make typed property placeholders compatible with older Camel versions
Date Thu, 08 Nov 2018 08:22:00 GMT

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

Grzegorz Grzybek commented on ARIES-1858:
-----------------------------------------

Here's a list of special things that {{org.apache.camel.blueprint.BlueprintPropertiesParser}}
does:
* checking hierarchy:
{code:java}
Class<?> clazz = ((ExtendedBeanMetadata) meta).getRuntimeClass();
if (clazz != null && AbstractPropertyPlaceholder.class.isAssignableFrom(clazz)) {
    ids.add(id);
}
{code}
* casting:
{code:java}
Object component = container.getComponentInstance(id);
if (component instanceof AbstractPropertyPlaceholder) {
    AbstractPropertyPlaceholder placeholder = (AbstractPropertyPlaceholder) component;
{code}
* reflectively getting a method reference:
{code:java}
method = AbstractPropertyPlaceholder.class.getDeclaredMethod("retrieveValue", String.class);
method.setAccessible(true);
{code}
* non-reflectively calling {{getDefaultProperties()}} method:
{code:java}
if (placeholder instanceof PropertyPlaceholder) {
    Map map = ((PropertyPlaceholder) placeholder).getDefaultProperties();
    isDefault = map != null && map.containsKey(key);
}
{code}

> Make typed property placeholders compatible with older Camel versions
> ---------------------------------------------------------------------
>
>                 Key: ARIES-1858
>                 URL: https://issues.apache.org/jira/browse/ARIES-1858
>             Project: Aries
>          Issue Type: Improvement
>          Components: Blueprint
>    Affects Versions: blueprint-core-1.10.0
>            Reporter: Grzegorz Grzybek
>            Assignee: Grzegorz Grzybek
>            Priority: Major
>             Fix For: blueprint-core-1.10.1
>
>
> ARIES-1298 changed the runtime class of bean registered from {{&#123;http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.x.0&#125;property-placeholder}}
and {{&#123;http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.x.0&#125;property-placeholder}}.
This is definitely not catched by semver plugin.
> {{camel-blueprint}} (see CAMEL-12570) added support for this new runtime class - it was
needed because Camel explicitly casts and uses reflection on old {{org.apache.aries.blueprint.ext.AbstractPropertyPlaceholder}}
class, while blueprint-core 1.10.0 registers placeholder class that extends {{org.apache.aries.blueprint.ext.AbstractPropertyPlaceholderExt}}
- and these two are not related.
> The problem is that when user will try to upgrade to e.g., Karaf with blueprint-core
1.10.0 *without upgrading Camel*, Camel blueprint will stop detecting blueprint property resolvers.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message