Package org.glassfish.api.deployment

Examples of org.glassfish.api.deployment.DeployCommandParameters


    private void loadApplicationForTenants(Application app, ApplicationRef appRef, ActionReport report, Logger logger) {
        if (app.getAppTenants() == null) {
            return;
        }
        for (AppTenant tenant : app.getAppTenants().getAppTenant()) {
            DeployCommandParameters commandParams = app.getDeployParameters(appRef);
            commandParams.contextroot = tenant.getContextRoot();
            commandParams.target = server.getName();
            commandParams.name = DeploymentUtils.getInternalNameForTenant(app.getName(), tenant.getTenant());
            commandParams.enabled = Boolean.TRUE;
            commandParams.origin = DeployCommandParameters.Origin.load;
View Full Code Here


                app.getName());
            return true;
        }

        // populate the params and properties from application element first
        DeployCommandParameters deployParams = app.getDeployParameters(null);

        // for archive deployment, let's repackage the archive and redeploy
        // that way
        // we cannot just directory redeploy the archive deployed apps in
        // v2->v3 upgrade as the repository layout was different in v2
View Full Code Here

    private void deployMEJB() throws IOException {
        _logger.info("Loading MEJB app on JNDI look up");
        ServerContext serverContext = habitat.getService(ServerContext.class);
        File mejbArchive = new File(serverContext.getInstallRoot(),
                "lib/install/applications/mejb.jar");
        DeployCommandParameters deployParams =
                new DeployCommandParameters(mejbArchive);
        String targetName = habitat.<Server>getService(Server.class, ServerEnvironment.DEFAULT_INSTANCE_NAME).getName();
        deployParams.target = targetName;
        deployParams.name = "mejb";
        ActionReport report = habitat.getService(ActionReport.class, "plain");
        Deployment deployment = habitat.getService(Deployment.class);
View Full Code Here

    private ApplicationHolder getApplicationHolder(ReadableArchive source,
        DeploymentContext context, boolean isDirectory) {
        ApplicationHolder holder = context.getModuleMetaData(ApplicationHolder.class);
        if (holder==null || holder.app==null) {
            try {
                DeployCommandParameters params = context.getCommandParameters(DeployCommandParameters.class);
                if (params != null && params.altdd != null) {
                    source.addArchiveMetaData(DeploymentProperties.ALT_DD,
                        params.altdd);
                }
                long start = System.currentTimeMillis();
View Full Code Here

                domainCRS = parser.getClearReferencesStatic();
            }

            List<Boolean> csrs = new ArrayList<Boolean>();
            HttpService httpService = serverConfig.getHttpService();
            DeployCommandParameters params = dc.getCommandParameters(DeployCommandParameters.class);
            String vsIDs = params.virtualservers;
            List<String> vsList = StringUtils.parseStringList(vsIDs, " ,");
            if (httpService != null && vsList != null && !vsList.isEmpty()) {
                for (VirtualServer vsBean : httpService.getVirtualServer()) {
                    if (vsList.contains(vsBean.getId())) {
View Full Code Here

        sourceArchive.setExtraData(Types.class, dc.getTransientAppMetaData(Types.class.getName(), Types.class));
        sourceArchive.setExtraData(Parser.class, dc.getTransientAppMetaData(Parser.class.getName(), Parser.class));

        ClassLoader cl = dc.getClassLoader();
        DeployCommandParameters params = dc.getCommandParameters(DeployCommandParameters.class);

        String name = params.name();
        String archiveType = dc.getArchiveHandler().getArchiveType();
        Archivist archivist = archivistFactory.getArchivist(archiveType, cl);
        if (archivist == null) {
            // if no JavaEE medata was found in the archive, we return
            // an empty Application object
View Full Code Here

        return application;
    }

    public Application load(DeploymentContext dc) throws IOException {
        DeployCommandParameters params = dc.getCommandParameters(DeployCommandParameters.class);
        Application application = processDOL(dc);

        // write out xml files if needed
        if (Boolean.valueOf(WRITEOUT_XML)) {
            saveAppDescriptor(application, dc);
View Full Code Here

    public String getNameFor(ReadableArchive archive,
                             DeploymentContext context) {
        if (context == null) {
            return null;
        }
        DeployCommandParameters params = context.getCommandParameters(DeployCommandParameters.class);
        Application application = null;
        try {
            // for these cases, the standard DD could contain the application
            // name for ear and module name for standalone module
            if (params.altdd != null ||
View Full Code Here

            ArchiveHandler archiveHandler = deployment.getArchiveHandler(archive);
            if (archiveHandler==null) {
                throw new IllegalArgumentException(localStrings.getLocalString("deploy.unknownarchivetype","Archive type of {0} was not recognized", archiveName));
            }

            DeployCommandParameters parameters = new DeployCommandParameters(new File(archive.getURI()));
            ActionReport report = new HTMLActionReporter();
            context = new DeploymentContextImpl(report, archive, parameters, env);
            context.setArchiveHandler(archiveHandler);
            String appName = archiveHandler.getDefaultApplicationName(archive, context);
            parameters.name = appName;
View Full Code Here

        }
    }

    private void addModuleConfig(DeploymentContext dc,
        Application application) {
        DeployCommandParameters params = dc.getCommandParameters(DeployCommandParameters.class);
        if (!params.origin.isDeploy()) {
            return;
        }
       
        try {
View Full Code Here

TOP

Related Classes of org.glassfish.api.deployment.DeployCommandParameters

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.