Package org.jboss.as.deployment.module

Examples of org.jboss.as.deployment.module.MountHandle


        // Create the {@link OSGiDeploymentService}
        if (deployment != null) {

            // Prevent garbage collection of the MountHandle which will close the file
            MountHandle mount = context.getAttachment(MountHandle.ATTACHMENT_KEY);
            deployment.addAttachment(MountHandle.class, mount);

            OSGiDeploymentService.addService(context);
        }
    }
View Full Code Here


    }

    private void activate(final String deploymentName, String runtimeName, final byte[] deploymentHash, final ServiceName deploymentServiceName, final ServiceActivatorContext context, final ServiceContainer serviceContainer) {
        log.infof("Activating deployment: %s", deploymentName);

        MountHandle handle = null;
        try {
            final ServerDeploymentRepository deploymentRepo = getDeploymentRepository(serviceContainer);

            // The mount point we will use for the repository file
            final VirtualFile deploymentRoot = VFS.getChild("content/" + runtimeName);

            // Mount virtual file
            try {
                Closeable mount = deploymentRepo.mountDeploymentContent(deploymentName, runtimeName, deploymentHash, deploymentRoot);
                handle = new MountHandle(mount);
            } catch (IOException e) {
                throw new RuntimeException("Failed to mount deployment archive", e);
            }

            final BatchBuilder batchBuilder = context.getBatchBuilder();
View Full Code Here

    public void processDeployment(DeploymentUnitContext context) throws DeploymentUnitProcessingException {
        final VirtualFile deploymentRoot = getVirtualFileAttachment(context);
        if(deploymentRoot == null) {
            return;
        }
        final MountHandle mountHandle = context.getAttachment(MountHandle.ATTACHMENT_KEY);
        try {
            final ClassPathEntry[] entries = createResourceRoots(deploymentRoot, mountHandle);
            final DeploymentStructure structure = new DeploymentStructure(entries);
            context.putAttachment(DeploymentStructure.ATTACHMENT_KEY, structure);
View Full Code Here

        public ClassPathEntry(final String name, final VirtualFile root, final Closeable closeable) {
            this.name = name;
            this.root = root;
            this.closeable = closeable;
            this.mountHandle = new MountHandle(closeable);
        }
View Full Code Here

        public ClassPathEntry(final String name, final VirtualFile root, final MountHandle handle) {
            this.name = name;
            this.root = root;
            this.closeable = null;
            this.mountHandle = new MountHandle(null);
        }
View Full Code Here

TOP

Related Classes of org.jboss.as.deployment.module.MountHandle

Copyright © 2018 www.massapicom. 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.