I've raised the question before but I've reached a point where I must resolve this.
Since the RegistryShutdownHub doesn't offer ordering to call registered will-shutdown/shutdown listeners, has anyone managed to order the shutdown process of his application ? I need to shutdown my services before destroying the database connection. Thank you.