public boolean checkAndUpdateMEOwner(MELockOwner owner)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "checkAndUpdateMEOwner", "Owner="+owner);

        // Venu mock mock disableUUIDCheck for now in this version of Liberty profile.
        boolean disableUUIDCheck = true;
        /*
        // set always true to 
        // Defect 601995
        // Check to see if UUID checking has been disabled.
        String disableUUIDCheckStr = _ms.getProperty(MessageStoreConstants.PROP_OBJECT_MANAGER_DISABLE_UUID_CHECK, 
                                                     MessageStoreConstants.PROP_OBJECT_MANAGER_DISABLE_UUID_CHECK_DEFAULT);

        boolean disableUUIDCheck = Boolean.parseBoolean(disableUUIDCheckStr); */


        boolean success = true;

        if (disableUUIDCheck)
        {
            // Start regardless of the contents of our owner objects
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Owner checking skipped as "+MessageStoreConstants.PROP_OBJECT_MANAGER_DISABLE_UUID_CHECK+"=true");
        }
        else
        {
            MEStoredOwner storedOwner = null;
            Transaction   transaction = null;
    
            SibTr.info(tc, "FILE_STORE_LOCK_ATTEMPTING_SIMS1564", new Object[] {owner.getMeUUID(), owner.getIncUUID()});
    
            try
            {
                transaction = _objectManager.getTransaction();
                Token storedOwnerToken = _anchor.getMEOwnerToken();
    
                if (storedOwnerToken != null)
                {
                    storedOwner = (MEStoredOwner)storedOwnerToken.getManagedObject();
    
                    SibTr.info(tc, "FILE_STORE_LOCK_ONE_OWNER_SIMS1566", new Object[] {storedOwner.getMeUUID(), storedOwner.getIncUUID()});
    		    // F008622 -start
		    if(_ms.getProperty(MessageStoreConstants.START_MODE, MessageStoreConstants.DEAFULT_START_MODE).equalsIgnoreCase("RECOVERY"))
		    {
                    	owner=new MELockOwner(storedOwner.getMeUUID(),storedOwner.getIncUUID(),storedOwner.getVersion(),storedOwner.getMigrationVersion(),"default");
                    }
		   // F008622 end
                    // If our ME_UUID matches that found then we need
                    // to update our incarnation id.
                    if (owner.getMeUUID().equals(storedOwner.getMeUUID()))
                    {
                        if (owner.getVersion() == storedOwner.getVersion())
                        {
                            transaction.lock(storedOwner);
    
                            storedOwner.setIncUUID(owner.getIncUUID());
    
                            transaction.replace(storedOwner);
                        }
                        else
                        {
                            // Different Version
                            SibTr.error(tc, "FILE_STORE_LOCK_VERSION_DOESNT_MATCH_SIMS1562", new Object[]{Integer.valueOf(owner.getVersion()), Integer.valueOf(storedOwner.getVersion())});
                            if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) SibTr.event(this, tc, "Different ME version found in file store!", "ME Version="+owner.getVersion()+", ME Version(FS)="+storedOwner.getVersion());
    
                            // Defect 496893
                            // We know that no instance of this ME will ever work with these
                            // files so we report a global error to stop us from failing over
                            // to a new instance.
                            _ms.reportGlobalError();
    
                            success = false;
                        }
                    }
                    else
                    {
                        // Different ME_UUID
                        SibTr.error(tc, "FILE_STORE_LOCK_MEUUID_DOESNT_MATCH_SIMS1561", new Object[]{owner.getMeUUID(), storedOwner.getMeUUID()});
                        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) SibTr.event(this, tc, "Different ME unique id found in file store!", "ME_UUID="+owner.getMeUUID()+", ME_UUID(FS)="+storedOwner.getMeUUID());
    
                        // Defect 496893
                        // We know that no instance of this ME will ever work with these
                        // files so we report a global error to stop us from failing over
                        // to a new instance.
                        _ms.reportGlobalError();
    
                        success = false;
                    }
                }
                else
                {
                    // We are starting with an empty object store
                    // so we need to add our ME owner information
                    // to the anchor.
    
                    SibTr.info(tc, "FILE_STORE_LOCK_NO_OWNER_SIMS1565");
    
                    storedOwner      = new MEStoredOwner(owner.getMeUUID(), owner.getIncUUID(), 1, 0);
                    storedOwnerToken = _permanentStore.allocate(storedOwner);
    
                    transaction.lock(_anchor);
    
                    _anchor.setMEOwnerToken(storedOwnerToken);
    
                    transaction.replace(_anchor);
    
                    transaction.add(storedOwner);
                }
    
                transaction.commit(false);
            }
            catch (ObjectManagerException ome)
            {
                com.ibm.ws.ffdc.FFDCFilter.processException(ome, "com.ibm.ws.sib.msgstore.persistence.objectManager.PersistableMessageStoreImpl.checkAndUpdateMEOwner", "1:2214:1.81.1.6", this);
                if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) SibTr.event(this, tc, "Exception caught updating ME Owner information!", 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.checkAndUpdateMEOwner", "1:2226:1.81.1.6", this);
                        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled ()) SibTr.event(this, tc, "Exception caught backing out update of ME Owner information!", e);
                    }
                }
    
                // Defect 496893
                // We don't know what problem we've had but we can't guarantee that we have
                // successfully checked our owner information so we should ask to be failed
                // over to a new instance to see if we have more luck next time.
                _ms.reportLocalError();
    
                success = false;
            }
    
            if (success)
            {
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "ME Owner information in ObjectStore updated successfully: "+storedOwner);
    
                SibTr.info(tc, "FILE_STORE_LOCK_ACQUIRED_SIMS1563", new Object[] {storedOwner.getMeUUID(), storedOwner.getIncUUID()});
            }
            else
            {
                SibTr.error(tc, "CANNOT_OBTAIN_FILE_STORE_LOCK_SIMS1567", new Object[]{owner.getMeName()});
            }
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "checkAndUpdateMEOwner", "return="+success);
        return success;
    }
