Init workspace root node. If it's the system workspace init jcr:system too.

@param wsConfig
@throws RepositoryException
778090
private void initWorkspace(WorkspaceEntry wsConfig) throws RepositoryException
   {

      WorkspaceContainer workspaceContainer = getWorkspaceContainer(wsConfig.getName());

      // touch independent components
      workspaceContainer.getComponentInstanceOfType(IdGenerator.class);

      // Init Root and jcr:system if workspace is system workspace
      WorkspaceInitializer wsInitializer =
         (WorkspaceInitializer)workspaceContainer.getComponentInstanceOfType(WorkspaceInitializer.class);
      RepositoryCreationSynchronizer synchronizer =
         (RepositoryCreationSynchronizer)getComponentInstanceOfType(RepositoryCreationSynchronizer.class);
      // The synchronizer will be used to synchronize all the cluster
      // nodes to prevent any concurrent jcr initialization i.e. EXOJCR-887
      synchronizer.waitForApproval(wsInitializer.isWorkspaceInitialized());

      SystemParametersPersistenceConfigurator sppc =
         (SystemParametersPersistenceConfigurator)parent
            .getComponentInstanceOfType(SystemParametersPersistenceConfigurator.class);

      if (sppc != null)
      {
         setInitializerAndValidateOverriddenParameters(wsConfig, wsInitializer);
      }

      wsInitializer.initWorkspace();
   }
1369867
@Override
    public void init(RestoreManagerConfig config, SnapshotJobManager jobManager) {
        this.config = config;
        this.jobManager = jobManager;
    }
776587
@Override
	public void init(Config config, TaskContext context) throws Exception {
		String yarnConfHome = config.get(SamzaConfigFactory.YARN_CONF_HOME_KEY);
		if (yarnConfHome != null && yarnConfHome.length() > 0) // if the property is set , otherwise, assume we are running in
            													// local mode and ignore this
			SystemsUtils.setHadoopConfigHome(yarnConfHome);
		
		String filename = config.get(SamzaConfigFactory.FILE_KEY);
		String filesystem = config.get(SamzaConfigFactory.FILESYSTEM_KEY);
		this.setName(config.get(SamzaConfigFactory.JOB_NAME_KEY));
		SerializationProxy wrapper = (SerializationProxy) SystemsUtils.deserializeObjectFromFileAndKey(filesystem, filename, this.getName());
		this.setProcessor(wrapper.processor);
		this.outputStreams = wrapper.outputStreams;
		
		// Init Processor and Streams
		this.getProcessor().onCreate(0);
		for (SamzaStream stream:this.outputStreams) {
			stream.onCreate();
		}
		
	}
1335203
public void addRepositoryClass(I_CmsRepository repository) throws CmsConfigurationException {

        // check if new repositories can still be added
        if (m_frozen) {
            throw new CmsConfigurationException(Messages.get().container(Messages.ERR_NO_CONFIG_AFTER_STARTUP_0));
        }
        m_repositoryList.add(repository);
    }
217719
public void registerWorkspace(final WorkspaceEntry wsConfig) throws RepositoryException,
      RepositoryConfigurationException
   {
      // Need privileges to manage repository.
      SecurityManager security = System.getSecurityManager();
      if (security != null)
      {
         security.checkPermission(JCRRuntimePermissions.MANAGE_REPOSITORY_PERMISSION);
      }

      try
      {
         SecurityHelper.doPrivilegedExceptionAction(new PrivilegedExceptionAction<Void>()
         {
            public Void run() throws RepositoryException, RepositoryConfigurationException
            {
               final boolean isSystem = config.getSystemWorkspaceName().equals(wsConfig.getName());

               if (getWorkspaceContainer(wsConfig.getName()) != null)
                  throw new RepositoryException("Workspace " + wsConfig.getName() + " already registered");

               final WorkspaceContainer workspaceContainer = new WorkspaceContainer(RepositoryContainer.this, wsConfig);
               registerComponentInstance(wsConfig.getName(), workspaceContainer);

               workspaceContainer.registerComponentInstance(wsConfig);

               workspaceContainer.registerComponentImplementation(StandaloneStoragePluginProvider.class);
               try
               {
                  final Class<?> containerType =
                     ClassLoading.forName(wsConfig.getContainer().getType(), RepositoryContainer.class);
                  workspaceContainer.registerComponentImplementation(containerType);
                  if (isSystem)
                  {
                     registerComponentInstance(new SystemDataContainerHolder((WorkspaceDataContainer)workspaceContainer
                        .getComponentInstanceOfType(WorkspaceDataContainer.class)));
                  }
               }
               catch (ClassNotFoundException e)
               {
                  throw new RepositoryConfigurationException("Class not found for workspace data container "
                     + wsConfig.getUniqueName() + " : " + e, e);
               }

               // cache type
               try
               {
                  String className = wsConfig.getCache().getType();
                  if (className != null && className.length() > 0)
                  {
                     workspaceContainer.registerComponentImplementation(ClassLoading.forName(className,
                        RepositoryContainer.class));
                  }
                  else
                     workspaceContainer.registerComponentImplementation(LinkedWorkspaceStorageCacheImpl.class);
               }
               catch (ClassNotFoundException e)
               {
                  log.warn("Workspace cache class not found " + wsConfig.getCache().getType()
                     + ", will use default. Error : " + e.getMessage());
                  workspaceContainer.registerComponentImplementation(LinkedWorkspaceStorageCacheImpl.class);
               }

               if (workspaceContainer.getComponentInstanceOfType(RPCService.class) != null)
               {
                  workspaceContainer.registerComponentImplementation(WorkspaceResumer.class);
               }

               if (workspaceContainer.getComponentInstanceOfType(QuotaManager.class) != null)
               {
                  workspaceContainer.registerComponentImplementation(WorkspaceQuotaManager.class);
               }

               workspaceContainer.registerComponentImplementation(CacheableWorkspaceDataManager.class);
               workspaceContainer.registerComponentImplementation(LocalWorkspaceDataManagerStub.class);
               workspaceContainer.registerComponentImplementation(ObservationManagerRegistry.class);

               if (wsConfig.getLockManager() != null && wsConfig.getLockManager().getType() != null)
               {
                  try
                  {
                     final Class<?> lockManagerType =
                        ClassLoading.forName(wsConfig.getLockManager().getType(), RepositoryContainer.class);
                     workspaceContainer.registerComponentImplementation(lockManagerType);
                  }
                  catch (ClassNotFoundException e)
                  {
                     throw new RepositoryConfigurationException("Class not found for workspace lock manager "
                        + wsConfig.getLockManager().getType() + ", container " + wsConfig.getUniqueName() + " : " + e,
                        e);
                  }
               }
               else
               {
                  throw new RepositoryConfigurationException(
                     "The configuration of lock manager is expected in container " + wsConfig.getUniqueName());
               }

               // Query handler
               if (wsConfig.getQueryHandler() != null)
               {
                  workspaceContainer.registerComponentImplementation(SearchManager.class);
                  workspaceContainer.registerComponentImplementation(QueryManager.class);
                  workspaceContainer.registerComponentImplementation(QueryManagerFactory.class);
                  workspaceContainer.registerComponentInstance(wsConfig.getQueryHandler());
                  if (isSystem)
                  {
                     workspaceContainer.registerComponentImplementation(SystemSearchManager.class);
                  }
               }

               // access manager
               if (wsConfig.getAccessManager() != null && wsConfig.getAccessManager().getType() != null)
               {
                  try
                  {
                     final Class<?> am = ClassLoading.forName(wsConfig.getAccessManager().getType(), RepositoryContainer.class);
                     workspaceContainer.registerComponentImplementation(am);
                  }
                  catch (ClassNotFoundException e)
                  {
                     throw new RepositoryConfigurationException(
                        "Class not found for workspace access manager " + wsConfig.getAccessManager().getType()
                           + ", container " + wsConfig.getUniqueName() + " : " + e, e);
                  }
               }

               // initializer
               final Class<?> initilizerType;
               if (wsConfig.getInitializer() != null && wsConfig.getInitializer().getType() != null)
               {
                  // use user defined
                  try
                  {
                     initilizerType = ClassLoading.forName(wsConfig.getInitializer().getType(), RepositoryContainer.class);
                  }
                  catch (ClassNotFoundException e)
                  {
                     throw new RepositoryConfigurationException("Class not found for workspace initializer "
                        + wsConfig.getInitializer().getType() + ", container " + wsConfig.getUniqueName() + " : " + e,
                        e);
                  }
               }
               else
               {
                  // use default
                  initilizerType = ScratchWorkspaceInitializer.class;
               }
               workspaceContainer.registerComponentImplementation(initilizerType);
               workspaceContainer.registerComponentImplementation(TransactionableResourceManager.class);
               workspaceContainer.registerComponentImplementation(SessionFactory.class);
               final LocalWorkspaceDataManagerStub wsDataManager =
                  (LocalWorkspaceDataManagerStub)workspaceContainer
                     .getComponentInstanceOfType(LocalWorkspaceDataManagerStub.class);

               if (isSystem)
               {
                  // system workspace
                  systemDataManager = wsDataManager;
                  registerComponentInstance(systemDataManager);
               }

               wsDataManager.setSystemDataManager(systemDataManager);

               if (!config.getWorkspaceEntries().contains(wsConfig))
                  config.getWorkspaceEntries().add(wsConfig);
               return null;
            }
         });

      }
      catch (PrivilegedActionException pae)
      {
         Throwable cause = pae.getCause();
         if (cause instanceof RepositoryConfigurationException)
         {
            throw (RepositoryConfigurationException)cause;
         }
         else if (cause instanceof RepositoryException)
         {
            throw (RepositoryException)cause;
         }
         else if (cause instanceof RuntimeException)
         {
            RuntimeException e = (RuntimeException)cause;
            int depth = 0;
            Throwable retval = e;
            while (retval.getCause() != null && depth < 100)
            {
               retval = retval.getCause();
               if (retval instanceof RepositoryException)
               {
                  throw new RepositoryException(retval.getMessage(), e);
               }
               else if (retval instanceof RepositoryConfigurationException)
               {
                  throw new RepositoryConfigurationException(retval.getMessage(), e);
               }
               else if (retval instanceof NameNotFoundException)
               {
                  throw new RepositoryException(retval.getMessage(), e);
               }
               depth++;
            }
            throw e;            
         }
         else
         {
            throw new RepositoryException(cause);
         }
      }      
   }
