• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java DeploymentUnitProcessingException类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.jboss.as.server.deployment.DeploymentUnitProcessingException的典型用法代码示例。如果您正苦于以下问题:Java DeploymentUnitProcessingException类的具体用法?Java DeploymentUnitProcessingException怎么用?Java DeploymentUnitProcessingException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



DeploymentUnitProcessingException类属于org.jboss.as.server.deployment包,在下文中一共展示了DeploymentUnitProcessingException类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: deploy

import org.jboss.as.server.deployment.DeploymentUnitProcessingException; //导入依赖的package包/类
@Override
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
    DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
    Module module = deploymentUnit.getAttachment(Attachments.MODULE);

    WildFlyConfigBuilder builder = new WildFlyConfigBuilder();
    builder.forClassLoader(module.getClassLoader())
            .addDefaultSources()
            .addDiscoveredSources()
            .addDiscoveredConverters();
    addConfigSourcesFromServices(builder, phaseContext.getServiceRegistry(), module.getClassLoader());
    Config config = builder.build();

    WildFlyConfigProviderResolver.INSTANCE.registerConfig(config, module.getClassLoader());

    if (WeldDeploymentMarker.isPartOfWeldDeployment(deploymentUnit)) {
        WeldPortableExtensions extensions = WeldPortableExtensions.getPortableExtensions(deploymentUnit);
        extensions.registerExtensionInstance(new ConfigExtension(), deploymentUnit);
    }

}
 
开发者ID:wildfly-extras,项目名称:wildfly-microprofile-config,代码行数:22,代码来源:SubsystemDeploymentProcessor.java


示例2: deploy

import org.jboss.as.server.deployment.DeploymentUnitProcessingException; //导入依赖的package包/类
/**
 * Add dependencies for modules required for NoSQL deployments
 */
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
    final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
    final Map<String, String> nosqlDriverModuleNameMap = DriverScanDependencyProcessor.getPerDeploymentDeploymentModuleName(deploymentUnit);
    if (nosqlDriverModuleNameMap == null) {
        return;
    }
    for (String nosqlDriverModuleName : nosqlDriverModuleNameMap.values()) {
        if (nosqlDriverModuleName != null) {
            final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION);
            final ModuleLoader moduleLoader = Module.getBootModuleLoader();
            addDependency(moduleSpecification, moduleLoader, ModuleIdentifier.fromString(nosqlDriverModuleName));
            addMongoCDIDependency(moduleSpecification, moduleLoader, nosqlDriverModuleName);
            addCassandraCDIDependency(moduleSpecification, moduleLoader, nosqlDriverModuleName);
            addNeo4jCDIDependency(moduleSpecification, moduleLoader, nosqlDriverModuleName);
            addOrientCDIDependency(moduleSpecification, moduleLoader, nosqlDriverModuleName);
        }
    }
}
 
开发者ID:wildfly,项目名称:wildfly-nosql,代码行数:22,代码来源:DriverDependencyProcessor.java


示例3: processMethodResource

import org.jboss.as.server.deployment.DeploymentUnitProcessingException; //导入依赖的package包/类
protected void processMethodResource(final DeploymentUnit deploymentUnit, final MethodInfo methodInfo, final String lookup) throws DeploymentUnitProcessingException {
    SubsystemService service = getService();
    String moduleName = getService().moduleNameFromJndi(lookup);
    if (moduleName != null) {
        savePerDeploymentModuleName(deploymentUnit, moduleName, service.vendorKey());
        ROOT_LOGGER.scannedResourceLookup(lookup, moduleName);
    } else {
        ROOT_LOGGER.ignoringResourceLookup(lookup, getService().jndiNames());
    }
}
 
开发者ID:wildfly,项目名称:wildfly-nosql,代码行数:11,代码来源:DriverScanDependencyProcessor.java


示例4: deploy

