This method does not apply to EJB 3.0 business interfaces. All mappings
should be based on the EJB 2.1 specification, and the exceptions new
in EJB 3.0 should not be used, even for EJB 2.1 component interfaces
in an EJB 3.0 module. <p>
6562
@Override
    public Exception
                    mapCSITransactionRolledBackException(EJSDeployedSupport s, CSITransactionRolledbackException ex)
                                    throws com.ibm.websphere.csi.CSIException
    {
        //d180095
        // Ensure root is set before doing the mapping.
        if (s.rootEx == null)
        {
            s.rootEx = ExceptionUtil.findRootCause(ex);
        }

        Exception mappedEx = mapException(s, ex);

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "MappedException = " + mappedEx);
        }
        // set the stack trace in CORBA exception to the exception stack for
        // the root cause of the exception.
        mappedEx.setStackTrace(s.rootEx.getStackTrace());

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "returning: " + mappedEx); //150727 d402055
        }
        return mappedEx;
    }
1240212
public ComponentNameSpaceConfiguration finishBMDInitForReferenceContext(BeanMetaData bmd) throws EJBConfigurationException, ContainerException {
        return ivEJBMDOrchestrator.finishBMDInitForReferenceContext(bmd,
                                                                    ivDefaultDataSourceJNDIName,
                                                                    ivWebServicesHandlerResolver);
    }
326903
private static boolean mappingCompatible(EntitySchema oldSchema,
      EntitySchema newSchema) {
    for (FieldMapping oldFieldMapping : oldSchema.getColumnMappingDescriptor()
        .getFieldMappings()) {
      FieldMapping newFieldMapping = newSchema.getColumnMappingDescriptor()
          .getFieldMapping(oldFieldMapping.getFieldName());
      if (newFieldMapping != null) {
        if (!oldFieldMapping.equals(newFieldMapping)) {
          return false;
        }
      }
    }
    return true;
  }
66308
protected void bindInterfaces(NameSpaceBinder<?> binder, BeanMetaData bmd) throws Exception {
        HomeWrapperSet homeSet = null;
        EJSHome home = bmd.homeRecord.getHome();
        if (home != null) {
            homeSet = home.getWrapperSet();
        }

        int numRemoteInterfaces = countInterfaces(bmd, false);
        int numLocalInterfaces = countInterfaces(bmd, true);
        boolean singleGlobalInterface = (numRemoteInterfaces + numLocalInterfaces) == 1;

        bindInterfaces(binder, bmd, homeSet, false, numRemoteInterfaces, singleGlobalInterface);
        bindInterfaces(binder, bmd, homeSet, true, numLocalInterfaces, singleGlobalInterface);
    }
1022488
@Override
    public boolean apply(final int[] mapping) {

        // no grouping required
        if (queryComponents == null) return true;

        // bidirectional map of query/target components, last index
        // of query components holds the count
        int[] usedBy = new int[targetComponents[targetComponents.length-1]+1];
        int[] usedIn = new int[queryComponents[queryComponents.length-1] + 1];

        // verify we don't have any collisions
        for (int v = 0; v < mapping.length; v++) {
            if (queryComponents[v] == 0) continue;

            int w = mapping[v];

            int queryComponent = queryComponents[v];
            int targetComponent = targetComponents[w];

            // is the target component already used by a query component?
            if (usedBy[targetComponent] == 0)
                usedBy[targetComponent] = queryComponent;
            else if (usedBy[targetComponent] != queryComponent) return false;

            // is the query component already used in a target component?
            if (usedIn[queryComponent] == 0)
                usedIn[queryComponent] = targetComponent;
            else if (usedIn[queryComponent] != targetComponent) return false;

        }

        return true;
    }
480603
public function validate()
    {
        if (!$this->translations) {
            throw new MappingException(sprintf('No translations specified for %s', $this->name));
        }

        if (!$this->targetEntity) {
            throw new MappingException(sprintf('No translations targetEntity specified for %s', $this->name));
        }
    }
