We're updating the issue view to help you get more done. 

SystemProperty should work with plugins

Description

The new SystemProperty implementation, that is used to better structure the properties that are used, does not play well with plugins. Plugins tend to be unloaded/reloaded/updated, which causes SystemProperties to be 're-initialized'. This leads to exceptions like these:

Environment

None

Acceptance Test - Entry

None

Activity

Show:
Greg Thomas
October 23, 2019, 8:28 AM

Note; the method `SystemProperty.removePropertiesForPlugin(final String plugin)` is present for this purpose; it should be called when the plugin is unloaded in the destroyPlugin() method of the plugin.

Guus der Kinderen
October 23, 2019, 11:22 AM

D'oh! I didn't know that existed

Greg Thomas
October 28, 2019, 8:05 AM

Did that resolve your problem? I think it should have done. If so, not sure if this ticket is valid?

The intent of the exception was to stop two different parts of the code base trying to accidentally instantiate the same property for two different purposes - i.e. it's necessary to reach out to the specific SystemProperty singleton.

If people/you aren't keen on this behaviour, I"m happy to change it!

Greg Thomas
December 17, 2019, 1:09 PM

So, https://github.com/igniterealtime/Openfire/pull/1550 now unloads a plugins properties with the plugin. Based on a string match of the plugin name (from plugin.xml) and the "plugin" property of a SystemProperty.

Fixed

Assignee

Greg Thomas

Reporter

Guus der Kinderen

Labels

None

Expected Effort

None

Ignite Forum URL

None

Components

Fix versions

Priority

Major
Configure