import org.jboss.as.server.deployment.DeploymentUnitProcessingException; //导入依赖的package包/类
@Override
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
    final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
    if (TeiidAttachments.isTranslator(deploymentUnit)) {
    	return;
    }

    List<ResourceRoot> resourceRoots = DeploymentUtils.allResourceRoots(deploymentUnit);
    for (ResourceRoot resourceRoot : resourceRoots) {
        final VirtualFile deploymentRoot = resourceRoot.getRoot();

        if (deploymentRoot.getChild("META-INF/services/org.teiid.translator.ExecutionFactory").exists())  { //$NON-NLS-1$
            TeiidAttachments.setAsTranslatorDeployment(deploymentUnit);
            //deploymentUnit.putAttachment(Attachments.IGNORE_OSGI, Boolean.TRUE);
            break;
        }
    }
}
 
开发者ID:kenweezy,项目名称:teiid,代码行数:19,代码来源:TranslatorStructureDeployer.java


示例5: deploy

import org.jboss.as.server.deployment.DeploymentUnitProcessingException; //导入依赖的package包/类
@Override
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
    final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
    if (!SwitchYardDeploymentMarker.isSwitchYardDeployment(deploymentUnit)) {
        return;
    }
    final DeploymentUnit parent = deploymentUnit.getParent();
    Boolean initializeInOrder = false;
    if (parent != null) {
        final EarMetaData earConfig = deploymentUnit.getParent().getAttachment(org.jboss.as.ee.structure.Attachments.EAR_METADATA);
        if (earConfig != null) {
            initializeInOrder = earConfig.getInitializeInOrder();
        }
    }
    doDeploy(phaseContext, deploymentUnit, initializeInOrder);
}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:17,代码来源:SwitchYardDeploymentProcessor.java


示例6: deploy

import org.jboss.as.server.deployment.DeploymentUnitProcessingException; //导入依赖的package包/类
@Override
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
    final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
    if (!SwitchYardDeploymentMarker.isSwitchYardDeployment(deploymentUnit)) {
        return;
    }

    if (WeldDeploymentMarker.isPartOfWeldDeployment(deploymentUnit)) {
        // Add the Weld portable extension
        final DeploymentUnit parent = deploymentUnit.getParent() == null ? deploymentUnit : deploymentUnit.getParent();
        synchronized (parent) {
            checkExtension(SWITCHYARD_CDI_EXTENSION, deploymentUnit, parent);
            checkExtension(DELTASPIKE_CDI_EXTENSION, deploymentUnit, parent);
        }
    } else {
        _logger.debug("SwitchYard Application for deployment unit '" + deploymentUnit.getName() + "' does not appear to contain CDI Beans "
                + "(no META-INF/beans.xml file in unit).  Not attaching SwitchYard CDI Discovery Extension to deployment.");
    }
}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:20,代码来源:SwitchYardCdiIntegrationProcessor.java


示例7: deploy

import org.jboss.as.server.deployment.DeploymentUnitProcessingException; //导入依赖的package包/类
@Override
public final void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
    final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
    // If the log context is already defined, skip the rest of the processing
    if (!hasRegisteredLogContext(deploymentUnit)) {
        if (deploymentUnit.hasAttachment(Attachments.MODULE) && deploymentUnit.hasAttachment(Attachments.DEPLOYMENT_ROOT)) {
            // don't process sub-deployments as they are processed by processing methods
            final ResourceRoot root = deploymentUnit.getAttachment(Attachments.DEPLOYMENT_ROOT);
            if (SubDeploymentMarker.isSubDeployment(root)) return;
            processDeployment(phaseContext, deploymentUnit, root);
            // If we still don't have a context registered on the root deployment, register the current context.
            // This is done to avoid any logging from the root deployment to have access to a sub-deployments log
            // context. For example any library logging from a EAR/lib should use the EAR's configured log context,
            // not a log context from a WAR or EJB library.
            if (!hasRegisteredLogContext(deploymentUnit) && !deploymentUnit.hasAttachment(DEFAULT_LOG_CONTEXT_KEY)) {
                // Register the current log context as this could be an embedded server or overridden another way
                registerLogContext(deploymentUnit, DEFAULT_LOG_CONTEXT_KEY, deploymentUnit.getAttachment(Attachments.MODULE), LogContext.getLogContext());
            }
        }
    }
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:22,代码来源:AbstractLoggingDeploymentProcessor.java


