PersistenceDelegate.initialize()
612
protected void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out)
    {
        //
        // Get the bean and associated beanInfo for the source instance
        //
        ControlBean control = (ControlBean)oldInstance;
        BeanInfo beanInfo;
        try
        {
            beanInfo = Introspector.getBeanInfo(control.getClass());
        }
        catch (IntrospectionException ie)
        {
            throw new ControlException("Unable to locate BeanInfo", ie);
        }

        //
        // Cast the encoding stream to an XMLEncoder (only encoding supported) and then set
        // the stream owner to the bean being persisted
        //
        XMLEncoder xmlOut = (XMLEncoder)out;
        Object owner = xmlOut.getOwner();
        xmlOut.setOwner(control);
        try
        {

            //
            // The default implementation of property persistence will use BeanInfo to 
            // incrementally compare oldInstance property values to newInstance property values.   
            // Because the bean instance PropertyMap holds only the values that have been 
            // modified, this process can be optimized by directly writing out only the properties 
            // found in the map.
            //
            BeanPropertyMap beanMap = control.getPropertyMap();
            PropertyDescriptor [] propDescriptors = beanInfo.getPropertyDescriptors();
            for (PropertyKey pk : beanMap.getPropertyKeys())
            {
                //
                // Locate the PropertyDescriptor for the modified property, and use it to write
                // the property value to the encoder stream
                //
                String propName = pk.getPropertyName();
                boolean found = false;
                for (int i = 0; i < propDescriptors.length; i++)
                {
                    if (propName.equals(propDescriptors[i].getName()))
                    {
                        found = true;

                        // Only write the property if it is not flagged as transient
                        Object transientVal = propDescriptors[i].getValue("transient");
                        if (transientVal == null || transientVal.equals(Boolean.FALSE))
                        {
                            xmlOut.writeStatement(
                                new Statement(oldInstance, 
                                      propDescriptors[i].getWriteMethod().getName(),
                                      new Object [] {beanMap.getProperty(pk)}));
                        }
                    }
                }
                if (found == false)
                {
                    throw new ControlException("Unknown property in bean PropertyMap: " + pk);
                }
            }

            //
            // Get the bean context associated with the bean, and persist any nested controls
            //
            ControlBeanContext cbc = control.getControlBeanContext();
            if (cbc.size() != 0)
            {
                xmlOut.setPersistenceDelegate(ControlBeanContext.class, 
                                              new ContextPersistenceDelegate());

                Iterator nestedIter = cbc.iterator();
                while (nestedIter.hasNext())
                {
                    Object bean = nestedIter.next();
                    if (bean instanceof ControlBean)
                    {
                        xmlOut.writeStatement(
                            new Statement(cbc, "add", new Object [] { bean } ));
                    }
                }
            }

            //
            // Restore any listeners associated with the control
            //
            EventSetDescriptor [] eventSetDescriptors = beanInfo.getEventSetDescriptors();
            for (int i = 0; i < eventSetDescriptors.length; i++)
            {
                EventSetDescriptor esd = eventSetDescriptors[i];
                Method listenersMethod = esd.getGetListenerMethod();
                String addListenerName = esd.getAddListenerMethod().getName();
                if (listenersMethod != null)
                {
                    //
                    // Get the list of listeners, and then add statements to incrementally
                    // add them in the same order
                    //
                    try
                    {
                        Object [] lstnrs = (Object [])listenersMethod.invoke(control, 
                                                                             new Object []{});
                        for (int j = 0; j < lstnrs.length; j++)
                        {
                            //
                            // If this is a generated EventAdaptor class, then set the delegate
                            // explicitly
                            //
                            if (lstnrs[j] instanceof EventAdaptor)
                                xmlOut.setPersistenceDelegate(lstnrs[j].getClass(), 
                                                              new AdaptorPersistenceDelegate());
                            xmlOut.writeStatement(
                                new Statement(control, addListenerName, new Object [] {lstnrs[j]}));
                        }
                    }
                    catch (Exception iae)
                    {
                        throw new ControlException("Unable to initialize listeners", iae);
                    } 
                }
            }

            //
            // See if the control holds an implementation instance, if so, we need to include
            // it (and any nested controls or state) in the encoding stream
            //
            Object impl = control.getImplementation();
            if (impl != null)
            {

                //
                // Set the persistence delegate for the impl class to the Impl delegate,
                // set the current stream owner to the bean, and then write the implementation
                //
                Class implClass = impl.getClass(); 
                if (xmlOut.getPersistenceDelegate(implClass) instanceof DefaultPersistenceDelegate) 
                    xmlOut.setPersistenceDelegate(implClass, new ImplPersistenceDelegate());

                //
                // HACK: This bit of hackery pushes the impl into the persistence stream
                // w/out actually requiring it be used as an argument elsewhere, since there
                // is no public API on the bean that takes an impl instance as an argument.
                //
                xmlOut.writeStatement(
                    new Statement(impl, "toString", null));
            }
        }
        finally
        {
            // Restore the previous encoding stream owner
            xmlOut.setOwner(owner);
        }
    }
