You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "Timothy Ward (Commented) (JIRA)" <ji...@apache.org> on 2011/10/03 19:17:34 UTC

[jira] [Commented] (ARIES-727) support syntax : ${a+b} in blueprint-cm

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

Timothy Ward commented on ARIES-727:
------------------------------------

So the bug happens for quite a simple reason, though solving it may be harder...

The xxxxBTCustomizerTest tests make sure our blueprint extender can process bundles inside composites. In the test we install the blueprint test bundle inside a composite then check it worked.

With the new JEXL code, the ExtNameSpaceHandler adds a service dependency for a property evaluator that matches the filter:

 (&(org.apache.aries.blueprint.ext.evaluator.name=jexl)(objectClass=org.apache.aries.blueprint.ext.PropertyEvaluator))

This evaluator exists in the framework that contains the blueprint extender bundle, but not in the framework that contains the test bundle, as a result we never see the JEXL evaluator, and the test bundle would timeout. Actually the tests hit an internal timeout much earlier (hence you don't see the wait).

I'll have a think about ways to fix this.
                
> support syntax : ${a+b} in blueprint-cm 
> ----------------------------------------
>
>                 Key: ARIES-727
>                 URL: https://issues.apache.org/jira/browse/ARIES-727
>             Project: Aries
>          Issue Type: New Feature
>          Components: Blueprint
>    Affects Versions: blueprint-0.3.1, blueprint-0.4.0
>            Reporter: Rex Wang
>            Assignee: Rex Wang
>             Fix For: blueprint-0.4.0
>
>         Attachments: ARIES-727-blueprint-cm.patch, ARIES-727-fixes-in-blueprint-ext.patch, ARIES-727-new-draft-fixes-in-blueprint-ext-0919.patch, ARIES-727-new-draft-fixes-in-blueprint-ext.patch
>
>
> I am wondering if Aries blueprint-cm support such scenario:
> <cm:property-placeholder id="property-placeholder" persistent-id="o.a.b.com" placeholder-prefix="${" placeholder-suffix="}">
>         <cm:default-properties>
>             <cm:property name="port" value="12345"/>
>             <cm:property name="offset" value="10"/>
>         </cm:default-properties>
> </cm:property-placeholder>
> <xxx:conn name="loc" uri="http://localhost:${port+offset}"/>
> I have a test, but seems the ${port+offset} can not be replaced with value "12355".
> -Rex
> -----------------------
> Hi Rex,
> to my knowledge (substantiated with a quick code inspection) the placeholders in Aries today support no operators or arithmetic like that. But please do raise an Improvement JIRA for the future :)
> Regards,
> Valentin
> -----------------------
> When we support this, we need to perform a 'plus' or string concatenate
> operation based on the variable type:).
> Therefore. when specifying the property in the blueprint xml, the explicit
> type should be specified if not string.
> Regards,
> Emily
> -----------------------
> I _think_ I wrote something like this for xbean-blueprint since it didn't look like blueprint supported it.  IIRC I used the same calculation engine as the geronimo config substitutions.  I think you can infer what kind of calculation to do (addition or concatenation) from the type of the property you end up setting.
> thanks
> david jencks

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira