• How to shut down a running application from a module (ModuleShutdownApplication)

    This article shows how to shut down a running Wowza application from a module. Shutting down an application using this method allows all other applications on the Wowza media server to continue running, which means that you can edit an application and restart it without disrupting clients connected to other running applications.

    Note: Wowza Media Server™ 3.6.3 or later is required.

    The following code snippet shows the proper way to shut down a running application from a module:
    import com.wowza.wms.application.*;
    import com.wowza.wms.vhost.*;
    public class ModuleShutdownApplication
    	private IApplicationInstance appInstance = null;
    	public void onAppStart(IApplicationInstance appInstance)
    		this.appInstance =appInstance;
    	public void shutdownApplication()
    		String appName = this.appInstance.getApplication().getName();
    		IVHost vhost = this.appInstance.getVHost();
    Note: An alternative method to stopping an application is to use the JMX interface to the Wowza API.

    If you're having problems or want to discuss this article, post in our forum.