1041878
public void init(final Map<String, Map<String, DataSourceConfiguration>> dataSourceConfigurationMap,
                     final Map<String, RuleConfiguration> schemaRuleMap, final Authentication authentication, final Properties props) {
        for (Entry<String, Map<String, DataSourceConfiguration>> entry : dataSourceConfigurationMap.entrySet()) {
            configService.persistConfiguration(entry.getKey(), dataSourceConfigurationMap.get(entry.getKey()), schemaRuleMap.get(entry.getKey()), authentication, props, isOverwrite);
        }
        stateService.persistInstanceOnline();
        stateService.persistDataSourcesNode();
        listenerManager.initListeners();
    }
759785
protected void doMerge(NodeData mergeNode) throws RepositoryException
   {
      // let n' be the corresponding node of n in ws'.
      // find corr node for this node
      NodeData corrNode = getCorrNodeData(mergeNode);
      if (corrNode != null)
      {

         NodeData mergeVersion = getBaseVersionData(mergeNode, mergeSession);

         if (mergeVersion != null)
         {

            NodeData corrVersion = getBaseVersionData(corrNode, corrSession);

            if (corrVersion != null)
            {
               // let v be base version of n.
               // let v' be base version of n'.

               SessionDataManager mergeDataManager = mergeSession.getTransientNodesManager();

               PropertyData isCheckedOutProperty =
                  (PropertyData)mergeDataManager.getItemData(mergeNode, new QPathEntry(Constants.JCR_ISCHECKEDOUT, 0),
                     ItemType.PROPERTY);

               if (!ValueDataUtil.getBoolean(isCheckedOutProperty.getValues().get(0))
                  && isSuccessor(mergeVersion, corrVersion))
               {
                  // if v' is a successor of v and
                  // n is not checked-in doupdate(n, n').
                  doUpdate(mergeNode, corrNode);
               }
               else if (mergeVersion.getQPath().equals(corrVersion.getQPath())
                  || isPredecessor(mergeVersion, corrVersion))
               {
                  // else if v is equal to or a predecessor of v' doleave(n).
                  doLeave(mergeNode);
               }
               else
               {
                  // else dofail(n, v').
                  doFail(mergeNode, corrVersion);
               }
            }
            else
            {
               // else if n' is not versionable doleave(n)
               doLeave(mergeNode);
            }
         }
         else
         {
            // else if n is not versionable doupdate(n, n')
            doUpdate(mergeNode, corrNode);
         }
      }
      else
      {
         // if no such n' doleave(n).
         doLeave(mergeNode);
      }
   }
