Package org.jboss.as.server.deployment

Examples of org.jboss.as.server.deployment.DeploymentUnit.addToAttachmentList()


                        final Closeable closable = child.isFile() ? mount(child, false) : null;
                        final MountHandle mountHandle = new MountHandle(closable);
                        final ResourceRoot childResource = new ResourceRoot(child, mountHandle);
                        if (child.getName().toLowerCase().endsWith(JAR_EXTENSION)) {
                            ModuleRootMarker.mark(childResource);
                            deploymentUnit.addToAttachmentList(Attachments.RESOURCE_ROOTS, childResource);
                        }
                    }
                }
            } else {
                libDir = null;
View Full Code Here


                }

                final AdditionalModuleSpecification additional = new AdditionalModuleSpecification(additionalModule .getModuleIdentifier(), additionalModule.getResourceRoots());
                additional.addAliases(additionalModule.getAliases());
                additional.addSystemDependencies(additionalModule.getModuleDependencies());
                deploymentUnit.addToAttachmentList(Attachments.ADDITIONAL_MODULES, additional);
                for(final ResourceRoot root: additionalModule.getResourceRoots()) {
                    ResourceRootIndexer.indexResourceRoot(root);
                }
            }
View Full Code Here

                } else {
                    throw new DeploymentUnitProcessingException(JSFLogger.ROOT_LOGGER.invalidAnnotationLocation(annotation, target));
                }
            }
        }
        deploymentUnit.addToAttachmentList(ServletContextAttribute.ATTACHMENT_KEY, new ServletContextAttribute(FACES_ANNOTATIONS_SC_ATTR, instances));
    }

    public void undeploy(DeploymentUnit context) {

    }
View Full Code Here

        final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();

        // Get the CDI-enabled ValidatorFactory and add it to the servlet context
        ValidatorFactory validatorFactory = deploymentUnit.getAttachment(BeanValidationAttachments.VALIDATOR_FACTORY);

        deploymentUnit.addToAttachmentList(ServletContextAttribute.ATTACHMENT_KEY,
                new ServletContextAttribute(VALIDATOR_FACTORY_KEY, validatorFactory));
    }

    @Override
    public void undeploy(DeploymentUnit context) {
View Full Code Here

                    for (DataSource ds : dataSources.getDataSource()) {
                        if (ds.getDriver() == null) {
                            throw ConnectorLogger.ROOT_LOGGER.FailedDeployDriverNotSpecified(ds.getJndiName());
                        }
                    }
                    deploymentUnit.addToAttachmentList(DATA_SOURCES_ATTACHMENT_KEY, dataSources);
                }
            } catch (Exception e) {
                throw new DeploymentUnitProcessingException(e.getMessage(), e);
            } finally {
                VFSUtils.safeClose(xmlStream);
View Full Code Here

                    final Closeable closable = appClientRoot.isFile() ? mount(appClientRoot, false) : null;
                    final MountHandle mountHandle = new MountHandle(closable);
                    final ResourceRoot childResource = new ResourceRoot(appClientRoot, mountHandle);
                    ModuleRootMarker.mark(childResource);
                    SubDeploymentMarker.mark(childResource);
                    deploymentUnit.addToAttachmentList(Attachments.RESOURCE_ROOTS, childResource);
                }

            } else {
                throw AppClientLogger.ROOT_LOGGER.cannotFindAppClient(deployment);
            }
View Full Code Here

        final CachedConnectionManagerSetupAction action = new CachedConnectionManagerSetupAction(serviceName);

        phaseContext.getServiceTarget().addService(serviceName, action)
                .addDependency(ConnectorServices.CCM_SERVICE, CachedConnectionManager.class, action.cachedConnectionManager)
                .install();
        deploymentUnit.addToAttachmentList(Attachments.WEB_SETUP_ACTIONS, action);
        deploymentUnit.addToAttachmentList(Attachments.OTHER_EE_SETUP_ACTIONS, action);

    }

    @Override
View Full Code Here

        phaseContext.getServiceTarget().addService(serviceName, action)
                .addDependency(ConnectorServices.CCM_SERVICE, CachedConnectionManager.class, action.cachedConnectionManager)
                .install();
        deploymentUnit.addToAttachmentList(Attachments.WEB_SETUP_ACTIONS, action);
        deploymentUnit.addToAttachmentList(Attachments.OTHER_EE_SETUP_ACTIONS, action);

    }

    @Override
    public void undeploy(final DeploymentUnit context) {
View Full Code Here

                    closable = VFS.mountZip(child, child, TempFileProviderService.provider());
                }
                final MountHandle mountHandle = new MountHandle(closable);
                final ResourceRoot childResource = new ResourceRoot(child, mountHandle);
                ModuleRootMarker.mark(childResource);
                deploymentUnit.addToAttachmentList(Attachments.RESOURCE_ROOTS, childResource);
                resourceRoot.addToAttachmentList(Attachments.INDEX_IGNORE_PATHS, child.getPathNameRelativeTo(deploymentRoot));
            }
        } catch (IOException e) {
            throw ConnectorLogger.ROOT_LOGGER.failedToProcessRaChild(e, deploymentRoot);
        }
View Full Code Here

                        final JpaInjectionServices jpaInjectionServices = new WeldJpaInjectionServices(deploymentUnit);
                        final JaxwsInjectionServices jaxwsInjectionServices = new WeldJaxwsInjectionServices(deploymentUnit);
                        bda.getServices().add(JpaInjectionServices.class, jpaInjectionServices);
                        bda.getServices().add(JaxwsInjectionServices.class, jaxwsInjectionServices);
                        deploymentUnit.addToAttachmentList(WeldAttachments.ADDITIONAL_BEAN_DEPLOYMENT_MODULES, bda);
                        moduleBdas.add(bda);

                        // make sure that if this beans.xml is seen by some other module, it is not processed twice
                        existing.add(url);
                    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.