[OPENAM-12648] AgentsRepo instances are leaked during realm creation Created: 18/Mar/18  Updated: 01/Aug/19  Resolved: 23/Mar/18

Status: Resolved
Project: OpenAM
Component/s: sms
Affects Version/s: 6.0.0
Fix Version/s: 6.0.0, 14.1.2, 5.5.2

Type: Bug Priority: Major
Reporter: Peter Major [X] (Inactive) Assignee: Peter Major [X] (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
is caused by OPENAM-1816 ssoadm comand to create a realm may c... Resolved
Target Version/s:
Needs backport:
Needs QA verification:
Functional tests:
Are the reproduction steps defined?:
Yes and I used the same an in the description


Bug description

As part of the realm creation process new agent related entries are added to the configuration store by the usage of AgentsRepo. The issue is that the AgentsRepo instances are never actually shut down, meaning that these instances never deregister their ServiceConfigManager and ServiceSchemaManager listeners, causing a minor leak.

How to reproduce the issue

Create a bunch of realms and see your heap very slowly grow with AgentsRepo instances.

Expected behaviour

AgentsRepo instances are shut down once they are no longer needed.

Current behaviour

They stay around.

Generated at Tue Nov 24 06:42:02 UTC 2020 using Jira 7.13.12#713012-sha1:6e07c38070d5191bbf7353952ed38f111754533a.