887656
private void initRemoteCommands(final RepositoryEntry config)
   {
      this.id = UUID.randomUUID().toString();
      registerNamespace = rpcService.registerCommand(new RemoteCommand()
      {

         public String getId()
         {
            return "org.exoplatform.services.jcr.impl.core.NamespaceRegistryImpl-registerNamespace-"
               + config.getName();
         }

         public Serializable execute(Serializable[] args) throws Throwable
         {
            if (!id.equals(args[0]))
            {
               try
               {
                  registerNamespace((String)args[1], (String)args[2], false);
               }
               catch (Exception e)
               {
                  LOG.warn("Could not register the namespace on other cluster nodes", e);
               }
            }
            return true;
         }
      });
      unregisterNamespace = rpcService.registerCommand(new RemoteCommand()
      {

         public String getId()
         {
            return "org.exoplatform.services.jcr.impl.core.NamespaceRegistryImpl-unregisterNamespace-"
               + config.getName();
         }

         public Serializable execute(Serializable[] args) throws Throwable
         {
            if (!id.equals(args[0]))
            {
               try
               {
                  unregisterNamespace((String)args[1], false);
               }
               catch (Exception e)
               {
                  LOG.warn("Could not unregister the namespace on other cluster nodes", e);
               }
            }
            return true;
         }
      });
   }
308127
void merge(RepositoryEntry entry)
   {
      merge((RepositoryInfo)entry);
      List<WorkspaceEntry> workspaceEntries = entry.workspaces;
      if (workspaceEntries == null || workspaceEntries.isEmpty())
      {
         return;
      }
      if (workspaces == null || workspaces.isEmpty())
      {
         this.workspaces = workspaceEntries;
         return;
      }
      Map<String, WorkspaceEntry> mWorkspaceEntries = new LinkedHashMap<String, WorkspaceEntry>();
      for (WorkspaceEntry wkEntry : workspaceEntries)
      {
         mWorkspaceEntries.put(wkEntry.getName(), wkEntry);
      }
      for (WorkspaceEntry wkEntry : workspaces)
      {
         mWorkspaceEntries.put(wkEntry.getName(), wkEntry);
      }
      this.workspaces = new ArrayList<WorkspaceEntry>(mWorkspaceEntries.values());
   }
134961
@Override
    public void internalInitialize(BeanDeployerEnvironment environment) {
        super.internalInitialize(environment);
        checkEJBTypeAllowed();
        checkConflictingRoles();
        checkObserverMethods();
        checkScopeAllowed();
    }
87486
private void initialize() {
        String sep;
        try {
            sep = GroupServiceConfiguration.getConfiguration().getNodeSeparator();
        } catch (Exception ex) {
            sep = DEFAULT_NODE_SEPARATOR;
        }
        groupNodeSeparator = sep;
        if (LOG.isDebugEnabled()) {
            LOG.debug("RDBMEntityGroupStore.initialize(): Node separator set to " + sep);
        }
    }
