@Override public void run() { try { getInstance().shutdownAll( null ); } catch ( Exception e ) { // ignore, the exception should already have been reported } } } );
/** * Retrieve the lazily initialized instance of the registry. * * @return singleton instance of the registry */ public static EmbeddedRegistry getInstance() { if ( instance == null ) { instance = new EmbeddedRegistry(); Runtime.getRuntime().addShutdownHook( new Thread() { @Override public void run() { try { getInstance().shutdownAll( null ); } catch ( Exception e ) { // ignore, the exception should already have been reported } } } ); } return instance; }
container.setConfigFile( serverXml.getAbsolutePath() ); container.start(); EmbeddedRegistry.getInstance().register( container ); EmbeddedRegistry.getInstance().register( embeddedTomcat );
error( log, e, "no stop method in class " + embedded.getClass().getName() ); error( log, e, "Error while shutting down embedded Tomcat." ); error( log, e, "IllegalAccessException for stop method in class " + embedded.getClass().getName() ); error( log, e, "Error while shutting down embedded Tomcat." ); error( log, e, "IllegalAccessException for stop method in class " + embedded.getClass().getName() ); error( log, e, "Error while shutting down embedded Tomcat." );
container.setConfig( serverXml.getAbsolutePath() ); container.start(); EmbeddedRegistry.getInstance().register( container ); EmbeddedRegistry.getInstance().register( embeddedTomcat );
error( log, e, "no stop/destroy method in class " + embedded.getClass().getName() ); error( log, e, "Error while shutting down embedded Tomcat." ); error( log, e, "IllegalAccessException for stop/destroy method in class " + embedded.getClass().getName() ); error( log, e, "Error while shutting down embedded Tomcat." ); error( log, e, "IllegalAccessException for stop/destroy method in class " + embedded.getClass().getName() ); error( log, e, "Error while shutting down embedded Tomcat." );
@Override public void run() { try { getInstance().shutdownAll( null ); } catch ( Exception e ) { // ignore, the exception should already have been reported } } } );
EmbeddedRegistry.getInstance().register( container );
/** * Retrieve the lazily initialized instance of the registry. * * @return singleton instance of the registry */ public static EmbeddedRegistry getInstance() { if ( instance == null ) { instance = new EmbeddedRegistry(); Runtime.getRuntime().addShutdownHook( new Thread() { @Override public void run() { try { getInstance().shutdownAll( null ); } catch ( Exception e ) { // ignore, the exception should already have been reported } } } ); } return instance; }
/** * Shuts down all embedded tomcats which got started up to now. * * @throws org.apache.maven.plugin.MojoExecutionException * if shutting down one or all servers failed */ public void execute() throws MojoExecutionException { if ( skip ) { getLog().info( "skip execution" ); return; } try { EmbeddedRegistry.getInstance().shutdownAll( getLog() ); } catch ( Exception e ) { if ( !skipErrorOnShutdown ) { throw new MojoExecutionException( messagesProvider.getMessage( "ShutdownMojo.shutdownError" ), e ); } } } }
/** * Shuts down all embedded tomcats which got started up to now. * * @throws MojoExecutionException if shutting down one or all servers failed */ public void execute() throws MojoExecutionException { if ( skip ) { getLog().info( "skip execution" ); return; } try { EmbeddedRegistry.getInstance().shutdownAll( getLog() ); } catch ( Exception e ) { if ( !skipErrorOnShutdown ) { throw new MojoExecutionException( messagesProvider.getMessage( "ShutdownMojo.shutdownError" ), e ); } } } }
/** * Shuts down all embedded tomcats which got started up to now. * * @throws org.apache.maven.plugin.MojoExecutionException * if shutting down one or all servers failed */ public void execute() throws MojoExecutionException { if ( skip ) { getLog().info( "skip execution" ); return; } try { EmbeddedRegistry.getInstance().shutdownAll( getLog() ); } catch ( Exception e ) { if ( !skipErrorOnShutdown ) { throw new MojoExecutionException( messagesProvider.getMessage( "ShutdownMojo.shutdownError" ), e ); } } } }