446651
@Override
  public void initialize() {
    if(databaseConnection == null) {
      return; // Supposedly we initialized already.
    }
    if(LOG.isDebugging()) {
      LOG.debugFine("Loading data from database connection.");
    }
    MultipleObjectsBundle bundle = databaseConnection.loadData();
    // Run at most once.
    databaseConnection = null;

    // Find DBIDs for bundle
    {
      DBIDs bids = bundle.getDBIDs();
      if(bids instanceof ArrayStaticDBIDs) {
        this.ids = (ArrayStaticDBIDs) bids;
      }
      else if(bids == null) {
        this.ids = DBIDUtil.generateStaticDBIDRange(bundle.dataLength());
      }
      else {
        this.ids = (ArrayStaticDBIDs) DBIDUtil.makeUnmodifiable(DBIDUtil.ensureArray(bids));
      }
    }
    // Replace id representation (it would be nicer if we would not need
    // DBIDView at all)
    this.idrep = new DBIDView(this.ids);
    relations.add(this.idrep);
    getHierarchy().add(this, idrep);

    DBIDArrayIter it = this.ids.iter();

    int numrel = bundle.metaLength();
    for(int i = 0; i < numrel; i++) {
      SimpleTypeInformation<?> meta = bundle.meta(i);
      @SuppressWarnings("unchecked")
      SimpleTypeInformation<Object> ometa = (SimpleTypeInformation<Object>) meta;
      WritableDataStore<Object> store = DataStoreUtil.makeStorage(ids, DataStoreFactory.HINT_DB, ometa.getRestrictionClass());
      for(it.seek(0); it.valid(); it.advance()) {
        store.put(it, bundle.data(it.getOffset(), i));
      }
      Relation<?> relation = new MaterializedRelation<>(ometa, ids, null, store);
      relations.add(relation);
      getHierarchy().add(this, relation);

      // Try to add indexes where appropriate
      for(IndexFactory<?> factory : indexFactories) {
        if(factory.getInputTypeRestriction().isAssignableFromType(ometa)) {
          @SuppressWarnings("unchecked")
          final IndexFactory<Object> ofact = (IndexFactory<Object>) factory;
          @SuppressWarnings("unchecked")
          final Relation<Object> orep = (Relation<Object>) relation;
          final Index index = ofact.instantiate(orep);
          Duration duration = LOG.isStatistics() ? LOG.newDuration(index.getClass().getName() + ".construction").begin() : null;
          index.initialize();
          if(duration != null) {
            LOG.statistics(duration.end());
          }
          getHierarchy().add(relation, index);
        }
      }
    }

    // fire insertion event
    eventManager.fireObjectsInserted(ids);
  }
1071052
@Override
    public void postInitModule() throws ModuleInitializationException {
        ManagementDelegate delegate = serverInterface.getManagementDelegate();
        if (delegate == null) {
            throw new ModuleInitializationException("Can't get a ManagementDelegate from Server.getModule()",
                                                    getRole());
        }
        worker.setManagementDelegate(delegate);
    }
952478
protected final void initialize() {
        // Enabling development mode forces these settings. This is somewhat inelegant, because to configure one of
        // these values differently will require disabling development mode and manually configure the remaining values.
        if (development) {
            loggingSettings.getLoggers().put("org.hibernate.SQL", Level.DEBUG);
            loggingSettings.getLoggers().put("com.metrink.croquet", Level.DEBUG);
        }

        // call the class's init method
        init();
    }
780056
protected void initJpa() {
    if (jpaPersistenceUnitName != null) {
      jpaEntityManagerFactory = JpaHelper.createEntityManagerFactory(jpaPersistenceUnitName);
    }
    if (jpaEntityManagerFactory != null) {
      sessionFactories.put(EntityManagerSession.class, new EntityManagerSessionFactory(jpaEntityManagerFactory, jpaHandleTransaction, jpaCloseEntityManager));
      JPAVariableSerializer jpaType = (JPAVariableSerializer) variableSerializers.getSerializerByName(JPAVariableSerializer.NAME);
      // Add JPA-type
      if (jpaType == null) {
        // We try adding the variable right after byte serializer, if available
        int serializableIndex = variableSerializers.getSerializerIndexByName(ValueType.BYTES.getName());
        if (serializableIndex > -1) {
          variableSerializers.addSerializer(new JPAVariableSerializer(), serializableIndex);
        } else {
          variableSerializers.addSerializer(new JPAVariableSerializer());
        }
      }
    }
  }
1217192
public void initialize(@Observes @Initialized(ApplicationScoped.class) Object ignore) {
        log.debugf("Initializing [%s]", this.getClass().getName());
        try {
            feedSessionListenerProducer = new BiFunction<String, Session, WsSessionListener>() {
                @Override
                public WsSessionListener apply(String key, Session session) {
                    // In the future, if we need other queues/topics that need to be listened to, we add them here.
                    final Endpoint endpoint = Constants.FEED_COMMAND_QUEUE;
                    BasicMessageListener<BasicMessage> busEndpointListener = new FeedBusEndpointListener(session, key,
                            endpoint);
                    return new BusWsSessionListener(Constants.HEADER_FEEDID, key, endpoint, busEndpointListener);
                }
            };
            wsEndpoints.getFeedSessions().addWsSessionListenerProducer(feedSessionListenerProducer);

            uiClientSessionListenerProducer = new BiFunction<String, Session, WsSessionListener>() {
                @Override
                public WsSessionListener apply(String key, Session session) {
                    // In the future, if we need other queues/topics that need to be listened to, we add them here.
                    final Endpoint endpoint = Constants.UI_COMMAND_QUEUE;
                    BasicMessageListener<BasicMessage> busEndpointListener = new UiClientBusEndpointListener(
                            commandContextFactory, busCommands, endpoint);
                    return new BusWsSessionListener(Constants.HEADER_UICLIENTID, key, endpoint, busEndpointListener);
                }
            };
            wsEndpoints.getUiClientSessions().addWsSessionListenerProducer(uiClientSessionListenerProducer);
        } catch (Exception e) {
            log.errorCouldNotInitialize(e, this.getClass().getName());
        }

    }