1150246
private boolean isDefaultInterceptorsExcluded(Method m, EJBInterceptorBinding binding)
    {
        boolean exclude;
        if (ivExcludeDefaultFromClassLevel)
        {
            // Default interceptors excluded as class level, so return true.
            exclude = true;
        }
        else if (binding != null && binding.ivExcludeDefaultLevelInterceptors != null)
        {
            // Assumption is xml overrides annotation, although EJB spec implies
            // interceptor-binding is used to augment annotation.  Not clear what
            // is intended, but we are going to assume xml overrides annotation.
            exclude = binding.ivExcludeDefaultLevelInterceptors;
        }
        else
        {
            // If the module is not metadata complete, then check the annotation
            // to determine whether to exclude default interceptors.
            exclude = !ivMetadataComplete && m.getAnnotation(ExcludeDefaultInterceptors.class) != null;
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
        {
            Tr.debug(tc, "isDefaultInterceptorsExcluded for " + m.getDeclaringClass() + "." + m.getName()
                         + " returning: " + exclude);
        }
        return exclude;
    }
959735
@Override
    public EJBBinding createJavaBindingObject(HomeRecord hr,
                                              HomeWrapperSet homeSet,
                                              String interfaceName,
                                              int interfaceIndex,
                                              boolean local,
                                              EJBBinding bindingObject) {
        return bindingObject;
    }
1201319
public void registerComponentBindingsProvider(ServiceReference reference) {
		log.info("registerComponentBindingsProvider");
		log.info("Registering Component Bindings Provider {} - {}",
				new Object[] { reference.getProperty(Constants.SERVICE_ID),
						reference.getProperty(Constants.SERVICE_PID) });
		String[] resourceTypes = OsgiUtil.toStringArray(reference
				.getProperty(ComponentBindingsProvider.RESOURCE_TYPE_PROP),
				new String[0]);
		for (String resourceType : resourceTypes) {
			if (!this.containsKey(resourceType)) {
				put(resourceType, new HashSet<ServiceReference>());
			}
			log.debug("Adding to resource type {}", resourceType);
			get(resourceType).add(reference);
		}
	}
649688
@Override
    protected void init() throws Exception {
        final boolean trace = TraceComponent.isAnyTracingEnabled();

        try {
            PropertyService vProps = new PropertyService();
            NavigableMap<String, Object> wProps = parseConfiguration(properties, vProps);

            // Clone properties so that we can later detect modifications from the current values
            vProps = (PropertyService) vProps.clone();

            String jndiName = (String) wProps.remove(JNDI_NAME);
            String type = (String) wProps.remove(DSConfig.TYPE);

            // Trace some of the most important config settings
            if (trace && tc.isDebugEnabled())
                Tr.debug(this, tc, DATASOURCE, id, jndiName, type);

            // Get the connection manager service for this data source. If none is configured, then use defaults.
            conMgrSvc = (ConnectionManagerService) priv.locateService(componentContext,CONNECTION_MANAGER);

            boolean createdDefaultConnectionManager = false;
            
            if (conMgrSvc == null) {
                if (wProps.containsKey(DSConfig.CONNECTION_MANAGER_REF)) {
                    SQLNonTransientException failure = connectorSvc.ignoreWarnOrFail(tc, null, SQLNonTransientException.class, "MISSING_RESOURCE_J2CA8030",
                                                                                    DSConfig.CONNECTION_MANAGER_REF, "", DATASOURCE, jndiName == null ? id : jndiName);
                    if (failure != null)
                        throw failure;
                }
                conMgrSvc = ConnectionManagerService.createDefaultService(id);
                createdDefaultConnectionManager = true;

            }
            conMgrSvc.addObserver(this);

            // Obtain the data source from the JDBC driver
            // TODO: Switch to org.osgi.service.jdbc.DataSourceFactory for compatibility with OSGI JDBC drivers
            jdbcDriverSvc = (JDBCDriverService) priv.locateService(componentContext,JDBC_DRIVER);

            if (jdbcDriverSvc == null) {
                Tr.error(tc, "DSRA4003.driver.null", jndiName == null ? id : jndiName);

                throw new SQLNonTransientException(ConnectorService.getMessage("MISSING_RESOURCE_J2CA8030", DSConfig.JDBC_DRIVER_REF,
                                                                               "", DATASOURCE, jndiName == null ? id : jndiName));
            }
            jdbcDriverSvc.addObserver(this);

            Object vendorImpl;
            Class<?> ifc;

            if(type == null){
                boolean atLeastJDBC43 = jdbcRuntime.getVersion().compareTo(JDBCRuntimeVersion.VERSION_4_3) >= 0;
                vendorImpl = atLeastJDBC43 || id != null && id.contains("dataSource[DefaultDataSource]")
                                ? jdbcDriverSvc.createAnyPreferXADataSource(vProps, id)
                                : jdbcDriverSvc.createAnyPreferLegacyOrder(vProps, id);
                ifc = vendorImpl instanceof XADataSource ? XADataSource.class
                    : vendorImpl instanceof ConnectionPoolDataSource ? ConnectionPoolDataSource.class
                    : vendorImpl instanceof DataSource ? DataSource.class
                    : Driver.class;
            } else if (ConnectionPoolDataSource.class.getName().equals(type)) {
                ifc = ConnectionPoolDataSource.class;
                vendorImpl = jdbcDriverSvc.createConnectionPoolDataSource(vProps, id);
            } else if (XADataSource.class.getName().equals(type)) {
                ifc = XADataSource.class;
                vendorImpl = jdbcDriverSvc.createXADataSource(vProps, id);
            } else if (DataSource.class.getName().equals(type)) {
                ifc = DataSource.class;
                vendorImpl = jdbcDriverSvc.createDataSource(vProps, id);
            } else if (Driver.class.getName().equals(type)) {
                ifc = Driver.class;
                String url = vProps.getProperty("URL", vProps.getProperty("url"));
                if (url != null && !"".equals(url)) {
                    vendorImpl = jdbcDriverSvc.getDriver(url, vProps, id);
                } else 
                    throw new SQLNonTransientException(AdapterUtil.getNLSMessage("DSRA4014.URL.for.Driver.missing", jndiName == null ? id : jndiName));
            } else
                throw new SQLNonTransientException(ConnectorService.getMessage("MISSING_RESOURCE_J2CA8030", DSConfig.TYPE, type, DATASOURCE, jndiName == null ? id : jndiName));

            // Convert isolationLevel constant name to integer
            vendorImplClassName = vendorImpl.getClass().getName();
            parseIsolationLevel(wProps, vendorImplClassName);
            
            Object objIsolationLevel = wProps.get(DataSourceDef.isolationLevel.name());
            int wIsolationLevel = objIsolationLevel == null ? -1 : (int) objIsolationLevel;
            
            if(wIsolationLevel == Connection.TRANSACTION_NONE) {
                Object objTransactional = wProps.get(DataSourceDef.transactional.name());
                boolean wTransactional = objTransactional == null ? true : (boolean) objTransactional;
                
                if (wTransactional) {
                    throw new SQLException(AdapterUtil.getNLSMessage("DSRA4009.tran.none.transactional.unsupported", id));
                }
            }

            // Derby Embedded needs a reference count so that we can shutdown databases when no longer used.
            isDerbyEmbedded = vendorImplClassName.startsWith("org.apache.derby.jdbc.Embedded");
            if (isDerbyEmbedded) {
                String dbName = (String) vProps.get(DataSourceDef.databaseName.name());
                if (dbName != null) {
                    // Maintaining compatibility here. Variables are no longer normalized by default, but the ResourceFactoryBuilder is still
                    // using VariableRegistry.resolveString() to resolve variables in data source definitions. 
                    dbName = PathUtils.normalize(dbName);
                    embDerbyRefCount.add(dbName);
                    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                        Tr.debug(this, tc, "ref count for database shutdown", dbName, embDerbyRefCount);
                }
            }

            isUCP = vendorImplClassName.startsWith("oracle.ucp");
            if (isUCP) {
                if (!createdDefaultConnectionManager && !sentUCPConnMgrPropsIgnoredInfoMessage) {
                    Set<String> connMgrPropsAllowed = Collections.singleton("enableSharingForDirectLookups");
                    Tr.info(tc, "DSRA4013.ignored.connection.manager.config.used", connMgrPropsAllowed);
                    sentUCPConnMgrPropsIgnoredInfoMessage = true;
                }
                updateConfigForUCP(wProps);
            }

            dsConfigRef.set(new DSConfig(id, jndiName, wProps, vProps, connectorSvc));

            WSManagedConnectionFactoryImpl mcfImpl = new WSManagedConnectionFactoryImpl(dsConfigRef, ifc, vendorImpl, jdbcRuntime);

            if (jdbcDriverSvc.loadFromApp()) {
                // data source class loaded from thread context class loader
                mcf = null;
                mcfPerClassLoader = new ConcurrentHashMap<String, WSManagedConnectionFactoryImpl>();
                ClassLoader tccl = priv.getContextClassLoader();
                String identifier = connectorSvc.getClassLoaderIdentifierService().getClassLoaderIdentifier(tccl);
                mcfPerClassLoader.put(identifier, mcfImpl);
            } else {
                // data source class loaded from shared library
                mcf = mcfImpl;
                mcfPerClassLoader = null;
            }

            isInitialized.set(true);
        } catch (Exception x) {
            FFDCFilter.processException(x, getClass().getName(), "587", this);
            // undo any partial initialization
            if (conMgrSvc != null)
                conMgrSvc.deleteObserver(this);
            if (jdbcDriverSvc != null)
                jdbcDriverSvc.deleteObserver(this);
            throw x;
        } catch (Error x) {
            FFDCFilter.processException(x, getClass().getName(), "591", this);
            // undo any partial initialization
            if (conMgrSvc != null)
                conMgrSvc.deleteObserver(this);
            if (jdbcDriverSvc != null)
                jdbcDriverSvc.deleteObserver(this);
            throw x;
        }
    }
450928
@Override
    public void setConstraintMappings(Configuration<?> config) throws IOException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "setConstraintMappings", config);
        }
        InputStream inputStream = null;
        ClassLoader ccl = getContextClassLoader();

        for (String fileName : getConstraintMapping()) {
            // get an inputstream to the file
            inputStream = ccl.getResource(fileName).openStream();

            // if debugging then dump out the input stream to make sure it is valid
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                inputStream = dumpInputStream(inputStream);
                if (inputStream == null) {
                    // we ran into trouble while dumping the stream... try again
                    inputStream = ccl.getResource(fileName).openStream();
                }
            }
            config.addMapping(inputStream);
            // add to list so we can close the inputStreams  later.
            mapFileInputStreams.add(inputStream);
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "setConstraintMappings");
        }
    }
