_logger, params, report).source(app).build(); dc.addTransientAppMetaData(DatabaseConstants.JTA_DATASOURCE_JNDI_NAME_OVERRIDE, resourceName); Properties appProps = dc.getAppProps();
Deployment deployment = _ejbContainerUtil.getDeployment(); ExtendedDeploymentContext dc = deployment.getBuilder( logger, params, report).source(app).build(); dc.addTransientAppMetaData(DatabaseConstants.JTA_DATASOURCE_JNDI_NAME_OVERRIDE, resourceName); Properties appProps = dc.getAppProps();
context = deployment.getBuilder(logger, params, report).source(archive).archiveHandler(archiveHandler).build(initialContext); } catch (IOException e) { throw new RuntimeException(e);
source(archive).archiveHandler(archiveHandler).build(initialContext); if (tracing!=null) { tracing.addMark(DeploymentTracing.Mark.CONTEXT_CREATED);
source(initialContext.getSource()).archiveHandler(archiveHandler).build(initialContext); if (tracing!=null) { tracing.addMark(DeploymentTracing.Mark.CONTEXT_CREATED);
deploymentContext = deployment.getBuilder(logger, this, report).source(source).build(); } catch (IOException e) { logger.log(Level.SEVERE, "Cannot create context for undeployment ", e);
deployment.getBuilder(logger, commandParams, report).source(archive).build();
ExtendedDeploymentContext depContext = deployment.getBuilder(logger, parameters, report).source(sourceArchive).build();
ExtendedDeploymentContext deploymentContext = deployment.getBuilder(logger, this, report).source(archive).build();
deployment.getBuilder(logger, commandParams, report).source(source).build(); deploymentContext.getAppProps().putAll( application.getDeployProperties());
ExtendedDeploymentContext depContext = deployment.getBuilder(logger, deploymentParams, report).source(archive).build(); if (tracing!=null) { depContext.addModuleMetaData(tracing);
deploymentContext = deployment.getBuilder(logger, params, report).source(source).build();
getBuilder(logger, commandParams, report).source(archive).build();
deployment.getBuilder(KernelLoggerInfo.getLogger(), commandParams, subReport).source(archive).build();
getBuilder(logger, commandParams, report).source(archive).build();
public ExtendedDeploymentContext disable(UndeployCommandParameters commandParams, Application app, ApplicationInfo appInfo, ActionReport report, Logger logger) throws Exception { if (appInfo == null) { report.failure(logger, "Application not registered", null); return null; } // if it's not on DAS and the application is not loaded, do not unload // when it's on DAS, there is some necessary clean up we need to do if (!env.isDas() && !appInfo.isLoaded()) { return null; } if (app != null) { commandParams._type = app.archiveType(); } final ExtendedDeploymentContext deploymentContext = getBuilder(logger, commandParams, report).source(appInfo.getSource()).build(); if (app != null) { deploymentContext.getAppProps().putAll( app.getDeployProperties()); deploymentContext.setModulePropsMap( app.getModulePropertiesMap()); } if (commandParams.properties != null) { deploymentContext.getAppProps().putAll(commandParams.properties); } unload(appInfo, deploymentContext); return deploymentContext; }
public ExtendedDeploymentContext disable(UndeployCommandParameters commandParams, Application app, ApplicationInfo appInfo, ActionReport report, Logger logger) throws Exception { if (appInfo == null) { return null; } // if it's not on DAS and the application is not loaded, do not unload // when it's on DAS, there is some necessary clean up we need to do if (!env.isDas() && !appInfo.isLoaded()) { return null; } if (app != null) { commandParams._type = app.archiveType(); } final ExtendedDeploymentContext deploymentContext = getBuilder(logger, commandParams, report).source(appInfo.getSource()).build(); if (app != null) { deploymentContext.getAppProps().putAll( app.getDeployProperties()); deploymentContext.setModulePropsMap( app.getModulePropertiesMap()); } if (commandParams.properties != null) { deploymentContext.getAppProps().putAll(commandParams.properties); } unload(appInfo, deploymentContext); return deploymentContext; }
ExtendedDeploymentContext deploymentContext = deployment.getBuilder(KernelLoggerInfo.getLogger(), parameters, subReport).source(appInfo.getSource()).build();
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); ExtendedDeploymentContext dc = deployment.getBuilder(_logger, deployParams, report).source(mejbArchive).build(); deployment.deploy(dc); if (report.getActionExitCode() != ActionReport.ExitCode.SUCCESS) { throw new RuntimeException("Failed to deploy MEJB app: " + report.getFailureCause()); } } }