public boolean checkAndUpdateMEOwner ( MELockOwner owner ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "checkAndUpdateMEOwner" , "Owner=" + owner ) ; boolean disableUUIDCheck = true ; boolean success = true ; if ( disableUUIDCheck ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "Owner checking skipped as " + MessageStoreConstants . PROP_OBJECT_MANAGER_DISABLE_UUID_CHECK + "=true" ) ; } else { MEStoredOwner storedOwner = null ; Transaction transaction = null ; SibTr . info ( tc , "FILE_STORE_LOCK_ATTEMPTING_SIMS1564" , new Object [ ] { owner . getMeUUID ( ) , owner . getIncUUID ( ) } ) ; try { transaction = _objectManager . getTransaction ( ) ; Token storedOwnerToken = _anchor . getMEOwnerToken ( ) ; if ( storedOwnerToken != null ) { storedOwner = ( MEStoredOwner ) storedOwnerToken . getManagedObject ( ) ; SibTr . info ( tc , "FILE_STORE_LOCK_ONE_OWNER_SIMS1566" , new Object [ ] { storedOwner . getMeUUID ( ) , storedOwner . getIncUUID ( ) } ) ; if ( _ms . getProperty ( MessageStoreConstants . START_MODE , MessageStoreConstants . DEAFULT_START_MODE ) . equalsIgnoreCase ( "RECOVERY" ) ) { owner = new MELockOwner ( storedOwner . getMeUUID ( ) , storedOwner . getIncUUID ( ) , storedOwner . getVersion ( ) , storedOwner . getMigrationVersion ( ) , "default" ) ; } if ( owner . getMeUUID ( ) . equals ( storedOwner . getMeUUID ( ) ) ) { if ( owner . getVersion ( ) == storedOwner . getVersion ( ) ) { transaction . lock ( storedOwner ) ; storedOwner . setIncUUID ( owner . getIncUUID ( ) ) ; transaction . replace ( storedOwner ) ; } else { SibTr . error ( tc , "FILE_STORE_LOCK_VERSION_DOESNT_MATCH_SIMS1562" , new Object [ ] { Integer . valueOf ( owner . getVersion ( ) ) , Integer . valueOf ( storedOwner . getVersion ( ) ) } ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) SibTr . event ( this , tc , "Different ME version found in file store!" , "ME Version=" + owner . getVersion ( ) + ", ME Version(FS)=" + storedOwner . getVersion ( ) ) ; _ms . reportGlobalError ( ) ; success = false ; } } else { SibTr . error ( tc , "FILE_STORE_LOCK_MEUUID_DOESNT_MATCH_SIMS1561" , new Object [ ] { owner . getMeUUID ( ) , storedOwner . getMeUUID ( ) } ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) SibTr . event ( this , tc , "Different ME unique id found in file store!" , "ME_UUID=" + owner . getMeUUID ( ) + ", ME_UUID(FS)=" + storedOwner . getMeUUID ( ) ) ; _ms . reportGlobalError ( ) ; success = false ; } } else { SibTr . info ( tc , "FILE_STORE_LOCK_NO_OWNER_SIMS1565" ) ; storedOwner = new MEStoredOwner ( owner . getMeUUID ( ) , owner . getIncUUID ( ) , 1 , 0 ) ; storedOwnerToken = _permanentStore . allocate ( storedOwner ) ; transaction . lock ( _anchor ) ; _anchor . setMEOwnerToken ( storedOwnerToken ) ; transaction . replace ( _anchor ) ; transaction . add ( storedOwner ) ; } transaction . commit ( false ) ; } catch ( ObjectManagerException ome ) { com . ibm . ws . ffdc . FFDCFilter . processException ( ome , "com.ibm.ws.sib.msgstore.persistence.objectManager.PersistableMessageStoreImpl.checkAndUpdateMEOwner" , "1:2214:1.81.1.6" , this ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) SibTr . event ( this , tc , "Exception caught updating ME Owner information!" , ome ) ; if ( transaction != null ) { try { transaction . backout ( false ) ; } catch ( ObjectManagerException e ) { com . ibm . ws . ffdc . FFDCFilter . processException ( e , "com.ibm.ws.sib.msgstore.persistence.objectManager.PersistableMessageStoreImpl.checkAndUpdateMEOwner" , "1:2226:1.81.1.6" , this ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) SibTr . event ( this , tc , "Exception caught backing out update of ME Owner information!" , e ) ; } } _ms . reportLocalError ( ) ; success = false ; } if ( success ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "ME Owner information in ObjectStore updated successfully: " + storedOwner ) ; SibTr . info ( tc , "FILE_STORE_LOCK_ACQUIRED_SIMS1563" , new Object [ ] { storedOwner . getMeUUID ( ) , storedOwner . getIncUUID ( ) } ) ; } else { SibTr . error ( tc , "CANNOT_OBTAIN_FILE_STORE_LOCK_SIMS1567" , new Object [ ] { owner . getMeName ( ) } ) ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "checkAndUpdateMEOwner" , "return=" + success ) ; return success ; }
This method checks the ME_UUID stored in the permanent object store for this messaging engine
to see if it matches that which we retrieve from the admin object. If the ME_UUID matches it
then updates the INC_UUID to one that is associated with this current incarnation.

@return <UL>
<LI>true - If all checks and updates are successful</LI>
<LI>false - If a check or update fails</LI>
</UL>