示例8: findConfigFile

import org.jboss.as.server.deployment.DeploymentUnitProcessingException; //导入依赖的package包/类
/**
 * Finds the configuration file to be used and returns the first one found.
 * <p/>
 * Preference is for {@literal logging.properties} or {@literal jboss-logging.properties}.
 *
 * @param file the file to check
 *
 * @return the configuration file if found, otherwise {@code null}
 *
 * @throws DeploymentUnitProcessingException if an error occurs.
 */
private VirtualFile findConfigFile(final VirtualFile file) throws DeploymentUnitProcessingException {
    VirtualFile result = null;
    try {
        final List<VirtualFile> configFiles = file.getChildren(ConfigFilter.INSTANCE);
        for (final VirtualFile configFile : configFiles) {
            final String fileName = configFile.getName();
            if (DEFAULT_PROPERTIES.equals(fileName) || JBOSS_PROPERTIES.equals(fileName)) {
                if (result != null) {
                    LoggingLogger.ROOT_LOGGER.debugf("The previously found configuration file '%s' is being ignored in favour of '%s'", result, configFile);
                }
                return configFile;
            } else if (LOG4J_PROPERTIES.equals(fileName) || LOG4J_XML.equals(fileName) || JBOSS_LOG4J_XML.equals(fileName)) {
                result = configFile;
            }
        }
    } catch (IOException e) {
        throw LoggingLogger.ROOT_LOGGER.errorProcessingLoggingConfiguration(e);
    }
    return result;
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:32,代码来源:LoggingConfigDeploymentProcessor.java


示例9: deploy

import org.jboss.as.server.deployment.DeploymentUnitProcessingException; //导入依赖的package包/类
@Override
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
    final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
    final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION);
    final ModuleLoader moduleLoader = Module.getBootModuleLoader();
    // Add the logging modules
    for (ModuleIdentifier moduleId : LOGGING_MODULES) {
        try {
            LoggingLogger.ROOT_LOGGER.tracef("Adding module '%s' to deployment '%s'", moduleId, deploymentUnit.getName());
            moduleLoader.loadModule(moduleId);
            moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, moduleId, false, false, false, false));
        } catch (ModuleLoadException ex) {
            LoggingLogger.ROOT_LOGGER.debugf("Module not found: %s", moduleId);
        }
    }
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:17,代码来源:LoggingDependencyDeploymentProcessor.java


示例10: deploy

import org.jboss.as.server.deployment.DeploymentUnitProcessingException; //导入依赖的package包/类
@Override
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
    final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
    final List<PermissionFactory> permissionFactories = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION).getPermissionFactories();
    final StringBuilder failedPermissions = new StringBuilder();
    for (PermissionFactory factory : permissionFactories) {
        // all permissions granted internally by the container are of type ImmediatePermissionFactory - they should
        // not be considered when validating the permissions granted to deployments via subsystem or deployment
        // descriptors.
        if (!(factory instanceof ImmediatePermissionFactory)) {
            Permission permission = factory.construct();
            boolean implied = this.maxPermissions.implies(permission);
            if (!implied) {
                failedPermissions.append("\n\t\t" + permission);

            }
        }
    }
    if (failedPermissions.length() > 0) {
        throw SecurityManagerLogger.ROOT_LOGGER.invalidDeploymentConfiguration(failedPermissions);
    }
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:23,代码来源:PermissionsValidationProcessor.java


示例11: handlingExistingClassPathEntry

