Since JJUPIN 4.0 you can configure scripts to run at the start of your plugin (startup script) or at its end (shutdown script). The scripts are run every time JJUPIN gets started/stopped, either for administrative reasons (i.e. update of the plugin) or at JIRA's own startup/shutdown.
You can configure both of them from Administration → Start/Stop Scripts.