694843
private function initializeMapper() {
    // set the mapper
    $persistenceFacade = ObjectFactory::getInstance('persistenceFacade');
    if ($persistenceFacade->isKnownType($this->type)) {
      $this->mapper = $persistenceFacade->getMapper($this->type);
    }
    else {
      // initialize null mapper if not done already
      if (self::$nullMapper == null) {
        self::$nullMapper = new NullMapper();
      }
      $this->mapper = self::$nullMapper;
    }
  }
876073
public void start() throws PersistenceException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "start");

        String logFileName        = null;
        String permanentStoreFileName = null;
        String temporaryStoreFileName = null;

        String logFileProperty = _ms.getProperty(MessageStoreConstants.PROP_OBJECT_MANAGER_LOG_FILE_NAME,
                                                 MessageStoreConstants.PROP_OBJECT_MANAGER_LOG_FILE_NAME_DEFAULT);
        String logPrefix       = _ms.getProperty(MessageStoreConstants.PROP_OBJECT_MANAGER_LOG_FILE_PREFIX,
                                                 _configuration.getObjectManagerLogDirectory());
        String logSizeStr      = _ms.getProperty(MessageStoreConstants.PROP_OBJECT_MANAGER_LOG_FILE_SIZE, null);

        long logSize = _configuration.getObjectManagerLogSize();
        if (logSizeStr != null) logSize = Long.parseLong(logSizeStr);

        // Permanent Object Store properties
        String permanentStoreProperty       = _ms.getProperty(MessageStoreConstants.PROP_OBJECT_MANAGER_PERMANENT_STORE_FILE_NAME,
                                                              MessageStoreConstants.PROP_OBJECT_MANAGER_PERMANENT_STORE_FILE_NAME_DEFAULT);
        String permanentStorePrefix         = _ms.getProperty(MessageStoreConstants.PROP_OBJECT_MANAGER_PERMANENT_STORE_FILE_PREFIX,
                                                              _configuration.getObjectManagerPermanentStoreDirectory());

        // Temporary Object Store properties
        String temporaryStoreProperty       = _ms.getProperty(MessageStoreConstants.PROP_OBJECT_MANAGER_TEMPORARY_STORE_FILE_NAME,
                                                              MessageStoreConstants.PROP_OBJECT_MANAGER_TEMPORARY_STORE_FILE_NAME_DEFAULT);
        String temporaryStorePrefix         = _ms.getProperty(MessageStoreConstants.PROP_OBJECT_MANAGER_TEMPORARY_STORE_FILE_PREFIX,
                                                              _configuration.getObjectManagerTemporaryStoreDirectory());
        // 727994
        // Set _hasRedeliveryCountColumn to true because unlike datastore where we
        // check if redelivery count column exist or not we dont have to do the
        // same check for filestore as that column will be automatically available
        // depending upon the version of WAS
        // Persisting RedeliveryCount feature was introduced from WAS v8.5 onwards
        _ms.setRedeliveryCountColumn(true);

        // Defect 496893
        // First we need to start up our ObjectManager instance. We will retry this
        // for a pre-determined time period in order to allow for connectivity problems
        // to the file store files.
        boolean connected = false;
        long   retryLimit = System.currentTimeMillis() + _timeouts.getRetryTimeLimit();
        // Defect 549131
        // Set our starting flag so that we can detect if we are asked to 
        // stop while attempting to start the ObjectManager.
        _starting = true;
        do
        {
            // The directory creation needs to be in the retry loop as if we can't connect
            // once then the directory would never get created and may cause us to fail to
            // find our path even if the disc is available.
            logPrefix = createDirectoryPath(logPrefix);

            if (logPrefix.endsWith(File.separator))
            {
                logFileName = logPrefix+logFileProperty;
            }
            else
            {
                logFileName = logPrefix+File.separator+logFileProperty;
            }
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { 
            	SibTr.debug(this, tc, "User directory for ObjectManager log file defined: "+logPrefix);
            	SibTr.debug(this, tc, "The file store is attempting to initalise its log file:" + logFileName);
            }

            // As we do not know earlier whether we have access to our file system we need to do
            // our path name creation at this point. It still does not save us if our store
            // files and log file are on completely seperately network accessible locations
            // but it is slightly safer than doing it before the log starts up.
            permanentStorePrefix = createDirectoryPath(permanentStorePrefix);
            temporaryStorePrefix = createDirectoryPath(temporaryStorePrefix);

            // Figure out the real file names where we expect to find the permanent and temporary stores.
            // We use them to build the ObjectStoreLocations map to pass into the ObjectManager.
            if (permanentStorePrefix.endsWith(File.separator))
            {
                permanentStoreFileName = permanentStorePrefix+permanentStoreProperty;
            }
            else
            {
                permanentStoreFileName = permanentStorePrefix+File.separator+permanentStoreProperty;
            }
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Filename for ObjectManager permanent store is: "+permanentStoreFileName);

            if (temporaryStorePrefix.endsWith(File.separator))
            {
                temporaryStoreFileName = temporaryStorePrefix+temporaryStoreProperty;
            }
            else
            {
                temporaryStoreFileName = temporaryStorePrefix+File.separator+temporaryStoreProperty;
            }
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Filename for ObjectManager temporary store is: "+temporaryStoreFileName);

            // Populate the Map of ObjectStoreLocations
            storeLocations.put(PERMANENT_STORE_NAME, permanentStoreFileName);
            storeLocations.put(TEMPORARY_STORE_NAME, temporaryStoreFileName);

            try
            {
                // Defect 549131
                // Synchronize with the stop thread at this point so that one 
                // of two things happen:
                //  1) The stop thread gets in first. We need to avoid starting an object
                //     manager altogether.
                //  2) The start thread gets in first. The stop thread needs to wait so
                //     that its stop processing has the handle to the objectmanager to 
                //     call stop on.
                synchronized(this)
                {
                    if (_starting)
                    {
                        // Do we need to start from an empty file store or can
                        // we startup using an existing set of data?
                        // Either way, we need to register ourselves for any event callbacks.
                        if (_configuration.isCleanPersistenceOnStart())
                        {
                            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Clean starting the Persistence Layer.");
        
                            _objectManager = new ObjectManager(logFileName, ObjectManager.LOG_FILE_TYPE_CLEAR, storeLocations, new ObjectManagerEventCallback[]{this});
                        }
                        else
                        {
                            _objectManager = new ObjectManager(logFileName, ObjectManager.LOG_FILE_TYPE_FILE, storeLocations, new ObjectManagerEventCallback[]{this});
                        }

                        connected = true;
                    }
                }

            }
            catch (PermanentIOException pioe)
            {
                com.ibm.ws.ffdc.FFDCFilter.processException(pioe, "com.ibm.ws.sib.msgstore.persistence.objectManager.PersistableMessageStoreImpl.start", "1:397:1.81.1.6", this);
                if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) SibTr.event(this, tc, "Unable to start ObjectManager instance!", pioe);
                SibTr.error(tc, "FILE_STORE_UNEXPECTED_IO_EXCEPTION_SIMS1592");
                // This will drop through to the retry wait below.
            }
            catch (LogFileInUseException lfiue)
            {
                com.ibm.ws.ffdc.FFDCFilter.processException(lfiue, "com.ibm.ws.sib.msgstore.persistence.objectManager.PersistableMessageStoreImpl.start", "1:404:1.81.1.6", this);
                if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) SibTr.event(this, tc, "Unable to start ObjectManager instance!", lfiue);
                SibTr.error(tc, "FILE_STORE_LOG_FILE_IN_USE_SIMS1579");
                // This will drop through to the retry wait below.
            }
            catch (NonExistentLogFileException nelfe)
            {
                com.ibm.ws.ffdc.FFDCFilter.processException(nelfe, "com.ibm.ws.sib.msgstore.persistence.objectManager.PersistableMessageStoreImpl.start", "1:411:1.81.1.6", this);
                if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) SibTr.event(this, tc, "Unable to start ObjectManager instance!", nelfe);
                SibTr.error(tc, "FILE_STORE_CANNOT_FIND_LOG_FILE_SIMS1580", logFileName);
                if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "start");
                throw new SeverePersistenceException("Unable to locate the file path: " + nelfe.getMessage(), nelfe);
            }
            catch (ObjectManagerException ome)
            {
                com.ibm.ws.ffdc.FFDCFilter.processException(ome, "com.ibm.ws.sib.msgstore.persistence.objectManager.PersistableMessageStoreImpl.start", "1:418:1.81.1.6", this);
                if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) SibTr.event(this, tc, "Unexpected exception caught initializing file store!", ome);
                SibTr.error(tc, "FILE_STORE_UNEXPECTED_INITIALISATION_EXCEPTION_SIMS1591");
                if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "start");
                throw new SeverePersistenceException("Unexpected exception caught initializing file store: "+ome.getMessage(), ome);
            }

            // Defect 549131
            // Only go into the retry wait if we are still starting
            if (!connected && _starting)
            {
                // Have we taken longer to create the ObjectManager than our alloted
                // retry period?
                long currentTime = System.currentTimeMillis();
                if (currentTime < retryLimit)
                {
                    SibTr.info(tc, "FILE_STORE_PROBLEM_INITIALISING_LOG_SIMS1582");

                    // If we still have time to retry then we need to wait a while to
                    // avoid a hot loop and then try again.
                    try
                    {
                        synchronized(this)
                        {
                            wait(_timeouts.getRetryWaitTime());
                        }
                    }
                    catch (InterruptedException ie)
                    {
                        // No FFDC Code Needed.
                    }
                }
                else
                {
                    SibTr.error(tc, "FILE_STORE_INITIALISATION_RETRY_LIMIT_EXCEEDED_SIMS1583");

                    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "start");
                    throw new SeverePersistenceException("Retry time limit reached when starting file store!");
                }
            }
        // Defect 549131
        // If we were already waiting when the stop request came in our
        // notify should pop us out at which point this check will drop
        // us out of the while loop.
        } while (!connected && _starting); 

        // Defect 549131
        // Carry on starting up only if we have not been asked to stop.
        if (_starting)
        {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                SibTr.debug(this, tc, "The file store has initialised successfully.");
    
            // Note that the the OMgr is now up and running, so we do care if it stops
            _omgrStarted = true;
    
            // Now we need to open our ObjectStores and find our Anchor object.
            // Figure out the size properties
            // Permanent Object Store properties
            String minimumPermanentStoreSizeStr = _ms.getProperty(MessageStoreConstants.PROP_OBJECT_MANAGER_PERMANENT_STORE_FILE_MINIMUM_SIZE, null);
            String maximumPermanentStoreSizeStr = _ms.getProperty(MessageStoreConstants.PROP_OBJECT_MANAGER_PERMANENT_STORE_FILE_MAXIMUM_SIZE, null);
    
            long minimumPermanentStoreSize = _configuration.getObjectManagerMinimumPermanentStoreSize();
            if (minimumPermanentStoreSizeStr != null) minimumPermanentStoreSize = Long.parseLong(minimumPermanentStoreSizeStr);
            long maximumPermanentStoreSize = _configuration.getObjectManagerMaximumPermanentStoreSize();
            if (maximumPermanentStoreSizeStr != null) maximumPermanentStoreSize = Long.parseLong(maximumPermanentStoreSizeStr);
    
            boolean isPermanentStoreSizeUnlimited = _configuration.isObjectManagerPermanentStoreSizeUnlimited();
    
            // Temporary Object Store properties
            String minimumTemporaryStoreSizeStr = _ms.getProperty(MessageStoreConstants.PROP_OBJECT_MANAGER_TEMPORARY_STORE_FILE_MINIMUM_SIZE, null);
            String maximumTemporaryStoreSizeStr = _ms.getProperty(MessageStoreConstants.PROP_OBJECT_MANAGER_TEMPORARY_STORE_FILE_MAXIMUM_SIZE, null);
    
            long minimumTemporaryStoreSize = _configuration.getObjectManagerMinimumTemporaryStoreSize();
            if (minimumTemporaryStoreSizeStr != null) minimumTemporaryStoreSize = Long.parseLong(minimumTemporaryStoreSizeStr);
            long maximumTemporaryStoreSize = _configuration.getObjectManagerMaximumTemporaryStoreSize();
            if (maximumTemporaryStoreSizeStr != null) maximumTemporaryStoreSize = Long.parseLong(maximumTemporaryStoreSizeStr);
    
            boolean isTemporaryStoreSizeUnlimited = _configuration.isObjectManagerTemporaryStoreSizeUnlimited();

            // common properties
            String storeFullWaitForCheckPointStr = _ms.getProperty(MessageStoreConstants.PROP_OBJECT_MANAGER_STORE_FULL_WAIT_FOR_CHECKPOINT,
                                                                   MessageStoreConstants.PROP_OBJECT_MANAGER_STORE_FULL_WAIT_FOR_CHECKPOINT_DEFAULT);
            boolean storeFullWaitForCheckPoint = Boolean.parseBoolean(storeFullWaitForCheckPointStr);


            // Defect 533310
            // Read the object store object cache size properties
            String permanentStoreObjectCacheSizeStr = _ms.getProperty(MessageStoreConstants.PROP_OBJECT_MANAGER_PERMANENT_STORE_CACHE_SIZE, 
                                                                      MessageStoreConstants.PROP_OBJECT_MANAGER_PERMANENT_STORE_CACHE_SIZE_DEFAULT);
    
            int permanentStoreObjectCacheSize = Integer.parseInt(permanentStoreObjectCacheSizeStr);
    
            String temporaryStoreObjectCacheSizeStr = _ms.getProperty(MessageStoreConstants.PROP_OBJECT_MANAGER_TEMPORARY_STORE_CACHE_SIZE, 
                                                                      MessageStoreConstants.PROP_OBJECT_MANAGER_TEMPORARY_STORE_CACHE_SIZE_DEFAULT);
    
            int temporaryStoreObjectCacheSize = Integer.parseInt(temporaryStoreObjectCacheSizeStr);
    
            Transaction transaction = null;
    
            try
            {
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                    SibTr.debug(this, tc, "The file store is attempting to start its permanent store (" + PERMANENT_STORE_NAME + ") and temporary store (" + TEMPORARY_STORE_NAME + ")");
    
                // Defect 298902
                // If we are warm started then we should find an existing
                // set of object stores. If we are cold started then we
                // need to create them.
                if (_objectManager.warmStarted())
                {
                    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Object Manager Warm Started");
    
                    try
                    {
                        // If we have an 'oldPermanentStoreName' we'll need to open that
                        // and rename it, otherwise we just open the 'proper' name.
                        if (oldPermanentStore == null)
                        {
                            _permanentStore = _objectManager.getObjectStore(PERMANENT_STORE_NAME);
                            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Permanent Store Found");
                        }
                        else
                        {
                            _permanentStore = _objectManager.getObjectStore(oldPermanentStore);
                            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Old Permanent Store Found");
                            _permanentStore.setName(PERMANENT_STORE_NAME);
                            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Old Permanent Store Renamed");
                        }
                        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                            SibTr.debug(this, tc, "The file stores permanent store has been started successfully.");
    
                        // If we have an 'oldTemporaryStoreName' we'll need to open that
                        // and rename it, otherwise we just open the 'proper' name.
                        if (oldTemporaryStore == null)
                        {
                            _temporaryStore = _objectManager.getObjectStore(TEMPORARY_STORE_NAME);
                            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Temporary Store Found");
                        }
                        else
                        {
                            _temporaryStore = _objectManager.getObjectStore(oldTemporaryStore);
                            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Old Temporary Store Found");
                            _temporaryStore.setName(TEMPORARY_STORE_NAME);
                            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Old Temporary Store Renamed");
                        }

                        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                            SibTr.debug(this, tc, "The file stores temporary store has been started successfully.");
    
                        // Set the size of our files.
                        setFileSizesAfterRestart(false,
                                                 minimumPermanentStoreSize, maximumPermanentStoreSize, isPermanentStoreSizeUnlimited,
                                                 minimumTemporaryStoreSize, maximumTemporaryStoreSize, isTemporaryStoreSizeUnlimited,
                                                 logSize);
                    }
                    catch (UnknownObjectStoreException uose)
                    {
                        com.ibm.ws.ffdc.FFDCFilter.processException(uose, "com.ibm.ws.sib.msgstore.persistence.objectManager.PersistableMessageStoreImpl.start", "1:572:1.81.1.6", this);
                        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) SibTr.event(this, tc, "ObjectStore not found after warm start!", uose);
                        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "start");
                        throw new SeverePersistenceException("ObjectStore not found after warm start!");
                    }
                }
                else
                {
                    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Object Manager Cold Started");
    
                    // Create the permanent store.
                    _permanentStore = new SingleFileObjectStore(PERMANENT_STORE_NAME, _objectManager, ObjectStore.STRATEGY_KEEP_ALWAYS);
                    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                    	SibTr.debug(this, tc, "The file stores permanent store has been started successfully.");
                    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Permanent Store Created");
    
                    // Create the temporary store.                                        // Defect 291558, empty this store on restart
                    _temporaryStore = new SingleFileObjectStore(TEMPORARY_STORE_NAME, _objectManager, ObjectStore.STRATEGY_KEEP_UNTIL_NEXT_OPEN);
                    
                    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                    	SibTr.debug(this, tc, "The file stores temporary store has been started successfully.");
                    
                    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Temporary Store Created");
    
                    // Set the size of our files.
                    setFileSizesAfterRestart(true,
                                             minimumPermanentStoreSize, maximumPermanentStoreSize, isPermanentStoreSizeUnlimited,
                                             minimumTemporaryStoreSize, maximumTemporaryStoreSize, isTemporaryStoreSizeUnlimited,
                                             logSize);
                }

                // set the storeFullWaitForCheckpoint property
                _permanentStore.setStoreFullWaitForCheckPoint(storeFullWaitForCheckPoint);
                _temporaryStore.setStoreFullWaitForCheckPoint(storeFullWaitForCheckPoint);

                // Defect 533310
                // Set the cache sizes on the object stores
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Permanent store object cache size set to: "+permanentStoreObjectCacheSize);
                ((SingleFileObjectStore)_permanentStore).setCachedManagedObjectsSize(permanentStoreObjectCacheSize);
    
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Temporary store object cache size set to: "+temporaryStoreObjectCacheSize);
                ((SingleFileObjectStore)_temporaryStore).setCachedManagedObjectsSize(temporaryStoreObjectCacheSize);
    
    
                // Once we have our ObjectStore references we now need our
                // Anchor object. If we have cold started or done a clean warm
                // start then we need to create the Anchor. If not we should
                // find it in the ObjectManager.
                _anchorToken = _objectManager.getNamedObject("Anchor", null);
    
                if (_anchorToken != null)
                {
                    _anchor = (Anchor)_anchorToken.getManagedObject();
    
                    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Stored Anchor Found");
                }
                else
                {
                    // If we didn't manage to create the Anchor last time
                    // then we need to do it now.
                    transaction = _objectManager.getTransaction();
    
                    // Create and allocate a new Anchor.
                    _anchor      = new Anchor();
                    _anchorToken = _permanentStore.allocate(_anchor);
    
                    // Add Anchor to transaction.
                    transaction.add(_anchor);
    
                    // Add Anchor's token to the ObjectManager as a named object.
                    _objectManager.putNamedObject("Anchor", _anchorToken, transaction);
    
                    transaction.commit(false);
    
                    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Stored Anchor Created");
                }
            }
            catch (ObjectManagerException ome)
            {
                com.ibm.ws.ffdc.FFDCFilter.processException(ome, "com.ibm.ws.sib.msgstore.persistence.objectManager.PersistableMessageStoreImpl.start", "1:647:1.81.1.6", this);
                if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) SibTr.event(this, tc, "Unexpected exception caught starting permanent and temporary stores!", ome);
    
                if (transaction != null)
                {
                    try
                    {
                        // Clean up our ObjectManager work.
                        transaction.backout(false);
                    }
                    catch (ObjectManagerException e)
                    {
                        com.ibm.ws.ffdc.FFDCFilter.processException(e, "com.ibm.ws.sib.msgstore.persistence.objectManager.PersistableMessageStoreImpl.start", "1:659:1.81.1.6", this);
                        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) SibTr.event(this, tc, "Exception caught backing out persistent message store startup work!", e);
                    }
                }
    
                if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "start");
                throw new SeverePersistenceException("Unexpected exception caught starting permanent and temporary stores: "+ome.getMessage(), ome);
            }
    
            // Check the ME_UUID and update our INC_UUID.
            // If we are successful then carry on with startup.
            if (checkAndUpdateMEOwner(_meOwner))
            {
                // Start the unique key generator manager.
                _uniqueKeyManager.start(_anchor, _objectManager, _permanentStore);
    
                // Defect 530772
                // Create the batching context factory.
                _batchingContextFactory = new BatchingContextFactoryImpl(_objectManager, _temporaryStore);
    
                // Create and start the spill dispatcher.
                _spillDispatcher = new SpillDispatcher(_ms, _batchingContextFactory);
                _spillDispatcher.start();
    
                // Defect 363755
                // Only become available once we have finished starting.
                _available = true;
                
                if(TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                    SibTr.debug(this, tc, "The file store has started successfully.");
            }
        } // if (_starting)
        else
        {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) SibTr.event(this, tc, "Startup processing halted as a stop was requested!");
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "start");
            throw new PersistenceException("Startup processing halted as a stop was requested!");
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "start");
    }