import org.jboss.as.server.deployment.DeploymentUnitProcessingException; //导入依赖的package包/类
private void handlingExistingClassPathEntry(final ArrayDeque<RootEntry> resourceRoots, final DeploymentUnit topLevelDeployment, final VirtualFile topLevelRoot, final Map<VirtualFile, ResourceRoot> subDeployments, final Map<VirtualFile, AdditionalModuleSpecification> additionalModules, final Set<VirtualFile> existingAccessibleRoots, final ResourceRoot resourceRoot, final Attachable target, final VirtualFile classPathFile) throws DeploymentUnitProcessingException {
    if (existingAccessibleRoots.contains(classPathFile)) {
        ServerLogger.DEPLOYMENT_LOGGER.debugf("Class-Path entry %s in %s ignored, as target is already accessible", classPathFile, resourceRoot.getRoot());
    } else if (additionalModules.containsKey(classPathFile)) {
        final AdditionalModuleSpecification moduleSpecification = additionalModules.get(classPathFile);
        //as class path entries are exported, transitive dependencies will also be available
        target.addToAttachmentList(Attachments.CLASS_PATH_ENTRIES, moduleSpecification.getModuleIdentifier());
    } else if (subDeployments.containsKey(classPathFile)) {
        //now we need to calculate the sub deployment module identifier
        //unfortunately the sub deployment has not been setup yet, so we cannot just
        //get it from the sub deployment directly
        final ResourceRoot otherRoot = subDeployments.get(classPathFile);
        target.addToAttachmentList(Attachments.CLASS_PATH_ENTRIES, ModuleIdentifierProcessor.createModuleIdentifier(otherRoot.getRootName(), otherRoot, topLevelDeployment, topLevelRoot, false));
    } else {
        ModuleIdentifier identifier = createAdditionalModule(resourceRoot, topLevelDeployment, topLevelRoot, additionalModules, classPathFile, resourceRoots);
        target.addToAttachmentList(Attachments.CLASS_PATH_ENTRIES, identifier);
    }
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:19,代码来源:ManifestClassPathProcessor.java


示例12: createResourceRoot

import org.jboss.as.server.deployment.DeploymentUnitProcessingException; //导入依赖的package包/类
/**
 * Creates a {@link ResourceRoot} for the passed {@link VirtualFile file} and adds it to the list of {@link ResourceRoot}s
 * in the {@link DeploymentUnit deploymentUnit}
 *
 *
 * @param file           The file for which the resource root will be created
 * @return Returns the created {@link ResourceRoot}
 * @throws java.io.IOException
 */
private synchronized ResourceRoot createResourceRoot(final VirtualFile file, final DeploymentUnit deploymentUnit, final VirtualFile deploymentRoot) throws DeploymentUnitProcessingException {
    try {
        Map<String, MountedDeploymentOverlay> overlays = deploymentUnit.getAttachment(Attachments.DEPLOYMENT_OVERLAY_LOCATIONS);

        String relativeName = file.getPathNameRelativeTo(deploymentRoot);
        MountedDeploymentOverlay overlay = overlays.get(relativeName);
        Closeable closable = null;
        if(overlay != null) {
            overlay.remountAsZip(false);
        } else if(file.isFile()) {
            closable = VFS.mountZip(file, file, TempFileProviderService.provider());
        }
        final MountHandle mountHandle = new MountHandle(closable);
        final ResourceRoot resourceRoot = new ResourceRoot(file, mountHandle);
        ModuleRootMarker.mark(resourceRoot);
        ResourceRootIndexer.indexResourceRoot(resourceRoot);
        return resourceRoot;
    } catch (IOException e) {
        throw new RuntimeException(e);
    }
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:31,代码来源:ManifestClassPathProcessor.java


示例13: deploy

import org.jboss.as.server.deployment.DeploymentUnitProcessingException; //导入依赖的package包/类
@Override
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
    final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
    final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION);
    final ModuleLoader moduleLoader = Module.getBootModuleLoader();
    if (deploymentUnit.hasAttachment(Attachments.RESOURCE_ROOTS)) {
        final List<ResourceRoot> resourceRoots = deploymentUnit.getAttachmentList(Attachments.RESOURCE_ROOTS);
        for (ResourceRoot root : resourceRoots) {
            VirtualFile child = root.getRoot().getChild(SERVICE_FILE_NAME);
            if (child.exists()) {
                moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, JTA, false, false, false, false));
                break;
            }
        }
    }
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:17,代码来源:DriverDependenciesProcessor.java


