Helper method used by the JMO to rewrite any transient data back into the
underlying JMF message.
Package level visibility as used by the JMO.

@param why The reason why updateDataFields is being called
194869
@Override
    void updateDataFields(int why) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "updateDataFields");

        super.updateDataFields(why);
        setFlags();
        /* If the cachedMessageWaitTime transient has ever been set, write it back */
        if (cachedMessageWaitTime != null) {
            getHdr2().setField(JsHdr2Access.MESSAGEWAITTIME, cachedMessageWaitTime);
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "updateDataFields");
    }
1035822
public void refresh(Object entity)
    {
        if (contains(entity))
        {
            MainCache mainCache = (MainCache) getPersistenceCache().getMainCache();
            Node node = mainCache.getNodeFromCache(entity, getMetadata(entity.getClass()), this);
            // Locking as it might read from persistence context.

            try
            {
                lock.readLock().lock();
                node.setPersistenceDelegator(this);
                node.refresh();
            }
            finally
            {
                lock.readLock().unlock();
            }
        }
        else
        {
            throw new IllegalArgumentException("This is not a valid or managed entity, can't be refreshed");
        }
    }
405528
protected void setMemberFactories(FaceletCache.MemberFactory<V> faceletFactory,
                                      FaceletCache.MemberFactory<V> viewMetadataFaceletFactory,
                                      FaceletCache.MemberFactory<V> compositeComponentMetadataFaceletFactory)
    {
        if  (compositeComponentMetadataFaceletFactory == null)
        {
            throw new NullPointerException("viewMetadataFaceletFactory is null");
        }
        _compositeComponentMetadataFaceletFactory = compositeComponentMetadataFaceletFactory;
        setMemberFactories(faceletFactory, viewMetadataFaceletFactory);
    }
62551
private JpaSoftwareModule touch(final SoftwareModule latestModule) {
        // merge base distribution set so optLockRevision gets updated and audit
        // log written because modifying metadata is modifying the base
        // distribution set itself for auditing purposes.
        final JpaSoftwareModule result = entityManager.merge((JpaSoftwareModule) latestModule);
        result.setLastModifiedAt(0L);

        return result;
    }
1212439
static String extractWhereConditions(boolean updateMode, SQLiteModelMethod method) {
		final One<String> whereCondition = new One<String>("");
		final One<Boolean> found = new One<Boolean>(null);
		JQLChecker.getInstance().replaceVariableStatements(method, method.jql.value, new JQLReplaceVariableStatementListenerImpl() {

			@Override
			public String onWhere(String statement) {
				if (found.value0 == null) {
					whereCondition.value0 = statement;
					found.value0 = true;
				}
				return null;
			}

		});

		return StringUtils.ifNotEmptyAppend(whereCondition.value0, " ");
	}
914808
function () {
            // clean
            this._data.templates = [];
            this._data.modules = [];
            this._data.dataFragments = [];
            // refresh

            var startTemplates = this._data.templates;
            var startModules = this._data.modules;
            var startDatas = this._data.dataFragments;

            // this two should change if not null, as new objects are created.
            var selectedTemplate = this._data.selectedTemplate;
            var selectedModule = this._data.selectedModule;

            // The previous way of retrieving elements was to recursively look in the DOM
            // But a problem appeared with this when event delegation was implemented (because DOM elements
            // do not have any more a reference to the widget instance object until the getDom() method on the widget is
            // called, which may not happen at all, so we cannot recognize corresponding widgets).
            // We now use the hierarchies from the refresh manager.

            var refreshMgr = this.bridge.getAriaPackage().templates.RefreshManager;
            if (refreshMgr != null) {
                refreshMgr.updateHierarchies();
                var hierarchies = refreshMgr.getHierarchies();
                this._convertRefreshMgrHierarchies(hierarchies, startTemplates, startModules, startDatas);
            }

            // not used now, but could be used later to display customizations in the inspector
            // this._data.customizations = this.bridge.getAriaPackage().environment.Environment.getCustomizations();

            // if not -> nullify
            if (selectedTemplate == this._data.selectedTemplate) {
                this._data.selectedTemplate = null;
            }
            if (selectedModule == this._data.selectedModule) {
                this._data.selectedModule = null;
            }

            this.$raiseEvent("contentChanged");
        }
