//////////////////////////////////////////////////////////////////////////
        public void Init()
        {
            /*
            After calling this method, this Framework must:
            Be in the Bundle.STARTING state.
            Have a valid Bundle Context.
            Be at start level 0.
            Have event handling enabled.
            Have reified Bundle objects for all installed bundles.
            Have registered any framework services. For example, PackageAdmin, ConditionalPermissionAdmin, StartLevel.
            This Framework will not actually be started until start is called.

            This method does nothing if called when this Framework is in the Bundle.STARTING, Bundle.ACTIVE or Bundle.STOPPING states.
            */

            lock(m_lock)
            {
                if(getState() == BundleState.STARTING ||
                    getState() == BundleState.ACTIVE ||
                    getState() == BundleState.STOPPING)
                    return;

                m_shutdownResult = new FrameworkEvent(FrameworkEvent.Type.STOPPED, this, null);
                m_bundleRepository = new CBundleRepository(this);
                m_serviceRegistry = new CServiceRegistry(this);
                m_eventServer = new CEventServer();

                m_bundleListeners = new ListenerQueue<IBundleListener>();
                m_syncBundleListeners = new ListenerQueue<ISynchronousBundleListener>();
                m_frameworkListeners = new ListenerQueue<IFrameworkListener>();
                m_serviceListeners = new ListenerQueue<IServiceListener>();
                m_allServiceListeners = new ListenerQueue<IAllServiceListener>();

                if(getState() == BundleState.INSTALLED)
                    setState(BundleState.RESOLVED);
                setState(BundleState.STARTING);

                m_context = new CBundleContext(this, this);
                m_activator = new CSystemBundleActivator();
                m_activator.Start(m_context);
            }
        }
        //////////////////////////////////////////////////////////////////////////
        public void Init()
        {
            /*
            After calling this method, this Framework must:
            Be in the Bundle.STARTING state.
            Have a valid Bundle Context.
            Be at start level 0.
            Have event handling enabled.
            Have reified Bundle objects for all installed bundles.
            Have registered any framework services. For example, PackageAdmin, ConditionalPermissionAdmin, StartLevel.
            This Framework will not actually be started until start is called.

            This method does nothing if called when this Framework is in the Bundle.STARTING, Bundle.ACTIVE or Bundle.STOPPING states.
            */

            lock(m_lock)
            {
                if(m_state == BundleState.STARTING ||
                    m_state == BundleState.ACTIVE ||
                    m_state == BundleState.STOPPING)
                    return;

                m_bundleRepository = new CBundleRepository(this);
                m_serviceRegistry = new CServiceRegistry(this);
                m_eventServer = new CEventServer();

                m_bundleListeners = new ListenerQueue<IBundleListener>();
                m_syncBundleListeners = new ListenerQueue<ISynchronousBundleListener>();
                m_frameworkListeners = new ListenerQueue<IFrameworkListener>();
                m_serviceListeners = new ListenerQueue<IServiceListener>();
                m_allServiceListeners = new ListenerQueue<IAllServiceListener>();

                m_state = BundleState.STARTING;
                m_context = new CBundleContext(this, this);
                m_activator = new CSystemBundleActivator();
                m_activator.Start(m_context);
            }
        }