public void stop ( ) { LOG . info ( "Stopping {}" , getClass ( ) . getSimpleName ( ) ) ; if ( txService == null ) { return ; } try { if ( txService . isRunning ( ) ) { txService . stopAndWait ( ) ; } } catch ( Throwable e ) { LOG . error ( "Failed to shutdown transaction service." , e ) ; // because shutdown hooks execute concurrently, the logger may be closed already: thus also print it. System . err . println ( "Failed to shutdown transaction service: " + e . getMessage ( ) ) ; e . printStackTrace ( System . err ) ; } }
Invoked by jsvc to stop the program .