94908
public void initialiseNonPersistent(MessageProcessor messageProcessor,
                                      SIMPTransactionManager txManager)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "initialiseNonPersistent", messageProcessor);

    //Release 1 has no Link Bundle IDs for this Neighbour

    // Cache the reference to the message processor
    _messageProcessor = messageProcessor;

    // Create the ObjectPool that will be used to store the 
    // subscriptionMessages.  Creating with an intial length of
    // 2, but this could be made a settable parameter for performance
    _subscriptionMessagePool = new ObjectPool("SubscriptionMessages", NUM_MESSAGES);

    // Create a new object to contain all the Neighbours
    _neighbours = new Neighbours(this, _messageProcessor.getMessagingEngineBus());

    // Create a new LockManager instance
    _lockManager = new LockManager();
    
    // Assign the transaction manager
    _transactionManager = txManager;
            
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "initialiseNonPersistent");
  }
493946
public static void initialize(Object instance, Map namedArgs) {
        PersistentEntity dc = getDomainClass(instance);
        if (dc == null) {
            DataBindingUtils.bindObjectToInstance(instance, namedArgs);
        }
        else {
            DataBindingUtils.bindObjectToDomainInstance(dc, instance, namedArgs);
            DataBindingUtils.assignBidirectionalAssociations(instance, namedArgs, dc);
        }
        autowire(instance);
    }