963216
public static void writeTraceBeanMetaData(BeanMetaData bmd,
                                              int dtdVersion)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
        {
            StringBuffer sbuf = new StringBuffer();

            sbuf
                            .append(BMD_Type_Str).append(DataDelimiter)
                            .append(BMD_Type).append(DataDelimiter)
                            .append(dtdVersion).append(DataDelimiter)
                            .append(bmd.j2eeName).append(DataDelimiter)
                            .append(bmd.simpleJndiBindingName).append(DataDelimiter);

            if (bmd.type == InternalConstants.TYPE_STATELESS_SESSION) {

                sbuf
                                .append("Stateless")
                                .append(" Session Bean").append(DataDelimiter);
                if (bmd.usesBeanManagedTx) {
                    sbuf.append("BMT").append(DataDelimiter);
                } else {
                    sbuf.append("CMT").append(DataDelimiter);
                }
                sbuf.append("N/A").append(DataDelimiter); // dxxxxxx

            } else if (bmd.type == InternalConstants.TYPE_STATEFUL_SESSION) {

                sbuf
                                .append("Stateful")
                                .append(" Session Bean").append(DataDelimiter);
                if (bmd.usesBeanManagedTx) {
                    sbuf.append("BMT").append(DataDelimiter);
                } else {
                    sbuf.append("CMT").append(DataDelimiter);
                }
                sbuf.append("N/A").append(DataDelimiter);

            } else if (bmd.type == InternalConstants.TYPE_SINGLETON_SESSION) { //F743-508.CodRev

                sbuf
                                .append("Singleton")
                                .append(" Session Bean").append(DataDelimiter);
                if (bmd.usesBeanManagedTx) {
                    sbuf.append("BMT").append(DataDelimiter);
                } else {
                    sbuf.append("CMT").append(DataDelimiter);
                }
                sbuf.append("N/A").append(DataDelimiter);

            } else if (bmd.type == InternalConstants.TYPE_BEAN_MANAGED_ENTITY) {

                sbuf
                                .append("BMP")
                                .append(" Entity Bean").append(DataDelimiter)
                                .append("CMT").append(DataDelimiter)
                                .append("N/A").append(DataDelimiter);

            } else if (bmd.type == InternalConstants.TYPE_CONTAINER_MANAGED_ENTITY) {

                sbuf
                                .append("CMP")
                                .append(" Entity Bean").append(DataDelimiter)
                                .append("CMT").append(DataDelimiter);
                int cmpV = bmd.getCMPVersion();
                sbuf.append(cmpV).append(".x").append(DataDelimiter);

            } else if (bmd.type == InternalConstants.TYPE_MESSAGE_DRIVEN) {
                sbuf.append("Message Driven Bean").append(DataDelimiter);
                if (bmd.usesBeanManagedTx) {
                    sbuf.append("BMT").append(DataDelimiter);
                } else {
                    sbuf.append("CMT").append(DataDelimiter);
                }
                sbuf.append("N/A").append(DataDelimiter);
            }

            sbuf
                            .append(turnNullClass2EmptyString(bmd.homeInterfaceClass)).append(DataDelimiter)
                            .append(turnNullClass2EmptyString(bmd.remoteInterfaceClass)).append(DataDelimiter)
                            .append(turnNullClass2EmptyString(bmd.remoteImplClass)).append(DataDelimiter)
                            .append(turnNullClass2EmptyString(bmd.homeRemoteImplClass)).append(DataDelimiter)

                            .append(turnNullClass2EmptyString(bmd.localHomeInterfaceClass)).append(DataDelimiter)
                            .append(turnNullClass2EmptyString(bmd.localInterfaceClass)).append(DataDelimiter)
                            .append(turnNullClass2EmptyString(bmd.localImplClass)).append(DataDelimiter)
                            .append(turnNullClass2EmptyString(bmd.homeLocalImplClass)).append(DataDelimiter);

            sbuf
                            .append(turnNullClass2EmptyString(bmd.homeBeanClass)).append(DataDelimiter)
                            .append(turnNullClass2EmptyString(bmd.enterpriseBeanClass)).append(DataDelimiter)
                            .append(turnNullClass2EmptyString(bmd.enterpriseBeanAbstractClass)).append(DataDelimiter)

                            .append(turnNullClass2EmptyString(bmd.pKeyClass)).append(DataDelimiter)

                            .append(bmd.minPoolSize).append(DataDelimiter)
                            .append(bmd.maxPoolSize).append(DataDelimiter)
                            .append(bmd.reentrant).append(DataDelimiter)
                            .append(bmd.sessionTimeout).append(DataDelimiter)
                            .append(bmd.isPreFindFlushEnabled).append(DataDelimiter)
                            .append(bmd.optionACommitOption ? "A"
                                            : bmd.optionBCommitOption ? "B"
                                                            : bmd.optionCCommitOption ? "C"
                                                                            : "Unknown").append(DataDelimiter);

            writeMethodInfo(sbuf, bmd.methodInfos);
            writeMethodInfo(sbuf, bmd.localMethodInfos);
            writeMethodInfo(sbuf, bmd.homeMethodInfos);
            writeMethodInfo(sbuf, bmd.localHomeMethodInfos);

            ResourceRefConfigList resRefList = bmd._resourceRefList;
            int resourcesDefined = resRefList.size();
            sbuf.append(resourcesDefined).append(DataDelimiter);
            for (int i = 0; i < resourcesDefined; ++i)
            {
                ResourceRefConfig resRef = resRefList.getResourceRefConfig(i);
                sbuf
                                .append(turnNullString2EmptyString(resRef.getName())).append(DataDelimiter)
                                .append(turnNullString2EmptyString(resRef.getDescription())).append(DataDelimiter)
                                .append(turnNullString2EmptyString(resRef.getJNDIName())).append(DataDelimiter)
                                .append(turnNullString2EmptyString(resRef.getType())).append(DataDelimiter)
                                .append(resRef.getIsolationLevel()).append(DataDelimiter)
                                .append(resRef.getSharingScope()).append(DataDelimiter)
                                .append(resRef.getAuth()).append(DataDelimiter);
            }
            // d214462 Begins
            // EJB 2.1 - TimedObject           d174057.3
            sbuf.append((dtdVersion >= BeanMetaData.J2EE_EJB_VERSION_2_1 && bmd.isTimedObject)).append(DataDelimiter);

            // MDB 2.0/2.1 and greater ActivationSpec/MessageDestination    LI2110-46
            sbuf
                            .append(turnNullString2EmptyString(bmd.ivActivationSpecJndiName)).append(DataDelimiter)
                            .append(turnNullString2EmptyString(bmd.ivMessageDestinationJndiName)).append(DataDelimiter);

            writeMethodInfo(sbuf, bmd.timedMethodInfos);
            writeMethodInfo(sbuf, bmd.wsEndpointMethodInfos);

            // EJB 2.1 - WebService Endpoint Interface / Wrapper       d174057.3
            sbuf.append(turnNullClass2EmptyString(bmd.webserviceEndpointInterfaceClass)).append(DataDelimiter);

            /**** N O T E S ****/
            // All new metadata MUST append to the sbuf to maintain backward compatibility

            //          sbuf.append( turnNullClass2EmptyString( bmd.webserviceWrapperClass ) ).append( DataDelimiter )

            // d214462 Ends
            Tr.debug(tc, sbuf.toString());
        }
    }
