diff --git a/src/java/voldemort/client/AbstractStoreClientFactory.java b/src/java/voldemort/client/AbstractStoreClientFactory.java index 525aeb4001..87476fe2db 100644 --- a/src/java/voldemort/client/AbstractStoreClientFactory.java +++ b/src/java/voldemort/client/AbstractStoreClientFactory.java @@ -298,9 +298,9 @@ public Store getRawStore(String storeName, store = new LoggingStore(store); if(isJmxEnabled) { - store = new StatTrackingStore(store, this.stats); - // store = statStore; - JmxUtils.registerMbean(new StoreStatsJmx(((StatTrackingStore) store).getStats()), + StatTrackingStore statStore = new StatTrackingStore(store, this.stats); + store = statStore; + JmxUtils.registerMbean(new StoreStatsJmx(statStore.getStats()), JmxUtils.createObjectName(JmxUtils.getPackageName(store.getClass()), store.getName() + JmxUtils.getJmxId(jmxId)));