716923
@Override
    public void initialize(JsMessagingEngine engine) {
        if (TraceComponent.isAnyTracingEnabled()
            && tc.isEntryEnabled())
            SibTr.entry(tc, "initialize", engine);

        this._engine = engine;

        //Venu mock mock
        //This is needed for MELockOwner in PersistentMessageStoreImpl' initialize. However the MELockOwer object not really relevant
        // as uuid check is disabled in PersistentMessageStoreImpl
        // In case of warm start, after reconstiturion _engine Messaging Engine Uuid is reset from restored Uuid
        this._engine.setMEUUID(new SIBUuid8());

        _mpio = new MPIO(this);

        _meFactories = new HashMap<String, Object>();
        try {
            _meFactories.put(SIMPConstants.JS_MBEAN_FACTORY, engine.getMBeanFactory());
        } catch (Exception e) {

            // FFDC
            FFDCFilter.processException(
                                        e,
                                        "com.ibm.ws.sib.processor.impl.MessageProcessor.initialize",
                                        "1:1202:1.445",
                                        this);

            SIErrorException finalE =
                            new SIErrorException(
                                            nls.getFormattedMessage(
                                                                    "INTERNAL_MESSAGING_ERROR_CWSIP0002",
                                                                    new Object[] { "com.ibm.ws.sib.processor.impl.MessageProcessor", "1:1209:1.445", e },
                                                                    null),
                                            e);

            SibTr.exception(tc, finalE);
            SibTr.error(tc, "INTERNAL_MESSAGING_ERROR_CWSIP0002",
                        new Object[] { "com.ibm.ws.sib.processor.impl.MessageProcessor", "1:1215:1.445", SIMPUtils.getStackTrace(e) });

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

            throw finalE;

        }

        // Obtain instances of all singleton factories to be used in mp.
        // Initialize is the only place we can get the instance and handle
        // and exceptions correctly.

        if (_factories == null) {
            _factories = new HashMap<String, Object>();
            try {
                _factories.put(SIMPConstants.JS_DESTINATION_ADDRESS_FACTORY,
                               JsMainAdminComponentImpl.getSIDestinationAddressFactory());
                _factories.put(SIMPConstants.SI_DESTINATION_ADDRESS_FACTORY,
                               JsMainAdminComponentImpl.getSIDestinationAddressFactory());
                _factories.put(SIMPConstants.CONTROL_MESSAGE_FACTORY,
                               ControlMessageFactory.getInstance());
                _factories.put(SIMPConstants.JS_ADMIN_FACTORY, JsAdminFactory
                                .getInstance());

                // Matching instance
                _factories.put(SIMPConstants.MATCHING_INSTANCE, Matching
                                .getInstance());

                // SelectionCriteria
                _factories.put(SIMPConstants.JS_SELECTION_CRITERIA_FACTORY,
                               JsMainAdminComponentImpl.getSelectionCriteriaFactory());

                _factories.put(SIMPConstants.JS_MESSAGE_HANDLE_FACTORY,
                               JsMessageHandleFactory.getInstance());
            } catch (Exception e) {
                // FFDC
                FFDCFilter
                                .processException(
                                                  e,
                                                  "com.ibm.ws.sib.processor.impl.MessageProcessor.initialize",
                                                  "1:1261:1.445", this);

                SIErrorException finalE = new SIErrorException(
                                nls
                                                .getFormattedMessage(
                                                                     "INTERNAL_MESSAGING_ERROR_CWSIP0002",
                                                                     new Object[] {
                                                                                   "com.ibm.ws.sib.processor.impl.MessageProcessor",
                                                                                   "1:1268:1.445", e }, null), e);

                SibTr.exception(tc, finalE);
                SibTr
                                .error(
                                       tc,
                                       "INTERNAL_MESSAGING_ERROR_CWSIP0002",
                                       new Object[] {
                                                     "com.ibm.ws.sib.processor.impl.MessageProcessor",
                                                     "1:1274:1.445",
                                                     SIMPUtils.getStackTrace(e) });

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

                throw finalE;
            }
        }
        // Determine if messages on deleted destinations should be discarded
        // _discardMsgsAfterQueueDeletion =
        // (_engine.getBus()).getBoolean(CT_SIBus.DISCARDMSGSAFTERQUEUEDELETION_NAME,
        // CT_SIBus.DISCARDMSGSAFTERQUEUEDELETION_DEFAULT);

        // Venu temp
        // this property is not configured in Libery profile and Admin has not
        // exposed this...
        // so hardcoding to false.
        _discardMsgsAfterQueueDeletion = false;

        if (TraceComponent.isAnyTracingEnabled()
            && tc.isEntryEnabled())
            SibTr.exit(tc, "initialize");
    }
