public void onShutdown ( ) { if ( instance == null ) return ; try { this . camelContext . stop ( ) ; } catch ( Exception ex ) { logger . severeException ( ex . getMessage ( ) , ex ) ; } }
Method can be invoked when the server shuts down