231670
public synchronized void onRequestRejected(String reason) {
		allRequestsTracker.onRequestRejected(reason);
		recentRequestsTracker.onRequestRejected(reason);
		meter.mark();
	}
949081
@Override
    public final void setJmsDeliveryMode(PersistenceType value) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setJmsDeliveryMode", value);
        getHdr2().setField(JsHdr2Access.JMSDELIVERYMODE_DATA, value.toByte());
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setJmsDeliveryMode");
    }
1337956
public void restorePersistentDestinationData(HashMap hm) 
    throws Exception
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(
        tc, "restorePersistentDestinationData", new Object[] { hm }); //, new Integer(dataVersion)


    messagingEngineUuid = new SIBUuid8((byte[])hm.get("messagingEngineUuid"));
    toBeDeleted = (Boolean) hm.get("toBeDeleted");
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "restorePersistentDestinationData");
  }
322625
public void updateDataOnly(Transaction tran, ObjectStore store) throws PersistenceException, ObjectManagerException, SevereMessageStoreException
    {
        updateDataOnly(tran, store, this);
    }
1320473
private void applyDataUpdate(final M data) {
        this.data = data;
        CompletableFutureLite<M> currentSyncFuture = null;
        Future<M> currentSyncTask = null;

        // Check if sync is in process.
        synchronized (syncMonitor) {
            if (syncFuture != null) {
                currentSyncFuture = syncFuture;
                currentSyncTask = syncTask;
                syncFuture = null;
                syncTask = null;
            }
        }

        if (currentSyncFuture != null) {
            currentSyncFuture.complete(data);
        }

        if (currentSyncTask != null && !currentSyncTask.isDone()) {
            currentSyncTask.cancel(false);
        }

        setConnectionState(CONNECTED);

        // Notify data update
        try {
            notifyPrioritizedObservers(data);
        } catch (CouldNotPerformException ex) {
            ExceptionPrinter.printHistory(new CouldNotPerformException("Could not notify data update!", ex), logger);
        }

        try {
            dataObservable.notifyObservers(data);
        } catch (CouldNotPerformException ex) {
            ExceptionPrinter.printHistory(new CouldNotPerformException("Could not notify data update to all observer!", ex), logger);
        }
    }
