01: package org.terracotta.modules.ehcache_1_3;
02:
03: import org.osgi.framework.BundleContext;
04: import org.terracotta.modules.ehcache.commons_1_0.EhcacheTerracottaCommonsConfigurator;
05:
06: import com.tc.object.bytecode.ClassAdapterFactory;
07: import com.tc.object.config.TransparencyClassSpec;
08:
09: public class EhcacheTerracottaConfigurator extends
10: EhcacheTerracottaCommonsConfigurator {
11: protected void addInstrumentation(BundleContext context) {
12: super .addInstrumentation(context);
13:
14: ClassAdapterFactory factory = new EhcacheCacheManagerClassAdapter();
15: TransparencyClassSpec spec = configHelper
16: .getOrCreateSpec(CACHE_MANAGER_CLASS_NAME_DOTS);
17: spec.setCustomClassAdapter(factory);
18: }
19:
20: protected String getExportedBundleName() {
21: return EHCACHE_13_BUNDLE_NAME;
22: }
23: }
|