Index: src/main/java/net/sf/ehcache/CacheManager.java
===================================================================
--- src/main/java/net/sf/ehcache/CacheManager.java	(revision 2605)
+++ src/main/java/net/sf/ehcache/CacheManager.java	(working copy)
@@ -54,6 +54,7 @@
 import java.io.InputStream;
 import java.lang.reflect.Method;
 import java.net.URL;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
@@ -1197,6 +1198,13 @@
     public CacheManagerPeerProvider getCacheManagerPeerProvider(String scheme) {
         return cacheManagerPeerProviders.get(scheme);
     }
+    
+    /**
+     * @return Read-only map of the registered {@link CacheManagerPeerProvider}s keyed by scheme.
+     */
+    public Map<String, CacheManagerPeerProvider> getCacheManagerPeerProviders() {
+        return Collections.unmodifiableMap(this.cacheManagerPeerProviders);
+    }
 
     /**
      * When CacheManage is configured as part of a cluster, a CacheManagerPeerListener will
Index: src/main/java/net/sf/ehcache/management/ManagedCacheManagerPeerProvider.java
===================================================================
--- src/main/java/net/sf/ehcache/management/ManagedCacheManagerPeerProvider.java	(revision 0)
+++ src/main/java/net/sf/ehcache/management/ManagedCacheManagerPeerProvider.java	(revision 0)
@@ -0,0 +1,31 @@
+/**
+ *  Copyright 2003-2010 Terracotta, Inc.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package net.sf.ehcache.management;
+
+import javax.management.MBeanServer;
+
+import net.sf.ehcache.distribution.CacheManagerPeerProvider;
+
+/**
+ * A CacheManagerPeerProvider that supports MBean registration
+ */
+public interface ManagedCacheManagerPeerProvider extends CacheManagerPeerProvider {
+    /**
+     * Register the peer provider with the MBeanServer 
+     */
+    public void register(MBeanServer mBeanServer);
+}

Property changes on: src/main/java/net/sf/ehcache/management/ManagedCacheManagerPeerProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Date Revision Author HeadURL Id
Added: svn:eol-style
   + native

Index: src/main/java/net/sf/ehcache/management/ManagementService.java
===================================================================
--- src/main/java/net/sf/ehcache/management/ManagementService.java	(revision 2605)
+++ src/main/java/net/sf/ehcache/management/ManagementService.java	(working copy)
@@ -18,6 +18,7 @@
 
 import net.sf.ehcache.CacheException;
 import net.sf.ehcache.Status;
+import net.sf.ehcache.distribution.CacheManagerPeerProvider;
 import net.sf.ehcache.event.CacheManagerEventListener;
 import net.sf.ehcache.hibernate.management.impl.EhcacheHibernateMbeanNames;
 
@@ -29,6 +30,7 @@
 import javax.management.ObjectName;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
 import java.util.Set;
 
 import org.slf4j.Logger;
@@ -156,6 +158,8 @@
         try {
             registerCacheManager(cacheManager);
 
+            registerPeerProviders();
+
             List caches = cacheManager.getCaches();
             for (int i = 0; i < caches.size(); i++) {
                 Cache cache = (Cache) caches.get(i);
@@ -170,6 +174,16 @@
         backingCacheManager.getCacheManagerEventListenerRegistry().registerListener(this);
     }
 
+
+    private void registerPeerProviders() {
+        final Map<String, CacheManagerPeerProvider> cacheManagerPeerProviders = this.backingCacheManager.getCacheManagerPeerProviders();
+        for (final CacheManagerPeerProvider cacheManagerPeerProvider : cacheManagerPeerProviders.values()) {
+            if (cacheManagerPeerProvider instanceof ManagedCacheManagerPeerProvider) {
+                ((ManagedCacheManagerPeerProvider)cacheManagerPeerProvider).register(this.mBeanServer);
+            }
+        }
+    }
+
     private void registerCacheManager(CacheManager cacheManager) throws InstanceAlreadyExistsException,
             MBeanRegistrationException, NotCompliantMBeanException {
         if (registerCacheManager) {
