Instantiates a {@link net.sf.ehcache.management.ManagementService}
176991
@Override
    protected AbstractBeanDefinition parseInternal(Element element, ParserContext parserContext) {
        BeanDefinitionBuilder builder = BeanDefinitionBuilder.rootBeanDefinition(net.sf.ehcache.management.ManagementService.class);

        // Mark as infrastructure bean and attach source location.
        builder.setRole(BeanDefinition.ROLE_INFRASTRUCTURE);
        builder.getRawBeanDefinition().setSource(parserContext.extractSource(element));

        builder.addConstructorArgReference(element.getAttribute(CACHE_MANAGER_ATTRIBUTE));
        builder.addConstructorArgReference(element.getAttribute(MBEAN_SERVER_ATTRIBUTE));
        builder.addConstructorArgValue(element.getAttribute(REGISTER_CACHE_MANAGER_ATTRIBUTE));
        builder.addConstructorArgValue(element.getAttribute(REGISTER_CACHES_ATTRIBUTE));
        builder.addConstructorArgValue(element.getAttribute(REGISTER_CACHE_CONFIGURATIONS_ATTRIBUTE));
        builder.addConstructorArgValue(element.getAttribute(REGISTER_CACHE_STATISTICS_ATTRIBUTE));

        builder.setInitMethodName("init");
        builder.setDestroyMethodName("dispose");

        return builder.getBeanDefinition();
    }
140564
public void hkManage(final Class<?> type) {
        if (!JerseyBinding.isHK2Managed(type, options.get(JerseyExtensionsManagedByGuice))) {
            throw new WrongContextException("HK2 creates service %s which must be managed by guice.",
                    type.getName());
        }
        hkManaged.add(type);
    }
514387
@VisibleForTesting
  void initializeHelixManager() {
    this.multiManager = new GobblinHelixMultiManager(
        this.config, new Function<Void, MessageHandlerFactory>() {
          @Override
          public MessageHandlerFactory apply(Void aVoid) {
            return GobblinClusterManager.this.getUserDefinedMessageHandlerFactory();
          }
        }, this.eventBus, stopStatus) ;
    this.multiManager.addLeadershipChangeAwareComponent(this);
  }
923168
@Override
    public ServiceCacheBuilder<T> threadFactory(ThreadFactory threadFactory)
    {
        this.threadFactory = threadFactory;
        this.executorService = null;
        return this;
    }
678249
private static ServiceRegistrarFactory createFactory() {
    final ServiceRegistrarFactory factory;
    final ServiceRegistrarFactory installed;
    try {
      installed = ServiceRegistrarLoader.load();
    } catch (ServiceRegistrarLoadingException e) {
      throw new RuntimeException("Unable to load service registrar", e);
    }
    if (installed == null) {
      log.debug("No service registrar plugin configured");
      factory = new NopServiceRegistrarFactory();
    } else {
      factory = installed;
      final String name = factory.getClass().getName();
      log.info("Loaded installed service registrar: {}", name);
    }
    return factory;
  }
1194676
public Invoker create(Object service, Invoker rootInvoker) {

        List<Method> timedmethods = new ArrayList<>();
        List<Method> meteredmethods = new ArrayList<>();
        List<Method> exceptionmeteredmethods = new ArrayList<>();

        for (Method m : service.getClass().getMethods()) {

            if (m.isAnnotationPresent(Timed.class)) {
                timedmethods.add(m);
            }

            if (m.isAnnotationPresent(Metered.class)) {
                meteredmethods.add(m);
            }

            if (m.isAnnotationPresent(ExceptionMetered.class)) {
                exceptionmeteredmethods.add(m);
            }
        }

        Invoker invoker = rootInvoker;

        if (timedmethods.size() > 0) {
            invoker = this.timed(invoker, timedmethods);
        }

        if (meteredmethods.size() > 0) {
            invoker = this.metered(invoker, meteredmethods);
        }

        if (exceptionmeteredmethods.size() > 0) {
            invoker = this.exceptionMetered(invoker, exceptionmeteredmethods);
        }

        return invoker;
    }
1226482
private <S> ConvertManagerTypeImpl<S> getOrCreate(Class<S> sourceType)
  {
    ConvertManagerTypeImpl<S> convertType
    = (ConvertManagerTypeImpl<S>) _convertMap.get(sourceType);
  
    if (convertType != null) {
      return convertType;
    }
    
    convertType = new ConvertManagerTypeImpl<>(sourceType);
    
    _convertMap.putIfAbsent(sourceType, convertType);

    return (ConvertManagerTypeImpl<S>) _convertMap.get(sourceType);
  }
472386
public CacheManagerBuilder<T> using(Service service) {
    Set<Service> newServices = new HashSet<>(services);
    newServices.add(service);
    return new CacheManagerBuilder<>(this, newServices);
  }