85761
@Override
    public void setReasonPhrase(byte[] reason) {
        this.myReasonBytes = reason;
        this.myReason = null;
        super.setFirstLineChanged();
        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
            this.myReason = GenericUtils.getEnglishString(reason);
            Tr.event(tc, "setReasonPhrase(byte[]): set to [" + this.myReason + "]");
        }
    }
803108
@Override
	public void updateBeanValue() {
		TableDataModel model = getDataModel();

		if (model instanceof ScrollableTableDataModel) {
			LOG.warn("UpdateBeanValue only updating the current page for ScrollableTableDataModel");
			updateBeanValueCurrentPageOnly();
		} else if (model.getRowCount() > 0) {
			// Temporarily widen the pagination on the repeater to hold all rows
			// Calling setBean with a non-null value overrides the DataTableBeanProvider
			repeater.setBean(new RowIdList(0, model.getRowCount() - 1));
			updateBeanValueCurrentPageOnly();
			repeater.setBean(null);
		}
	}
1332364
@Override
    public void updateDefinition(BaseDestinationDefinition destinationDefinition)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(
                        tc,
                        "updateDefinition",
                        new Object[] { destinationDefinition });

        DestinationDefinition oldDefinition = definition;
        DestinationDefinition newDefinition = (DestinationDefinition) destinationDefinition;

        super.updateDefinition(destinationDefinition);

        _maxFailedDeliveries = definition.getMaxFailedDeliveries();

        // at runtime the blockedretryinterval was not getting updated
        // since this piece of code was missing
        _blockedRetryInterval = definition.getBlockedRetryTimeout();

        //update TRM if necessary
        registerDestination();

        // Convert array of names to list of jsDestinationAddresses
        QualifiedDestinationName[] names = definition.getForwardRoutingPath();

        if (names != null)
        {
            ArrayList newFRP = new ArrayList(names.length);
            for (int name = 0; name < names.length; name++)
            {
                newFRP.add(SIMPUtils.createJsDestinationAddress(
                                                                names[name].getDestination(),
                                                                null,
                                                                names[name].getBus()));
            }
            _forwardRoutingPath = newFRP;
        }
        else
        {
            _forwardRoutingPath = null;
        }

        _replyDestination = null;
        _replySet = false;

        // Check whether send allowed has changed
        if (oldDefinition != null &&
            (oldDefinition.isSendAllowed() != newDefinition.isSendAllowed()))
        {
            fireSendAllowedStateChangeEvent(newDefinition.isSendAllowed());
        }

        if (oldDefinition != null &&
            (oldDefinition.isReceiveAllowed() != newDefinition.isReceiveAllowed()))
        {
            fireReceiveAllowedStateChangeEvent(newDefinition.isReceiveAllowed());
        }

        if (!_reconciled)
            setIsOrdered(definition.isOrderingRequired());

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "updateDefinition");
    }
143509
JSMessageData getCopy() {

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) JmfTr.entry(this, tc, "getCopy");
    JSMessageImpl copy;

    synchronized (getMessageLockArtefact()) {
      // Create a new instance of ourselves
      copy = new JSMessageImpl(this);

      // Allow the message data to be lazy-copied
      copy.lazyCopy(this);

      // The copy is a new top-level message
      copy.setMaster();

      // We must clear our boxed cache at this stage, since items in the
      // boxed cache may refer to entries in our now potentially shared cache
      // and this could result in  consistency problems. By clearing the
      // cache here it will get recreated with new copies when required.
      if (boxManager != null) {
        boxManager.reset();
      }

    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) JmfTr.exit(this, tc, "getCopy", copy);
    return copy;
  }
905827
protected void marshalMetadata(final StringBuilder buf,
                                   final RuleModel model) {
        if (model.metadataList != null) {
            for (int i = 0; i < model.metadataList.length; i++) {
                buf.append("\t").append(model.metadataList[i]).append("\n");
            }
        }
    }