281115
protected void init() {
		// Get all our messages
		objectSingularName = getApplicationConfig().messageResolver().getMessage(
				modelId + ".objectName.singular");
		objectPluralName = getApplicationConfig().messageResolver().getMessage(
				modelId + ".objectName.plural");
	}
1350077
void init()
    {
        view.set(new View(
                         ImmutableList.of(new Memtable(cfstore)),
                         ImmutableList.<Memtable>of(),
                         Collections.<SSTableReader, SSTableReader>emptyMap(),
                         Collections.<SSTableReader>emptySet(),
                         Collections.<SSTableReader>emptySet(),
                         SSTableIntervalTree.empty()));
    }
264926
public function initializeObject()
    {
        if (!$this->backend instanceof Backend\BackendInterface) {
            throw new MissingBackendException('A persistence backend must be set prior to initializing the persistence manager.', 1215508456);
        }
        $this->backend->setPersistenceManager($this);
        $this->backend->initialize($this->settings['backendOptions']);
    }
417470
public void initialize() throws DurableDataLogException {
        this.cacheManager.startAsync().awaitRunning();
        getSingleton(this.dataLogFactory, this.dataLogFactoryCreator).initialize();
        getSingleton(this.containerManager, this.segmentContainerManagerCreator).initialize();
    }
