Hi,

Can you post the composite file here? You should have something like the following if you have the @Property on the impl class for CurrencyConverter component.

<component name="CurrencyConverter">
    ...
    <property name="exchangeRate">10.0</property>
</component>

Thanks,
Raymond

--------------------------------------------------
From: "Rohan Sahgal" <[EMAIL PROTECTED]>
Sent: Monday, May 19, 2008 6:56 PM
To: <tuscany-user@ws.apache.org>
Subject: Problems setting property while deploying as a webapp

Hi,
I was trying to rewrite the calculator webapp so that it can pick up some
properties from the composite file.

To be exact, I was trying to add a currency converter to the calculator so
that the exchangeRate can be pulled in from the property file.

Unfortunately i realized that this does not seem to work, it always picks up the default value from the Java class or gives a null pointer exception if I
do not initialize.

I have the following declaration in the java code
@Property
   public Double exchangeRate = 0.6486767;

and
<property name="exchangeRate">10.0</property>

in the composite file

Now should it not pick 10 as I am redefining the value.

Am I missing something, is there something more I have to do.

Thanks,
Rohan

Reply via email to