You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We now have initial support for active/inactive beans in ArC, see #41810. Here are some ideas that would make that better:
We could add an @Active qualifier to inject only active beans into a List, similarly to @All. Alternatively, we could add something like this to InjectableInstance:
We might need to add the ability to use an exception as a cause of an inactive bean (in ActiveResult).
We might want to modify Instance.isUnsatisfied()/isAmbiguous() to remove inactive beans. There was also an idea to make inactive beans suppressed, but we cannot do that, because we sometimes need to access metadata of inactive beans through Instance (notably, to decide if some other bean is active or inactive, and use their ActiveResult as a cause). Perhaps this reason also precludes the modification of isUnsatisfied()/isAmbiguous(), need to think more about it.
We should add active/inactive support to ArC dev UI.
I actually think we shouldn't modify InjectableInstance.isUnsatisfied()/isAmbiguous(), because that would make the result of these methods inconsistent with the behavior of get()/iterator()/etc.
This means the only unfinished thing from the list is supporting an exception as an ActiveResult cause, but that's not a terribly big deal. And perhaps some more user-friendly way of obtaining only active beans, but we need more feedback to actually consider something.
Description
We now have initial support for active/inactive beans in ArC, see #41810. Here are some ideas that would make that better:
We could add an
@Active
qualifier to inject only active beans into aList
, similarly to@All
. Alternatively, we could add something like this toInjectableInstance
:We might need to add the ability to use an exception as a cause of an inactive bean (in
ActiveResult
).We might want to modify
Instance.isUnsatisfied()
/isAmbiguous()
to remove inactive beans. There was also an idea to make inactive beans suppressed, but we cannot do that, because we sometimes need to access metadata of inactive beans throughInstance
(notably, to decide if some other bean is active or inactive, and use theirActiveResult
as a cause). Perhaps this reason also precludes the modification ofisUnsatisfied()
/isAmbiguous()
, need to think more about it.We should add active/inactive support to ArC dev UI.
Not sure if there's more.
Implementation ideas
No response
The text was updated successfully, but these errors were encountered: