<p>Set bean.</p>
@param pBeanName - bean name
@param pBean bean
@throws Exception - an exception
546138
@Override
  public final synchronized void set(final String pBeanName,
    final IConverterToFromString<?> pBean) throws Exception {
    this.convertersMap.put(pBeanName, pBean);
  }
395884
public Set<ObjectName> getBeanNames() throws JMException {
		checkClientConnected();
		try {
			return mbeanConn.queryNames(null, null);
		} catch (IOException e) {
			throw createJmException("Problems querying for jmx bean names: " + e, e);
		}
	}
696839
@Override
	public void setBean(final Object bean) {
		BeanAndProviderBoundComponentModel model = getOrCreateComponentModel();
		model.setBean(bean);

		if (getBeanProperty() == null) {
			setBeanProperty(".");
		}
		// Remove values in scratch map
		removeBeanFromScratchMap();
	}
514731
public static void applyKVToBean(Object bean, String key, Object value) throws NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
        Method getterMethod = bean.getClass().getMethod(Util.getterMethodName(key));
        Method setterMethod = bean.getClass().getMethod(Util.setterMethodName(key), getterMethod.getReturnType());
        setterMethod.invoke(bean, value);
    }
994627
@Override
  public final Object lazyGet(
    final String pBeanName) throws Exception {
    if (this.isReconfiguring) {
      throw new ExceptionWithCode(ExceptionWithCode.SYSTEM_RECONFIGURING,
        "system_reconfiguring");
    }
    if (this.isReinitializing) {
      // locking:
      synchronized (this) {
        if (this.isReinitializing) {
          init(); //complex initializing inner factories delegate
          this.isReinitializing = false;
        }
      }
    }
    setLastRequestTime(new Date().getTime());
    Object bean = this.beansMap.get(pBeanName);
    // see in beige-common:
    // org.beigesoft.test.DoubleCkeckLockingWrApTest
    if (bean == null) {
      // locking:
      synchronized (this) {
        // make sure again whether it's null after locking:
        bean = this.beansMap.get(pBeanName);
        if (bean == null) {
          if (getHandlerEntityRequestName().equals(pBeanName)) {
            bean = this.factoryBldServices.lazyGetHandlerEntityRequest();
          } else if (getHndlEntityFileReportReqName().equals(pBeanName)) {
            bean = this.factoryBldServices.lazyGetHndlEntityFileReportReq();
          } else if (getSrvOrmName().equals(pBeanName)) {
            bean = lazyGetSrvOrm();
          } else if (getSessionTrackerName().equals(pBeanName)) {
            bean = lazyGetSessionTracker();
          } else if (getImportFullDatabaseCopyName().equals(pBeanName)) {
            bean = lazyGetImportFullDatabaseCopy();
          } else if (getDatabaseWriterName().equals(pBeanName)) {
            bean = lazyGetDbWriterFullCopy();
          } else if (getMailSenderName().equals(pBeanName)) {
            bean = lazyGetMailSender();
          } else if (getHndlI18nRequestName().equals(pBeanName)) {
            bean = lazyGetHndlI18nRequest();
          } else if (getUtilXmlName().equals(pBeanName)) {
            bean = lazyGetUtilXml();
          } else if (getSecureLoggerName().equals(pBeanName)) {
            bean = lazyGetSecureLogger();
          } else if (getLoggerName().equals(pBeanName)) {
            bean = lazyGetLogger();
          } else if (getMngSoftwareName().equals(pBeanName)) {
            bean = lazyGetMngSoftware();
          } else if (getSrvI18nName().equals(pBeanName)) {
            bean = lazyGetSrvI18n();
          } else if (getUtlJspName().equals(pBeanName)) {
            bean = lazyGetUtlJsp();
          } else if (getSrvDatabaseName().equals(pBeanName)) {
            bean = lazyGetSrvDatabase();
          } else if (getHlpEntitiesPageName().equals(pBeanName)) {
            bean = lazyGetHlpEntitiesPage();
          } else if (getSrvNumberToStringName().equals(pBeanName)) {
            bean = lazyGetSrvNumberToString();
          } else if (getSrvDateName().equals(pBeanName)) {
            bean = lazyGetSrvDate();
          } else if (getSrvPageName().equals(pBeanName)) {
            bean = lazyGetSrvPage();
          } else if (getFillEntityFromReqName().equals(pBeanName)) {
            bean = lazyGetFillEntityFromReq();
          } else if (getMngUvdSettingsName().equals(pBeanName)) {
            bean = lazyGetMngUvdSettings();
          } else if (getUtlPropertiesName().equals(pBeanName)) {
            bean = lazyGetUtlProperties();
          } else if (getUtlReflectionName().equals(pBeanName)) {
            bean = lazyGetUtlReflection();
          } else if (getMngSettingsGetDbCopyName().equals(pBeanName)) {
            bean = lazyGetMngSettingsGetDbCopy();
          } else if (getHldFieldsCnvTfsNamesName().equals(pBeanName)) {
            bean = lazyGetHldFieldsCnvTfsNames();
          } else if (getFctConvertersToFromStringName().equals(pBeanName)) {
            bean = lazyGetFctConvertersToFromString();
          } else if (getFctFillersObjectFieldsName().equals(pBeanName)) {
            bean = lazyGetFctFillersObjectFields();
          } else if (getHolderRapiSettersName().equals(pBeanName)) {
            bean = lazyGetHolderRapiSetters();
          } else if (getHolderRapiGettersName().equals(pBeanName)) {
            bean = lazyGetHolderRapiGetters();
          } else if (getHolderRapiFieldsName().equals(pBeanName)) {
            bean = lazyGetHolderRapiFields();
          } else if (getHlpInsertUpdateName().equals(pBeanName)) {
            bean = lazyGetHlpInsertUpdate();
          } else if (getFillerEntitiesFromRsName().equals(pBeanName)) {
            bean = lazyGetFillerEntitiesFromRs();
          } else if (getFctBnCnvBnFromRsName().equals(pBeanName)) {
            bean = lazyGetFctBnCnvBnFromRs();
          } else if (getFctBnCnvIbnToColumnValuesName().equals(pBeanName)) {
            bean = lazyGetFctBnCnvIbnToColumnValues();
          } else if (getCsvReaderName().equals(pBeanName)) {
            bean = lazyGetCsvReader();
          } else if (getSrvSqlEscapeName().equals(pBeanName)) {
            bean = lazyGetSrvSqlEscape();
          } else if (getHldCnvToColumnsValuesNamesName().equals(pBeanName)) {
            bean = lazyGetHldCnvToColumnsValuesNames();
          } else if (getPrepareDbAfterFullImportName().equals(pBeanName)) {
            bean = lazyGetPrepareDbAfterFullImport();
          } else if (getHldCnvFromRsNamesName().equals(pBeanName)) {
            bean = lazyGetHldCnvFromRsNames();
          } else if (getFctBcFctSimpleEntitiesName().equals(pBeanName)) {
            bean = this.factoryBldServices.lazyGetFctBcFctSimpleEntities();
          } else if (getFctBcCnvEntityToColumnsValuesName().equals(pBeanName)) {
            bean = lazyGetFctBcCnvEntityToColumnsValues();
          } else {
            bean = lazyGetOtherBean(pBeanName);
            if (bean == null && this.factoryOverBeans != null) {
                bean = this.factoryOverBeans.lazyGet(pBeanName);
            }
          }
        }
      }
    }
    if (bean == null) {
      throw new ExceptionWithCode(ExceptionWithCode.CONFIGURATION_MISTAKE,
        "There is no bean with name " + pBeanName);
    }
    return bean;
  }
125441
public synchronized void setException(Throwable ex) {
    if(_ex == null) {
      _ex = AutoBuffer.javaSerializeWritePojo(((ex instanceof DistributedException) ? (DistributedException) ex : new DistributedException(ex,false /* don't want this setException(ex) call in the stacktrace */)));
    }
  }
766418
@Override
    public BeanBuilder<T> set(String propertyName, Object value) {
        return set(getMetaBean().metaProperty(propertyName), value);
    }
1285780
public void setPropertiesOn(final Bean bean) {
        String[][] properties = getProperties();
        for (int i = 0; i < properties.length; i++) {
            if (properties[i].length < 2) {
                continue;
            }
            for (int j = 0; j < properties[i].length - 1; j++) {
                bean.addProperty(properties[i][0], properties[i][j + 1]);
            }
        }
    }
605366
public void setAttribute(ObjectName name, String attrName, String value) throws Exception {
		MBeanAttributeInfo info = getAttrInfo(name, attrName);
		if (info == null) {
			throw new IllegalArgumentException("Cannot find attribute named '" + attrName + "'");
		} else {
			setAttribute(name, attrName, ClientUtils.stringToParam(value, info.getType()));
		}
	}
1337580
@Override
    public void afterPropertiesSet() throws Exception {
        if (this.jaxbLoader == null && this.mappedXmlResource == null) {
            throw new BeanCreationException("Either the 'jaxbLoader' property or the 'mappedXmlResource' property needs to be set");
        }

        if (this.jaxbLoader == null) {
            this.jaxbLoader = new CachingJaxbLoaderImpl<>(PersonData.class);
            ((CachingJaxbLoaderImpl<PersonData>) this.jaxbLoader).setMappedXmlResource(this.mappedXmlResource);
        }
    }
