01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.management.remote.protocol;
05:
06: import java.util.Map;
07:
08: import com.tc.management.remote.protocol.terracotta.ServerProvider;
09:
10: public final class ProtocolProvider {
11:
12: private static final String JMX_DEFAULT_CLASSLOADER_PROP = "jmx.remote.default.class.loader";
13: private static final String JMX_PROVIDER_CLASSLOADER_PROP = "jmx.remote.protocol.provider.class.loader";
14: private static final String JMX_PROVIDER_PROP = "jmx.remote.protocol.provider.pkgs";
15:
16: public static void addTerracottaJmxProvider(final Map environment) {
17: environment.put(JMX_DEFAULT_CLASSLOADER_PROP,
18: ProtocolProvider.class.getClassLoader());
19: environment.put(JMX_PROVIDER_CLASSLOADER_PROP,
20: ServerProvider.class.getClassLoader());
21: environment.put(JMX_PROVIDER_PROP, ProtocolProvider.class
22: .getPackage().getName());
23: }
24:
25: }
|