12076
public void validateInjectionPointForDefinitionErrors(InjectionPoint ij, Bean<?> bean, BeanManagerImpl beanManager) {
        if (ij.getAnnotated().getAnnotation(New.class) != null && ij.getQualifiers().size() > 1) {
            throw ValidatorLogger.LOG.newWithQualifiers(ij, Formats.formatAsStackTraceElement(ij));
        }
        if (ij.getType() instanceof TypeVariable<?>) {
            throw ValidatorLogger.LOG.injectionPointWithTypeVariable(ij, Formats.formatAsStackTraceElement(ij));
        }

        // WELD-1739
        if (ij.getMember() instanceof Executable && ij.getAnnotated().isAnnotationPresent(Named.class)
                && ij.getAnnotated().getAnnotation(Named.class).value().equals("")) {

            Executable executable = (Executable) ij.getMember();
            AnnotatedParameter<?> annotatedParameter = (AnnotatedParameter<?>) ij.getAnnotated();

            if (!executable.getParameters()[annotatedParameter.getPosition()].isNamePresent()) {
                // No parameters info available
                throw ValidatorLogger.LOG.nonFieldInjectionPointCannotUseNamed(ij, Formats.formatAsStackTraceElement(ij));
            }
        }

        if (ij.getAnnotated().isAnnotationPresent(Produces.class)) {
            if (bean != null) {
                throw BeanLogger.LOG.injectedFieldCannotBeProducer(ij.getAnnotated(), bean);
            } else {
                throw BeanLogger.LOG.injectedFieldCannotBeProducer(ij.getAnnotated(), Reflections.<AnnotatedField<?>>cast(ij.getAnnotated()).getDeclaringType());
            }
        }
        boolean newBean = (bean instanceof NewBean);
        if (!newBean) {
            checkScopeAnnotations(ij, beanManager.getServices().get(MetaAnnotationStore.class));
        }
        checkFacadeInjectionPoint(ij, Instance.class);
        checkFacadeInjectionPoint(ij, Event.class);

        if (InterceptionFactory.class.equals(Reflections.getRawType(ij.getType())) && !(bean instanceof ProducerMethod<?, ?>)) {
            throw ValidatorLogger.LOG.invalidInterceptionFactoryInjectionPoint(ij, Formats.formatAsStackTraceElement(ij));
        }

        for (PlugableValidator validator : plugableValidators) {
            validator.validateInjectionPointForDefinitionErrors(ij, bean, beanManager);
        }
    }