322991
@Override
    public void init(ServletConfig config) throws ServletException {
        LOGGER.info("Initializing filesystem resource servlet");
        super.init(config);

        final String directory = config.getInitParameter("directory");
        if (StringUtils.isNotBlank(directory)) {
            this.directory = directory;
        }

        final String absolute = config.getInitParameter("absolute");
        if (StringUtils.isNotBlank(absolute)) {
            this.absolute = BooleanUtil.valueOf(absolute);
        }
    }
567089
protected void restoreWorkspace() throws Throwable
   {
      boolean restored = true;
      RepositoryImpl repository = (RepositoryImpl)repositoryService.getRepository(repositoryName);
      try
      {
         RepositoryEntry reEntry = repository.getConfiguration();
         backupManager.restore(new BackupChainLog(backupChainLogFile), reEntry.getName(), wEntry, false);
      }
      catch (InvalidItemStateException e)
      {
         restored = false;
         throw new WorkspaceRestoreExeption("Workspace '" + "/" + repositoryName + "/" + wEntry.getName()
            + "' can not be restored! There was database error!", e);

      }
      catch (Throwable t) //NOSONAR
      {
         restored = false;
         throw new WorkspaceRestoreExeption("Workspace '" + "/" + repositoryName + "/" + wEntry.getName()
            + "' can not be restored!", t);

      }
      finally
      {
         if (!restored)
         {
            try
            {
               removeWorkspace(repository, wEntry.getName());
            }
            catch (Throwable thr) //NOSONAR
            {
               throw new WorkspaceRestoreExeption("Workspace '" + "/" + repositoryName + "/"
                  + wEntry.getName() + "' can not be restored!", thr);
            }
         }
      }
   }