933056
void initialize()
    {
        if (m_backend == BackendTarget.NONE) {
            m_non_voltdb_backend = null;
            m_ee = new MockExecutionEngine();
        }
        else if (m_backend == BackendTarget.HSQLDB_BACKEND) {
            m_non_voltdb_backend = HsqlBackend.initializeHSQLBackend(m_siteId, m_context);
            m_ee = new MockExecutionEngine();
        }
        else if (m_backend == BackendTarget.POSTGRESQL_BACKEND) {
            m_non_voltdb_backend = PostgreSQLBackend.initializePostgreSQLBackend(m_context);
            m_ee = new MockExecutionEngine();
        }
        else if (m_backend == BackendTarget.POSTGIS_BACKEND) {
            m_non_voltdb_backend = PostGISBackend.initializePostGISBackend(m_context);
            m_ee = new MockExecutionEngine();
        }
        else {
            m_non_voltdb_backend = null;
            m_ee = initializeEE();
        }
        m_ee.loadFunctions(m_context);

        m_snapshotter = new SnapshotSiteProcessor(m_scheduler,
        m_snapshotPriority,
        new SnapshotSiteProcessor.IdlePredicate() {
            @Override
            public boolean idle(long now) {
                return (now - 5) > m_lastTxnTime;
            }
        });
    }
469251
public final void intialize() throws IllegalStateException {
        synchronized (this) {
            if (tracker != null) {
                throw new IllegalStateException(
                    "DelegatingClassResolver [" + this + "] had been initialized.");
            }
            tracker = new ClassResolverTracker(context, applicationName);
            tracker.open();
        }
    }