added StopCommand and moved checkJmx to Factory