commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yanick Duchesne" <yduche...@newtrade.com>
Subject Jelly and context scope
Date Mon, 22 Sep 2003 16:34:50 GMT
I am using Jelly to instantiate the components of an application; format
looks as follows (a simplified version of original):

<app>
    <property name="port" value="1099"/>

    <component name="A" class="org.acme.CompA">

        <!-- overrides global port -->
        <property name="port" value="1100"/>

        <config>
           <port>${port}</port>
        </config>
    </component>

   <!-- 1099 should be used as value for port -->
    <component name="B" class="org.acme.CompB">
        <config>
           <port>${port}</port>
        </config>
    </component>

</app>

I have implemented Jelly tags for my configuration format; The format
supports defining 'property' elements that internally associate a name/value
pair to the current JellyContext. Properties can be overriden at the
component level (see 'component' element above) but these properties should
have component scope only. I thought Jelly supported this, but it seems it
doesn't: in my example, component B receives 1100 as a port value when, if
scoped context would be supported, it should receive the "global" port
defined under the root element.

In my code, I call the setInherit(true) method on the initial JellyContext;
does not have any effect. Is there a work-around?


Yanick Duchesne
Software Architect
Architecte d'applications
Newtrade/Expedia
yduchesne@newtrade.com
tel +1 514 286 8187 x 3009




----------------------------------------------------------------------------
----
If you have received this message in error, please notify the sender
immediately and delete the original without making a copy, disclosing its
contents or taking any action based thereon.
Si vous avez reçu ce message par erreur, veuillez en aviser immédiatement le
signataire et effacer l'original, sans en tirer de copie, en dévoiler le
contenu ni prendre quelque mesure fondée sur celui-ci.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message