/**
   * Construct a new instance.
   *
   * @param componentConfiguration the component configuration
   */
  public EJBComponentCreateService(
      final ComponentConfiguration componentConfiguration,
      final EjbJarConfiguration ejbJarConfiguration) {
    super(componentConfiguration);

    this.componentConfiguration = componentConfiguration;

    this.ejbJarConfiguration = ejbJarConfiguration;

    EJBComponentDescription ejbComponentDescription =
        (EJBComponentDescription) componentConfiguration.getComponentDescription();
    this.transactionManagementType = ejbComponentDescription.getTransactionManagementType();

    // CMTTx
    if (transactionManagementType.equals(TransactionManagementType.CONTAINER)) {
      // slurp some memory
      this.txAttrs =
          new ConcurrentHashMap<
              MethodIntf,
              ConcurrentMap<String, ConcurrentMap<ArrayKey, TransactionAttributeType>>>();
    } else {
      this.txAttrs = null;
    }
    List<ViewConfiguration> views = componentConfiguration.getViews();
    if (views != null) {
      for (ViewConfiguration view : views) {
        final MethodIntf viewType =
            ejbComponentDescription.getMethodIntf(view.getViewClass().getName());
        for (Method method : view.getProxyFactory().getCachedMethods()) {
          this.processTxAttr(ejbComponentDescription, viewType, method);
        }
      }
    }
    // FIXME: TODO: a temporary measure until EJBTHREE-2120 is fully resolved, let's create tx
    // attribute map
    // for the component methods. Once the issue is resolved, we should get rid of this block and
    // just rely on setting
    // up the tx attributes only for the views exposed by this component
    Set<Method> componentMethods = componentConfiguration.getDefinedComponentMethods();
    if (componentMethods != null) {
      for (Method method : componentMethods) {
        this.processTxAttr(ejbComponentDescription, MethodIntf.BEAN, method);
      }
    }
    final HashMap<String, ServiceName> viewServices = new HashMap<String, ServiceName>();
    for (ViewDescription view : componentConfiguration.getComponentDescription().getViews()) {
      viewServices.put(view.getViewClassName(), view.getServiceName());
    }
    this.viewServices = viewServices;
  }