239405
private static void createFactoryInstance() {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "createFactoryInstance");
    try {
      Class cls = Class.forName(JS_MESSAGE_HANDLE_FACTORY_CLASS);
      instance = (JsMessageHandleFactory) cls.newInstance();
    }
    catch (Exception e) {
      FFDCFilter.processException(e, "com.ibm.ws.sib.mfp.JsMessageHandleFactory.createFactoryInstance", "133");
      SibTr.error(tc,"UNABLE_TO_CREATE_HANDLEFACTORY_CWSIF0031",e);
      NoClassDefFoundError ncdfe = new NoClassDefFoundError(e.getMessage());
      ncdfe.initCause(e);
      throw ncdfe;
    }
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "createFactoryInstance");
  }
267221
@Override
    public ManagedObject<T> createManagedObject(T existingInstance, ManagedObjectInvocationContext<T> invocationContext) {
        if (existingInstance == null) {
            throw new IllegalArgumentException("Existing instance must not be null");
        }
        return new ManagedObjectImpl<T>(existingInstance);
    }
195722
public static ManagedEntity createExactManagedEntity(ServerConnection sc, ManagedObjectReference mor) {
        return (ManagedEntity) createExactManagedObject(sc, mor);
    }
323030
public static Main mainEmbedded(ContextFactory factory,
                                    ScopeProvider scopeProvider,
                                    String title) {
        return mainEmbeddedImpl(factory, scopeProvider, title);
    }
424124
@SuppressWarnings("unchecked")
  private static <S> Iterable<S> constructAllServiceImplementations(Class<S> _service) {
    ClassLoader cl = CacheManagerImpl.class.getClassLoader();
    ArrayList<S> li = new ArrayList<S>();
    Iterator<S> it = ServiceLoader.load(_service, cl).iterator();
    while (it.hasNext()) {
      try {
        li.add(it.next());
      } catch (ServiceConfigurationError ex) {
        Log.getLog(CacheManager.class.getName()).debug("Error loading service '" + _service + "'", ex);
      }
    }
    final S[] a = (S[]) Array.newInstance(_service, li.size());
    li.toArray(a);
    return new Iterable<S>() {
      public Iterator<S> iterator() {
        return new Iterator<S>() {
          private int pos = 0;
          public boolean hasNext() {
            return pos < a.length;
          }
          public S next() {
            return a[pos++];
          }
          public void remove() {
            throw new UnsupportedOperationException();
          }
        };
      }
    };
  }
595901
public UserHousingComplexUnit instantiateForInsert() {
		UserHousingComplexUnit entity = new UserHousingComplexUnit();
		entity.setIsDeleted(Boolean.FALSE);
		return entity;
    }
1018518
public final ControlCreateDurable createNewControlCreateDurable() throws MessageCreateFailedException {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "createNewControlCreateDurable");
    ControlCreateDurable msg = null;
    try {
      msg = new ControlCreateDurableImpl(MfpConstants.CONSTRUCTOR_NO_OP);
    }
    catch (MessageDecodeFailedException e) {
      /* No need to FFDC this as JsMsgObject will already have done so */
      // No FFDC code needed
      throw new MessageCreateFailedException(e);
    }
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "createNewControlCreateDurable");
    return msg;
  }
1147006
protected static <E extends SubSystemBase> SystemManager
    preCreate(Class<E> serviceClass)
  {
    SystemManager system = SystemManager.getCurrent();
    if (system == null)
      throw new IllegalStateException(L.l("{0} must be created before {1}",
                                          SystemManager.class.getSimpleName(),
                                          serviceClass.getSimpleName()));
    
    if (system.getSystem(serviceClass) != null)
      throw new IllegalStateException(L.l("{0} was previously created",
                                          serviceClass.getSimpleName()));
    
    return system;
  }
537806
@SuppressWarnings("unchecked")
    private void createInstanceUsingMOF(ManagedObjectFactory<?> ejbManagedObjectFactory) throws InvocationTargetException {
        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
        if (isTraceOn && tc.isEntryEnabled())
            Tr.entry(tc, "createInstanceUsingMOF");

        try {
            if (isTraceOn && tc.isDebugEnabled())
                Tr.debug(tc, "calling ManagedObjectFactory.createManagedObject(InvocationContext)");

            @SuppressWarnings("rawtypes")
            InvocationContextImpl invCtx = getInvocationContext();
            ivManagedObject = ejbManagedObjectFactory.createManagedObject(invCtx);

            ivEjbManagedObjectContext = ivManagedObject.getContext();
            setEnterpriseBean(ivManagedObject.getObject());
        } catch (ManagedObjectException e) {
            //the callstack is epecting a InvocationTargetException so unwrap the ManagedObjectException and rewrap as InvocationTargetException
            Throwable cause = e.getCause();
            if (cause != null && cause instanceof Exception) {
                if (cause instanceof InvocationTargetException) {
                    throw (InvocationTargetException) cause;
                } else {
                    throw new InvocationTargetException(cause);
                }
            } else {
                throw new EJBException(home.beanMetaData.enterpriseBeanClassName, e);
            }
        } catch (Exception e) {
            // Reflection exceptions are unexpected.
            FFDCFilter.processException(e, CLASS_NAME + ".createInstanceUsingMOF", "321", this);
            throw new EJBException(home.beanMetaData.enterpriseBeanClassName, e);
        }

        if (isTraceOn && tc.isEntryEnabled())
            Tr.exit(tc, "createInstanceUsingMOF");
    }