示例14: deploy

import org.jboss.as.server.deployment.DeploymentUnitProcessingException; //导入依赖的package包/类
@Override
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
    final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
    final ModuleSpecification moduleSpec = deploymentUnit.getAttachment(org.jboss.as.server.deployment.Attachments.MODULE_SPECIFICATION);
    final Map<ModuleIdentifier, DeploymentUnit> deployments = new HashMap<ModuleIdentifier, DeploymentUnit>();
    //local classes are always first
    deploymentUnit.addToAttachmentList(Attachments.ACCESSIBLE_SUB_DEPLOYMENTS, deploymentUnit);
    buildModuleMap(deploymentUnit, deployments);

    for (final ModuleDependency dependency : moduleSpec.getAllDependencies()) {
        final DeploymentUnit sub = deployments.get(dependency.getIdentifier());
        if (sub != null) {
            deploymentUnit.addToAttachmentList(Attachments.ACCESSIBLE_SUB_DEPLOYMENTS, sub);
        }
    }
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:17,代码来源:DeploymentVisibilityProcessor.java


示例15: parse

import org.jboss.as.server.deployment.DeploymentUnitProcessingException; //导入依赖的package包/类
private ParseResult parse(final InputStream source, final File file, final DeploymentUnit deploymentUnit, final ModuleLoader moduleLoader)
        throws DeploymentUnitProcessingException {
    try {

        final XMLInputFactory inputFactory = INPUT_FACTORY;
        setIfSupported(inputFactory, XMLInputFactory.IS_VALIDATING, Boolean.FALSE);
        setIfSupported(inputFactory, XMLInputFactory.SUPPORT_DTD, Boolean.FALSE);
        final XMLStreamReader streamReader = inputFactory.createXMLStreamReader(source);
        try {
            final ParseResult result = new ParseResult(moduleLoader, deploymentUnit);
            mapper.parseDocument(result, streamReader);
            return result;
        } finally {
            safeClose(streamReader);
        }
    } catch (XMLStreamException e) {
        throw ServerLogger.ROOT_LOGGER.errorLoadingDeploymentStructureFile(file.getPath(), e);
    }
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:20,代码来源:DeploymentStructureDescriptorParser.java


示例16: addResourceRoot

import org.jboss.as.server.deployment.DeploymentUnitProcessingException; //导入依赖的package包/类
private void addResourceRoot(final ModuleSpec.Builder specBuilder, final ResourceRoot resource, final List<PermissionFactory> permFactories)
        throws DeploymentUnitProcessingException {
    try {
        final VirtualFile root = resource.getRoot();
        if (resource.getExportFilters().isEmpty()) {
            specBuilder.addResourceRoot(ResourceLoaderSpec.createResourceLoaderSpec(new VFSResourceLoader(resource
                    .getRootName(), root, resource.isUsePhysicalCodeSource())));
        } else {
            final MultiplePathFilterBuilder filterBuilder = PathFilters.multiplePathFilterBuilder(true);
            for (final FilterSpecification filter : resource.getExportFilters()) {
                filterBuilder.addFilter(filter.getPathFilter(), filter.isInclude());
            }
            specBuilder.addResourceRoot(ResourceLoaderSpec.createResourceLoaderSpec(new VFSResourceLoader(resource
                    .getRootName(), root, resource.isUsePhysicalCodeSource()), filterBuilder.create()));
        }
        // start with the root
        permFactories.add(new ImmediatePermissionFactory(
                new VirtualFilePermission(root.getPathName(), VirtualFilePermission.FLAG_READ)));
        // also include all children, recursively
        permFactories.add(new ImmediatePermissionFactory(
                new VirtualFilePermission(root.getChild("-").getPathName(), VirtualFilePermission.FLAG_READ)));
    } catch (IOException e) {
        throw ServerLogger.ROOT_LOGGER.failedToCreateVFSResourceLoader(resource.getRootName(), e);
    }
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:26,代码来源:ModuleSpecProcessor.java


示例17: deploy

import org.jboss.as.server.deployment.DeploymentUnitProcessingException; //导入依赖的package包/类
@Override
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
    final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
    final DelegatingClassFileTransformer transformer = deploymentUnit.getAttachment(DelegatingClassFileTransformer.ATTACHMENT_KEY);
    final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION);
    final Module module = deploymentUnit.getAttachment(Attachments.MODULE);
    if (module == null || transformer == null) {
        return;
    }
    try {
        for (String transformerClassName : moduleSpecification.getClassFileTransformers()) {
            transformer.addTransformer((ClassFileTransformer) module.getClassLoader().loadClass(transformerClassName).newInstance());
        }
        // activate transformer only after all delegate transformers have been added
        // so that transformers themselves are not instrumented
        transformer.setActive(true);
    } catch (Exception e) {
        throw ServerLogger.ROOT_LOGGER.failedToInstantiateClassFileTransformer(ClassFileTransformer.class.getSimpleName(), e);
    }
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:21,代码来源:ClassFileTransformerProcessor.java


示例18: parse

import org.jboss.as.server.deployment.DeploymentUnitProcessingException; //导入依赖的package包/类
private void parse(final VirtualFile file,final XMLMapper mapper, final JBossAllXmlParseContext context) throws DeploymentUnitProcessingException {
    final FileInputStream fis;
    final File realFile;
    try {
        realFile = file.getPhysicalFile();
        fis = new FileInputStream(realFile);
    } catch (IOException e) {
        //should never happen as we check for existence
        throw new DeploymentUnitProcessingException(e);
    }
    try {
        parse(fis, realFile, mapper, context);
    } finally {
        safeClose(fis);
    }
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:17,代码来源:JBossAllXMLParsingProcessor.java


示例19: deploy

import org.jboss.as.server.deployment.DeploymentUnitProcessingException; //导入依赖的package包/类
@Override
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
    final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
    if (deploymentUnit.hasAttachment(DeploymentDependencies.ATTACHMENT_KEY)) {
        if (deploymentUnit.getParent() != null) {
            ServerLogger.DEPLOYMENT_LOGGER.deploymentDependenciesAreATopLevelElement(deploymentUnit.getName());
        } else {
            processDependencies(phaseContext, deploymentUnit);
        }
    }

    if (deploymentUnit.getParent() != null) {
        DeploymentUnit parent = deploymentUnit.getParent();
        if (parent.hasAttachment(DeploymentDependencies.ATTACHMENT_KEY)) {
            processDependencies(phaseContext, parent);
        }
    }
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:19,代码来源:DeploymentDependenciesProcessor.java


示例20: deploy

import org.jboss.as.server.deployment.DeploymentUnitProcessingException; //导入依赖的package包/类
@Override
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
    DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
    String deploymentName = deploymentUnit.getName();

    if (deploymentUnit.getParent() != null) {
        deploymentName = deploymentUnit.getParent().getName();
    }

    if (deploymentName.equals(filename)) {
        long before = System.currentTimeMillis();
        try {
            processAnnotationIndex(deploymentUnit);
        } catch (Exception e) {
            throw new DeploymentUnitProcessingException(e);
        }
        long duration = System.currentTimeMillis() - before;
        DbBootstrapLogger.ROOT_LOGGER.infof("Database bootstrapping took [%s] ms", duration);
    } else {
        DbBootstrapLogger.ROOT_LOGGER.tracef("%s did not match %s", filename, deploymentName);
    }
}
 
开发者ID:wildfly-extras,项目名称:db-bootstrap,代码行数:23,代码来源:DbBootstrapScanDetectorProcessor.java



注:本文中的org.jboss.as.server.deployment.DeploymentUnitProcessingException类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Matrix3f类代码示例发布时间:2022-05-21
下一篇:
Java KeyStoreLoginModule类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap