@ManagedOperation
    public void run() {
        // state checking not atomic
        switch (state.get()) {
        case STARTING:
        case PAUSED:
        case STOPPED:
        case FAILED:
            state.set(RUNNING);
            break;
        default:
            throw new IllegalStateException("Unable to run service with state " + state);
        }
    }