468419
@SuppressWarnings("unchecked")
    private boolean prepareMapping(String index, Map<String, Object> defaultMappings) {
        boolean success = true;

        for (Map.Entry<String, Object> stringObjectEntry : defaultMappings.entrySet()) {
            Map<String, Object> mapping = (Map<String, Object>) stringObjectEntry.getValue();
            if (mapping == null) {
                throw new RuntimeException("type mapping not defined");
            }
            PutMappingRequestBuilder putMappingRequestBuilder = client.admin().indices().preparePutMapping()
                    .setIndices(index);
            putMappingRequestBuilder.setType(stringObjectEntry.getKey());
            putMappingRequestBuilder.setSource(mapping);

            if (log.isLoggable(Level.FINE)) {
                log.fine("Elasticsearch create mapping for index '"
                        + index + " and type '" + stringObjectEntry.getKey() + "': " + mapping);
            }

            PutMappingResponse resp = putMappingRequestBuilder.execute().actionGet();

            if (resp.isAcknowledged()) {
                if (log.isLoggable(Level.FINE)) {
                    log.fine("Elasticsearch mapping for index '"
                            + index + " and type '" + stringObjectEntry.getKey() + "' was acknowledged");
                }
            } else {
                success = false;
                log.warning("Elasticsearch mapping creation was not acknowledged for index '"
                        + index + " and type '" + stringObjectEntry.getKey() + "'");
            }
        }

        return success;
    }