1048455
private void initialize(NameNode nn, Configuration conf) throws IOException {
    // Register MBean first since pedingReplication refers to myFSMetrics
    this.registerMBean(conf); // register the MBean for the FSNamesystemStutus
    // This needs to be initialized first, since it is referenced by other
    // operations in the initialization.
    
    // Validate the Namespace Directory policy before loading them
    // get the location map (mounts/shared dirs/etc
    Map<URI, NNStorageLocation> locationMap = 
        ValidateNamespaceDirPolicy.validate(conf);
    
    pendingReplications = new PendingReplicationBlocks(
        conf.getInt("dfs.replication.pending.timeout.sec",
          -1) * 1000L, myFSMetrics);
    this.systemStart = now();
    this.fsLock = new ReentrantReadWriteLock(); // non-fair
    configManager = new ConfigManager(this, conf);
    setConfigurationParameters(conf);

    // This can be null if two ports are running. Should not rely on the value.
    // The getter for this is deprecated
    this.nameNodeAddress = nn.getNameNodeAddress();
    
    // Creating root for name node
    this.dir = new FSDirectory(this, conf, 
        NNStorageConfiguration.getNamespaceDirs(conf), 
        NNStorageConfiguration.getNamespaceEditsDirs(conf),
        locationMap);
    StartupOption startOpt = NameNode.getStartupOption(conf);
    
    this.dir.loadFSImage(startOpt, conf);
    long timeTakenToLoadFSImage = now() - systemStart;
    LOG.info("Finished loading FSImage in " + timeTakenToLoadFSImage + " msecs");
    LOG.info("Total number of inodes : " + getFilesAndDirectoriesTotal());
    NameNode.getNameNodeMetrics().fsImageLoadTime.set(
      (int) timeTakenToLoadFSImage);
    
    // load directories that enabled permission checking
    loadEnabledPermissionCheckingDirs(conf);
    
    // fast RQ and BR prcessing
    // make sure we have at least one thread, by default 1
    this.parallelProcessingThreads = Math.max(1,
        getConf().getInt("dfs.safemode.processing.threads", 16));
    this.parallelRQblocksPerShard = getConf().getInt(
        "dfs.safemode.fast.rq.blocks", 1000000);
    this.parallelBRblocksPerShard = getConf().getInt(
        "dfs.safemode.fast.br.blocks", 10000);
    this.parallelBRenabled = getConf().getBoolean("dfs.safemode.fast.br.enabled", true);
    
    this.safeMode = SafeModeUtil.getInstance(conf, this);
    this.safeMode.checkMode();
    if ("true".equals(conf.get("dfs.namenode.initialize.counting"))) {
      LOG.info("Start counting items in the file tree");
      dir.rootDir.countItems();
      LOG.info("Finish counting items in the file tree");
      INodeDirectory.ItemCounts counts = dir.rootDir.getItemCounts();
      LOG.info("Counting result: " +
        counts.numDirectories + " directories, " +
        counts.numFiles + " files, and " +
        counts.numBlocks + " blocks in file tree. " +
        blocksMap.size() + " blocks in block map.");
    } else {
      LOG.info("Skip counting items in the file tree");
    }

    // initialize heartbeat & leasemanager threads
    this.hbthread = new Daemon(new HeartbeatMonitor(conf));
    this.lmmonitor = leaseManager.new Monitor();
    this.lmthread = new Daemon(lmmonitor);

    // start heartbeat & leasemanager threads
    hbthread.start();
    lmthread.start();

    // initialize replication threads
    this.underreplthread = new Daemon(new UnderReplicationMonitor());
    this.overreplthread = new Daemon(new OverReplicationMonitor());
    this.raidEncodingTaskThread = new Daemon(new RaidEncodingTaskMonitor());

    // start replication threds
    underreplthread.start();
    overreplthread.start();
    raidEncodingTaskThread.start();
    

    this.hostsReader =
      new HostsFileReader(
        conf.get(FSConstants.DFS_HOSTS, ""),
        conf.get("dfs.hosts.exclude", ""),
        !conf.getBoolean("dfs.hosts.ignoremissing", false));

    this.dnthread = new Daemon(new DecommissionManager(this).new Monitor(
      conf.getInt("dfs.namenode.decommission.interval", 30),
      conf.getInt("dfs.namenode.decommission.nodes.per.interval", 5)));
    dnthread.start();
    
    if (this.automaticEditsRollingThread != null) {
      LOG.info("Starting Automatic Edits Rolling Thread...");
      this.automaticEditsRollingThread.start();
    }

    this.dnsToSwitchMapping = ReflectionUtils.newInstance(
      conf.getClass("topology.node.switch.mapping.impl", ScriptBasedMapping.class,
        DNSToSwitchMapping.class), conf);

    /* If the dns to swith mapping supports cache, resolve network
    * locations of those hosts in the include list,
    * and store the mapping in the cache; so future calls to resolve
    * will be fast.
    */
    if (dnsToSwitchMapping instanceof CachedDNSToSwitchMapping) {
      dnsToSwitchMapping.resolve(new ArrayList<String>(hostsReader.getHostNames()));
    }

    this.replicator = BlockPlacementPolicy.getInstance(
        conf,
        this,
        this.clusterMap,
        this.hostsReader,
        this.dnsToSwitchMapping,
        this);
    this.registerMXBean();
    // Whether or not to sync each addBlock() operation to the edit log.
    this.syncAddBlock = conf.getBoolean("dfs.sync.on.every.addblock", false);
    this.isInitialized = true;
  }
