-
1. Re: controller.uninstall() fails when overriding the KernelControllerContext name
alesj Apr 24, 2010 8:40 AM (in response to emuckenhuber)Why don't you rather use alias then change original name in the middle of bean's lifecycle?
Imo, the name should actually be made immutable, specially after the context is installed.
-
2. Re: controller.uninstall() fails when overriding the KernelControllerContext name
emuckenhuber Apr 24, 2010 9:27 AM (in response to alesj)Ales Justin wrote:
Why don't you rather use alias then change original name in the middle of bean's lifecycle?
Imo, the name should actually be made immutable, specially after the context is installed.
Well the thing is that i'm not changing the name during the lifecycle - it's the kernel InstallAction, which does that. I just override the original context name before i call install(), since BMD only allows Strings as a name.
-
3. Re: controller.uninstall() fails when overriding the KernelControllerContext name
alesj Apr 25, 2010 4:07 PM (in response to emuckenhuber)Well the thing is that i'm not changing the name during the lifecycle - it's the kernel InstallAction, which does that. I just override the original context name before i call install(), since BMD only allows Strings as a name.
OK, I see a bit of inconsistency there -- since we only allow BMD for KernelContextController,
we should make sure setName throws some exception or lists a warning that setName is ignored.
In your case, you should put in a canonical name into BMD.
-
4. Re: controller.uninstall() fails when overriding the KernelControllerContext name
emuckenhuber Apr 26, 2010 7:08 AM (in response to alesj)Ales Justin wrote:
OK, I see a bit of inconsistency there -- since we only allow BMD for KernelContextController,we should make sure setName throws some exception or lists a warning that setName is ignored.
Hmm, wouldn't it make more sense to use the context name instead of the BMD to register the context in the InstallAction? I mean the only reason i was using setName() was to not use the name defined in the BMD - since it only allows a String.
Now i'm just using a hash for the context name and add aliases - so not allowing to override the ctx name would work for me as well.