966204
@SuppressWarnings("unchecked")
    private void initTypesMapping() {
        if (mapping == null) {
            throw new IllegalStateException("Mapping does contain any information in " +
                    "DeployerTypesResolver " + this);
        }

        if (mapping.containsKey(NODE_TYPES_MAPPING_SECTION)) {
            log.debug("Mapping contains NodeTypes mapping");
            nodeTypesMapping = (Map<String, String>) mapping.get(NODE_TYPES_MAPPING_SECTION);
        }

        if (mapping.containsKey(RELATIONSHIP_TYPES_MAPPING_SECTION)) {
            log.debug("Mapping contains NodeTypes mapping");
            relationshipTypesMapping = (Map<String, String>) mapping
                    .get(RELATIONSHIP_TYPES_MAPPING_SECTION);
        }

        if (mapping.containsKey(NODE_TYPES_DEFINITIONS)) {
            log.debug("Mapping contains NodeTypes description");
            nodeTypesDefinitions = (Map<String, Object>) mapping.get(NODE_TYPES_DEFINITIONS);
        }

        if (mapping.containsKey(POLICY_TYPES_MAPPING_SECTION)) {
            log.debug("Mapping contains Policy mapping");
            policyTypesMapping = (Map<String, String>) mapping.get(POLICY_TYPES_MAPPING_SECTION);
        }
    }
