/*
 * Copyright 2015 Cloudius Systems
 */
package com.scylladb.jmx.main;

import com.scylladb.jmx.api.APIConfig;
import com.scylladb.jmx.utils.RMIServerSocketFactoryImpl;

import org.apache.cassandra.db.ColumnFamilyStore;
import org.apache.cassandra.db.commitlog.CommitLog;
import org.apache.cassandra.db.compaction.CompactionManager;
import org.apache.cassandra.gms.Gossiper;
import org.apache.cassandra.gms.FailureDetector;
import org.apache.cassandra.locator.EndpointSnitchInfo;
import org.apache.cassandra.metrics.StreamingMetrics;
import org.apache.cassandra.net.MessagingService;
import org.apache.cassandra.service.CacheService;
import org.apache.cassandra.service.GCInspector;
import org.apache.cassandra.service.StorageProxy;
import org.apache.cassandra.service.StorageService;

public class Main {

    public static void main(String[] args) throws Exception {
        APIConfig.setConfig();
        System.out.println("Connecting to " + APIConfig.getBaseUrl());
        System.out.println("Starting the JMX server");
        RMIServerSocketFactoryImpl.maybeInitJmx();
        StorageService.getInstance();
        StorageProxy.getInstance();
        MessagingService.getInstance();
        CommitLog.getInstance();
        Gossiper.getInstance();
        EndpointSnitchInfo.getInstance();
        FailureDetector.getInstance();
        ColumnFamilyStore.register_mbeans();
        CacheService.getInstance();
        CompactionManager.getInstance();
        GCInspector.register();
        StreamingMetrics.register_mbeans();
        Thread.sleep(Long.MAX_VALUE);
    }

}

@@ -169,58 +169,8 @@
 l;%0A%0A
-import org.apache.cassandra.db.ColumnFamilyStore;%0A
 impo
@@ -429,62 +429,8 @@
 fo;%0A
-import org.apache.cassandra.metrics.StreamingMetrics;%0A
 impo
@@ -1232,53 +1232,8 @@
 ();%0A
-        ColumnFamilyStore.register_mbeans();%0A
     
@@ -1341,52 +1341,8 @@
 ();%0A
-        StreamingMetrics.register_mbeans();%0A
     

remove the pulling registration