[NETCONF-712] Clean up javax.inject annotations in restconf-nb Created: 16/Jul/20  Updated: 08/Feb/23

Status: Confirmed
Project: netconf
Component/s: restconf-nb
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Medium
Reporter: Nikhil Soni Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Blocks
blocks ODLMICRO-24 Move blue print xml declarations to a... Confirmed
is blocked by NETCONF-959 Convert restconf-nb to OSGi Declarati... Resolved

 Description   

The only thing ODLMICRO-24 can reasonably want now is that restconf-nb provides correct @Singleton annotations. This depends on NETCONF-959, which will clean up the lifecycle enough for this to be feasible.

At the end of the day, Guice does not really deal with configuration injection of which restconf-nb has plenty. It also has a ton of invalid Singletons, as it really should only be wired through JaxRsNortbound.

Add @Singleton annotation to it an provide an @Inject constructor, which will just take default values. Also remove any other @Singletons we end up overriding – for example RestconfApplication, which just cannot work (because of StreamsConfiguration).


Generated at Wed Feb 07 20:15:42 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.