1265984
public void validateInjectionPoint(InjectionPoint ij, BeanManagerImpl beanManager) {
        validateInjectionPointForDefinitionErrors(ij, ij.getBean(), beanManager);
        validateMetadataInjectionPoint(ij, ij.getBean(), ValidatorLogger.INJECTION_INTO_NON_BEAN);
        validateEventMetadataInjectionPoint(ij);
        validateInjectionPointForDeploymentProblems(ij, ij.getBean(), beanManager);
    }
349669
public WSEJBEndpointManager createWebServiceEndpointManager(J2EEName j2eeName,
                                                                Class<?> provider, // d492780, F87951
                                                                Method[] methods) throws EJBException, EJBConfigurationException {
        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled(); // d532639.2

        if (isTraceOn && tc.isEntryEnabled())
            Tr.entry(tc, "createWebServiceEndpointManager : " + j2eeName,
                     new Object[] { provider, methods });

        EJSHome home = (EJSHome) homeOfHomes.getHome(j2eeName);

        // If a WebService request comes in after a home has been uninstalled,
        // then it won't be found.                                         d547849
        if (home == null) {
            if (isTraceOn && tc.isEntryEnabled())
                Tr.exit(tc, "createWebServiceEndpointManager could not find home for : " +
                            j2eeName);
            throw ExceptionUtil.EJBException("Unable to find EJB component: " + j2eeName, null);
        }

        BeanMetaData bmd = home.beanMetaData;
        Method[] endpointMethods = methods;

        // -----------------------------------------------------------------------
        // If this is the first time the endpoint has been accessed,
        // then resolve the methods to insure this is a valid configuration
        // and JITDeploy the WSEJBProxy class if there are around invoke
        // interceptors.                                                   d497921
        // -----------------------------------------------------------------------
        synchronized (bmd) {
            if (!bmd.ivWebServiceEndpointCreated) {
                if (provider != null) {
                    // The Web Service Endpoint Interface from ejb-jar.xml is for
                    // JAX-RPC, and cannot be used with a JAX-WS Provider.
                    if (bmd.webserviceEndpointInterfaceClass != null) {
                        // Log the error and throw meaningful exception.
                        Tr.error(tc, "WS_ENDPOINT_PROVIDER_CONFLICT_CNTR0176E",
                                 new Object[] { bmd.webserviceEndpointInterfaceClass.getName(),
                                                bmd.j2eeName.getComponent(),
                                                bmd.j2eeName.getModule(),
                                                bmd.j2eeName.getApplication() });
                        throw new EJBConfigurationException("Web Service Provider interface conflicts with the " +
                                                            "configured Web Service Endpoint interface " +
                                                            bmd.webserviceEndpointInterfaceClass.getName() +
                                                            " for the " + bmd.j2eeName.getComponent() +
                                                            " bean in the " + bmd.j2eeName.getModule() +
                                                            " module of the " + bmd.j2eeName.getApplication() +
                                                            " application.");
                    }

                    endpointMethods = provider.getMethods();

                    if (isTraceOn && tc.isDebugEnabled())
                        Tr.debug(tc, "provider methods : ", (Object[]) endpointMethods);
                }

                // Resolve the Web Service Endpoint methods.  This will make sure that
                // the bean actually implements the methods, but will also remove any
                // excess methodInfos for the webservice endpoint interface in BMD.
                // Until now, EJBContainer is not aware of what the endpoint methods
                // are, so assumes all methods on the bean may be endpoint methods.
                boolean hasAroundInvoke = WSEJBWrapper.resolveWebServiceEndpointMethods(bmd, endpointMethods);

                // Finally, if any of the methods have around invoke interceptors,
                // then a WSEJBProxy must be created by JITDeploy.  An instance of
                // the proxy will be returned to WebServices component to invoke
                // the bean method, instead of an actual bean instance.
                if (hasAroundInvoke) {
                    try {
                        bmd.ivWebServiceEndpointProxyClass = JITDeploy.generateWSEJBProxy(bmd.classLoader,
                                                                                          bmd.ivWebServiceEndpointProxyName,
                                                                                          provider,
                                                                                          endpointMethods,
                                                                                          bmd.wsEndpointMethodInfos,
                                                                                          bmd.enterpriseBeanClassName,
                                                                                          bmd.j2eeName.toString(),
                                                                                          getEJBRuntime().getClassDefiner()); // F70650
                    } catch (ClassNotFoundException ex) {
                        // Log the error and throw meaningful exception.
                        Tr.error(tc, "WS_EJBPROXY_FAILURE_CNTR0177E",
                                 new Object[] { bmd.j2eeName.getComponent(),
                                                bmd.j2eeName.getModule(),
                                                bmd.j2eeName.getApplication(),
                                                ex });
                        throw ExceptionUtil.EJBException("Failure occurred attempting to create a Web service " +
                                                         "endpoint proxy for the " + bmd.j2eeName.getComponent() +
                                                         " bean in the " + bmd.j2eeName.getModule() +
                                                         " module of the " + bmd.j2eeName.getApplication() +
                                                         " application.", ex);
                    }
                }

                bmd.ivWebServiceEndpointCreated = true;

                // Dump the BeanMetaData now that the endpoint methodinfos are set.
                bmd.dump();
            }
        } // end synchronization                                        d521886

        // -----------------------------------------------------------------------
        // Create a new instance of the generic Web Services Endpoint EJB Wrapper,
        // and initialize it specific to the requested bean type.
        // -----------------------------------------------------------------------

        WSEJBWrapper wrapper = new WSEJBWrapper();

        wrapper.container = this;
        wrapper.wrapperManager = wrapperManager;
        wrapper.ivCommon = null; // Not cached
        wrapper.isManagedWrapper = false; // Not managed
        wrapper.ivInterface = WrapperInterface.SERVICE_ENDPOINT;

        // Now, fill in the home specific information.
        wrapper.beanId = home.ivStatelessId;
        wrapper.bmd = bmd;
        wrapper.methodInfos = bmd.wsEndpointMethodInfos;
        wrapper.methodNames = bmd.wsEndpointMethodNames;
        wrapper.isolationAttrs = null; // not used for EJB 2.x
        wrapper.ivPmiBean = home.pmiBean;

        if (isTraceOn && tc.isEntryEnabled())
            Tr.exit(tc, "createWebServiceEndpointManager : " + wrapper);

        return wrapper;
    }
1238805
@Override
    public void componentMetaDataCreated(MetaDataEvent<ComponentMetaData> event) {
        JaccService js = jaccService.getService();
        if (js != null) {
            MetaData metaData = event.getMetaData();
            if (metaData instanceof BeanMetaData) {
                BeanMetaData bmd = (BeanMetaData) metaData;
                js.propagateEJBRoles(bmd.j2eeName.getApplication(), bmd.j2eeName.getModule(), bmd.enterpriseBeanName, bmd.ivRoleLinkMap,
                                     JaccUtil.convertMethodInfoList(JaccUtil.mergeMethodInfos(bmd)));
            }
        }
    }