342003
@Override
   public void startElement(String namespaceURI, String localName, String name, Map<String, String> atts)
      throws RepositoryException
   {
      InternalQName elementName = locationFactory.parseJCRName(name).getInternalName();

      if (Constants.SV_NODE_NAME.equals(elementName))
      {
         // sv:node element

         // node name (value of sv:name attribute)
         String svName = getAttribute(atts, Constants.SV_NAME_NAME);
         if (svName == null)
         {
            throw new RepositoryException("Missing mandatory sv:name attribute of element sv:node");
         }
         String svId = getAttribute(atts, Constants.EXO_ID_NAME);
         if (svId == null)
         {
            throw new RepositoryException("Missing mandatory exo:id attribute of element sv:node");
         }

         ImportNodeData newNodeData;
         InternalQName currentNodeName;
         int nodeIndex = 1;
         NodeData parentData = getParent();
         if (!isFirstElementChecked)
         {
            if (!ROOT_NODE_NAME.equals(svName))
            {
               throw new RepositoryException("The first element must be root. But found '" + svName + "'");
            }

            isFirstElementChecked = true;
         }

         if (ROOT_NODE_NAME.equals(svName))
         {
            // remove the wrong root from the stack
            tree.pop();

            newNodeData = addChangesForRootNodeInitialization(parentData);
         }
         else
         {
            currentNodeName = locationFactory.parseJCRName(svName).getInternalName();
            nodeIndex = getNodeIndex(parentData, currentNodeName, null);
            newNodeData = new ImportNodeData(parentData, currentNodeName, nodeIndex);
            newNodeData.setOrderNumber(getNextChildOrderNum(parentData));
            newNodeData.setIdentifier(svId);
            changesLog.add(new ItemState(newNodeData, ItemState.ADDED, true, parentData.getQPath()));
         }
         tree.push(newNodeData);

         mapNodePropertiesInfo.put(newNodeData.getIdentifier(), new NodePropertiesInfo(newNodeData));
      }
      else
      {
         super.startElement(namespaceURI, localName, name, atts);
         if (Constants.SV_PROPERTY_NAME.equals(elementName))
         {
            String svId = getAttribute(atts, Constants.EXO_ID_NAME);
            if (svId == null)
            {
               throw new RepositoryException("Missing mandatory exo:id attribute of element sv:property");
            }
            propertyInfo.setIndentifer(svId);
         }
      }
   }
512581
private void initialize(ComponentContext context,
                            Map<String, Object> properties, ConfigurationAdmin configAdmin)
                    throws InvalidFileStoreConfigurationException {

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            SibTr.entry(tc, "initialize", new Object[] { context, properties });
        }
        this.properties = properties;
        this.bundleLocation = context.getBundleContext().getBundle().getLocation();
        
        // populate filestore
        SIBFileStore filestore = new SIBFileStoreImpl();
        populateFileStore(properties, filestore, configAdmin);

        // set bus properties
        // nothing to set for bus as only defaults are considered
        // uuid will be set by the processor
        SIBus bus = new SIBusImpl();

        // set the properties for mesagingengine object.first the queues or
        // topic is got from
        // Administration Config and list of SIBBestination is created
        // and then the localization list is created for those SIBdestination
        SIBMessagingEngine messagingEngine = new SIBMessagingEngineImpl();

        messagingEngine.setHighMessageThreshold((Long) properties
                        .get(JsAdminConstants.HIGHMESSAGETHRESHOLD));

        HashMap<String, BaseDestination> destinationList = new HashMap<String, BaseDestination>();
        HashMap<String, SIBLocalizationPoint> destinationLocalizationList = new HashMap<String, SIBLocalizationPoint>();

        // populate destinations of type QUEUE
        populateDestinations(properties, destinationList, destinationLocalizationList, messagingEngine.getName(), JsAdminConstants.QUEUE, configAdmin,
                             false);
        // populate destinations of type TOPICSPACE
        populateDestinations(properties, destinationList, destinationLocalizationList, messagingEngine.getName(), JsAdminConstants.TOPICSPACE, configAdmin,
                             false);
        //populate destinations of type ALIAS
        populateAliasDestinations(properties, destinationList, configAdmin);

        // processor will update the UUID via Admin.Since we dont get UUID info from server.xml
        messagingEngine.setDestinationList(destinationList);
        messagingEngine.setSibLocalizationPointList(destinationLocalizationList);

        // set all the constructed artifact to jsMEConfig
        jsMEConfig.setMessagingEngine(messagingEngine);
        jsMEConfig.setSIBFilestore(filestore);
        jsMEConfig.setSIBus(bus);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            SibTr.exit(tc, "initialize");
        }

    }
46995
public void init(Configuration configuration)
			throws Exception
	{
		String baseName = configuration.getBootstrapPropertyResolver().getProperty("ResourceBundleFactory.Bundle");
		if (baseName != null)
		{
			this.baseName = baseName;
		}
	}