00001 00004 package org.openmobileis.bundle.osgi.services; 00005 00006 import org.openmobileis.common.context.ApplicationContextManager; 00007 import org.osgi.framework.BundleContext; 00008 00013 public final class BunbleContextManager { 00014 private static BunbleContextManager manager; 00015 private BundleContext bundleContext; 00016 00017 private BunbleContextManager() { 00018 00019 } 00020 00021 public final static BunbleContextManager getManager() { 00022 if (manager == null) { 00023 synchronized (BunbleContextManager.class) { 00024 if (manager == null) { 00025 manager = new BunbleContextManager(); 00026 ApplicationContextManager.getManager().addManager(manager); 00027 } 00028 } 00029 00030 } 00031 return manager; 00032 } 00033 00034 public BundleContext getBundleContext() { 00035 return bundleContext; 00036 } 00037 00038 public void setBundleContext(BundleContext bundleContext) { 00039 this.bundleContext = bundleContext; 00040 } 00041 00042 }