01: /*
02: * All content copyright (c) 2003-2007 Terracotta, Inc., except as may otherwise be noted in a separate copyright
03: * notice. All rights reserved.
04: */
05: package org.terracotta.modules.jetty_6_1;
06:
07: import org.osgi.framework.BundleContext;
08: import org.terracotta.modules.configuration.TerracottaConfiguratorModule;
09: import org.terracotta.modules.jetty_6_1.adapters.ClassPathAdapter;
10: import org.terracotta.modules.jetty_6_1.adapters.WebAppClassLoaderAdapter;
11:
12: import com.tc.object.config.StandardDSOClientConfigHelper;
13:
14: public final class JettyConfigurator extends
15: TerracottaConfiguratorModule {
16:
17: protected void addInstrumentation(final BundleContext context) {
18: addLoaderAdapters(configHelper);
19: }
20:
21: private void addLoaderAdapters(
22: final StandardDSOClientConfigHelper config) {
23: config.addCustomAdapter("org.mortbay.start.Classpath",
24: new ClassPathAdapter());
25: config.addCustomAdapter(
26: "org.mortbay.jetty.webapp.WebAppClassLoader",
27: new WebAppClassLoaderAdapter());
28: }
29:
30: }
|