felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bengt Rodehav <be...@rodehav.com>
Subject ipojo and default values
Date Thu, 27 Oct 2011 21:35:24 GMT
I'm using iPOJO and have problems with default property values. Consider the

*  @Property(name = "url", mandatory = true, value = "
*  private String mUrl;*

If I use config admin (with fileinstall) to provide an override to the "url"
property (changing the port from 8093 to 9991), then the following happens:

1. My @Update method is called. The port is 8093.
2. My @Validate method is called. It does some initialization that can take
a second or two. On entering the @Validate method the port is 8093.
3. My @Update method is called again. The port is now 9991 which means that
this is the value from config admin. Note that my @Validate method is not
done at this point.
4. My @Validate method returns. At this point the port is 9991. However, the
initialization code in the @Validate method used the port 8093 not 9991 that
I wanted to use.

I expected the port 9991 to be used since I had overridden the default port
(8093). I'm not sure why this is happening. How can I guarantee that the
overridden port is used instead of the default port?

Note that since the update to port 9991 takes place while I'm in my
@Validate method I missed the update and I won't be informed about it again.


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