code: public void startLifeCycle(Extension ext) throws DatabaseException, DatabaseUnsupportedException {
          ext.init();
          ext.databaseOpen(model.getDb());
          ext.initModel(model);
          ext.initXML(model.getSession(), model.getOptionsParam());
          ext.initView(view);
          
          ExtensionHook extHook = new ExtensionHook(model, view);
          extensionHooks.put(ext, extHook);
          try {
              ext.hook(extHook);
  
              hookContextDataFactories(ext, extHook);
              hookApiImplementors(ext, extHook);
  
              if (view != null) {
                  // no need to hook view if no GUI
                  hookView(ext, view, extHook);
                  hookMenu(view, extHook);
              }
              
              hookOptions(extHook);
              hookProxies(extHook);
              ext.optionsLoaded();
              ext.postInit();
          } catch (Exception e) {
              logExtensionInitError(ext, e);
          }
          
          ext.start();
  
          Proxy proxy = Control.getSingleton().getProxy();
          hookProxyListeners(proxy, extHook.getProxyListenerList());
          hookOverrideMessageProxyListeners(proxy, extHook.getOverrideMessageProxyListenerList());
          hookPersistentConnectionListeners(proxy, extHook.getPersistentConnectionListener());
          hookConnectRequestProxyListeners(proxy, extHook.getConnectRequestProxyListeners());
  
          if (view != null) {
              hookSiteMapListeners(view.getSiteTreePanel(), extHook.getSiteMapListenerList());
          }
      }
docs: Initialize a specific Extension
  @param ext the Extension that need to be initialized
  @throws DatabaseUnsupportedException
  @throws DatabaseException