Thanks Ivo, I'm going to try writing a test for that scenario right away, to validate your findings and make sure we can permanently fix them!
Greetings, Marcel On 15 Nov 2010, at 9:58 , Ivo Ladage-van Doorn wrote: > Hi Marcel, > > I think I know how to reproduce the issue, added my comment to issue > AMDATU-174. It seems to go wrong in the following use case: > - I have a service A contained by bundle A > - Service A has a required dependency on service B contained by bundle B > > Now when I update bundle B, service A is stopped/started. It does pass by the > init() method, but the updated() is never invoked. > When I update bundle A, updated() is invoked prior to init(). > > Regards, Ivo > > -----Original Message----- > From: amdatu-developers-bounces at amdatu.org > [mailto:amdatu-developers-bounces at amdatu.org] On Behalf Of Marcel Offermans > Sent: vrijdag 12 november 2010 16:23 > To: amdatu-developers at amdatu.org > Subject: Re: [Amdatu-developers] [Amdatu-commits] SVN r418 - > trunk/amdatu-authorization/login-gadget/src/main/java/org/amdatu/authorization/login/gadget/service > > On 12 Nov 2010, at 16:02 , Ivo Ladage-van Doorn wrote: > >> The point is that in some cases the updated() is not invoked at all when the >> service is stopped/started. I ran into this issue a couple of times now, >> using the debugger I noticed that updated() was never invoked when the >> service was stopped/started, causing the config variables to be null. >> Unfortunately, I cannot reproduce the issue at will. > > Ok. That should not happen, so let's try to focus on reproducing and fixing > that. By "starting and stopping the service" do you mean starting and > stopping the bundle? > >> So I agree that checking for these configuration entries are null should not >> be necessary, however, it happens. And when it happens, your dashboard is >> broken (or actually, the login gadget is, and without a login gadget there >> is not much you can do). So until I know what's going on here, this check >> just prevents the dashboard to break down. > > In that case, please clearly mark this as a temporary work-around so we don't > forget to revisit it. > >> I changed the init() into start() based on Angelo's suggestion to resolve >> the issue, although I to doubt whether this would fix anything. > > Briefly discussed this with Angelo. He was not sure about when updated() was > invoked, but it is invoked *before* the init() method would ever be called > (and once there is a valid configuration, every time a new one becomes > available). So I agree that this doesn't fix anything. > >> Your third point is valid, but is valid for all managed services. But >> solving that was outside the scope of this commit. > > If it is valid for all managed services and none of them currently handle > configuration updates, we should indeed add an issue for each of them and fix > that as soon as possible. Not being able to update your configuration means > we will never be able to succesfully run in a cloud or for longer periods of > time. > > In any case, I will investigate the issue with the updated() method not > always being called (AMDATU-174). > > Greetings, Marcel > > > _______________________________________________ > Amdatu-developers mailing list > Amdatu-developers at amdatu.org > http://lists.amdatu.org/mailman/listinfo/amdatu-developers > > _______________________________________________ > Amdatu-developers mailing list > Amdatu-developers at amdatu.org > http://lists.amdatu.org/mailman/listinfo/amdatu-developers