79738
public Set<ObjectName> getBeanNames(String domain) throws JMException {
		checkClientConnected();
		try {
			return mbeanConn.queryNames(ObjectName.getInstance(domain + ":*"), null);
		} catch (IOException e) {
			throw createJmException("Problems querying for jmx bean names: " + e, e);
		}
	}
9908
protected static void setField(String fieldName, Object mojo, Object value) throws Exception {
        Field field = null;
        try {
            field = mojo.getClass().getDeclaredField(fieldName);
        } catch (NoSuchFieldException ex) {
            // Ignore exception and try superclass.
            field = mojo.getClass().getSuperclass().getDeclaredField(fieldName);
        }
        field.setAccessible(true);
        field.set(mojo, value);
    }
1147842
static void setConfig(String configName) throws Exception {
		Handler.configName = configName;
		config = (HandlerConfig) Config.getInstance().getJsonObjectConfig(configName, HandlerConfig.class);
		initHandlers();
		initPaths();
	}
1208177
public void setBeanClass(Class<?> beanClass) {
        this.beanClass = beanClass;
        this.className = beanClass.getName();
        this.factoryBean = FactoryBean.class.isAssignableFrom(beanClass);
        this.disposableBean = DisposableBean.class.isAssignableFrom(beanClass);
        this.initializableBean = InitializableBean.class.isAssignableFrom(beanClass);
        this.initializableTransletBean = InitializableTransletBean.class.isAssignableFrom(beanClass);
    }
1367447
@Override
	public void setProperty(String name, Object value) {
		if(currentBeanConfig != null) {
			if(value instanceof GString)value = value.toString();
			if(addToDeferred(currentBeanConfig, name, value)) {
				return;
			}
			else if(value instanceof Closure) {
				BeanConfiguration current = currentBeanConfig;
				try {
					Closure callable = (Closure)value;

					Class parameterType = callable.getParameterTypes()[0];
					if(parameterType.equals(Object.class)) {
						currentBeanConfig = springConfig.createSingletonBean("");
						callable.call(new Object[]{currentBeanConfig});
					}
					else {
						currentBeanConfig = springConfig.createSingletonBean(parameterType);
						callable.call(null);
					}

					value = currentBeanConfig.getBeanDefinition();
				}
				finally {
					currentBeanConfig = current;
				}
			}
            currentBeanConfig.addProperty(name, value);
		} else {
            binding.put(name,value);
        }
	}
661442
public void setAttributes(String domainName, String beanName, List<Attribute> attributes) throws Exception {
		setAttributes(ObjectNameUtil.makeObjectName(domainName, beanName), attributes);
	}
957711
@SuppressWarnings({ "unchecked", "rawtypes" })
	public static void setFieldValue(Object bean, String fieldNameOrIndex, Object value) {
		if (bean instanceof Map) {
			((Map) bean).put(fieldNameOrIndex, value);
		} else if (bean instanceof List) {
			CollUtil.setOrAppend((List) bean, Convert.toInt(fieldNameOrIndex), value);
		} else if (ArrayUtil.isArray(bean)) {
			ArrayUtil.setOrAppend(bean, Convert.toInt(fieldNameOrIndex), value);
		} else {
			// 普通Bean对象
			ReflectUtil.setFieldValue(bean, fieldNameOrIndex, value);
		}
	}