Its the iPOJO normal/known behaviour. In order to set or initialize a default value, you must doit in the property anotation. @Property(name = "statusName", value = "SOMETHING", mandatory = true) private String statusName;
why? I don't know, I think is a code manipulation problem. 2011/1/27 Carlos Quiroz <[email protected]> > Hi > > I'm using iPOJO and I want to also integrate with ConfigAdmin but I have > found an issue that I'm not sure if it is by design or bugs > > I' having a bundle that defines a component (Not a service) and has a > couple of configuration properties defined as fields: > I'm also using the Felix ConfigAdmin and Felix FileInstall service setting > the properties in a configuration file as simple properties > > The class look like: > > @Component(name = "GIAPI_STATUS_SERVICE", managedservice = > "edu.gemini.aspen.giapi.statusservice.StatusService") > @Instantiate(name="GIAPI_STATUS_SERVICE") > public class StatusService { > @Property > private String statusName; > > @Property > private String serviceName; > ... > > @Updated > public void updates() ... > > @Validated > public void updates() ... > > Now, I expect that since the values are stored in the configuration they > will be made available at @Updated but. If the fields are initialized in > code like > @Property(name = "statusName", value = "INVALID", mandatory = true) > private String statusName = "SOMETHING"; > > Then at @Updated statusName has the value "SOMETHING" rather than the one > in the config file > > If I don't initialize then it works > > Any ideas? > Carlos > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > -- Issac Noé García Garza

