Hi,
as far as I understand the atlassian documentation there is no guaranteed way to be informed when the plugin is getting uninstalled (not inside the plugin itself). The DisposableBean gets notified on disabled/uninstalled - no way to differentiate as far as I can see.
How can I ensure that all AO tables and data are removed if someone decides to uninstall the plugin completely?
Thanks in advance,
Sabine
Community moderators have prevented the ability to post new answers.
Hi Sabine,
It is a bad idea to delete data on uninstall: Customers often uninstall plugins to test interferences with other OSGi modules. Another example is upgrades: A upgrade starts with uninstalling the previous version, then installing the new one.
However, I imagine customers would be more than happy if you have an "Uninstall" wizard, which deletes some data and provides them with information on how to delete the rest.
Regards,
Adrien
Hi,
thanks for the advice with the "Uninstall" wizard. The wizard itself I can only place inside my plugin or is there a way to intercept the "Uninstall" click in the UPM like:
- Uninstall Button clicked --> Hook --> Do my wizard uninstall stuff --> Go on with UPM Uninstall routine?
Thanks in advance,
Sabine
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't think it's possible to catch the Uninstall event: The plugin gets disabled before it is uninstalled, so none of your Java classes are loaded when the Uninstall event happens and no hook would have an effect.
You could write a short sentence in your plugin description, so it appears just above the Uninstall button, along the lines of "To delete the plugin's data, go to My Plugin -> Uninstall Wizard".
I suspect that most customers would keep the data anyway, unless the data is really big.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks agains, Adien. Will think about this approach.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sabine,
It depends on plugin developer and their data dependencies whether it is located in directory sturcture or in ao table,
as per my information when you uninstall the plugin then their AO tables will be still exists, You need to delete it via taking the access of datasource and that AO table information located at plugin data storage.
Best Regards
Onkar Ahire
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
thanks for your answer. This is exactly what I mean - the AO tables remains. But in a customer context I am not able to have access to the database.
Sabine
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.