@Override public Properties getAppProps() { return context.getAppProps(); }
public static boolean useV2Compatibility(DeploymentContext context) { return V2_COMPATIBILITY.equals(context.getAppProps().getProperty(DeploymentProperties.COMPATIBILITY)); }
private List<ReadableArchive> getExternalLibraries( DeploymentContext context) throws IOException { List<ReadableArchive> externalLibArchives = new ArrayList<ReadableArchive>(); String skipScanExternalLibProp = context.getAppProps().getProperty( DeploymentProperties.SKIP_SCAN_EXTERNAL_LIB); if (Boolean.valueOf(skipScanExternalLibProp)) { // if we skip scanning external libraries, we should just // return an empty list here return Collections.EMPTY_LIST; } List<URI> externalLibs = DeploymentUtils.getExternalLibraries(context.getSource()); for (URI externalLib : externalLibs) { externalLibArchives.add(archiveFactory.openArchive(new File(externalLib.getPath()))); } return externalLibArchives; }
private List<ReadableArchive> getExternalLibraries( DeploymentContext context) throws IOException { List<ReadableArchive> externalLibArchives = new ArrayList<ReadableArchive>(); String skipScanExternalLibProp = context.getAppProps().getProperty( DeploymentProperties.SKIP_SCAN_EXTERNAL_LIB); if (Boolean.valueOf(skipScanExternalLibProp)) { // if we skip scanning external libraries, we should just // return an empty list here return Collections.EMPTY_LIST; } List<URI> externalLibs = DeploymentUtils.getExternalLibraries(context.getSource()); for (URI externalLib : externalLibs) { externalLibArchives.add(archiveFactory.openArchive(new File(externalLib.getPath()))); } return externalLibArchives; }
public Collection<? extends Sniffer> getSniffers(final ArchiveHandler handler, Collection<? extends Sniffer> sniffers, DeploymentContext context) { if (handler == null) { return Collections.EMPTY_LIST; } if (sniffers==null) { if (handler instanceof CompositeHandler) { ((CompositeHandler)handler).initCompositeMetaData(context); context.getAppProps().setProperty(ServerTags.IS_COMPOSITE, "true"); } sniffers = snifferManager.getSniffers(context); } context.addTransientAppMetaData(DeploymentProperties.SNIFFERS, sniffers); snifferManager.validateSniffers(sniffers, context); return sniffers; }
public Collection<? extends Sniffer> getSniffers(final ArchiveHandler handler, Collection<? extends Sniffer> sniffers, DeploymentContext context) { if (handler == null) { return Collections.EMPTY_LIST; } if (sniffers==null) { if (handler instanceof CompositeHandler) { ((CompositeHandler)handler).initCompositeMetaData(context); context.getAppProps().setProperty(ServerTags.IS_COMPOSITE, "true"); } sniffers = snifferManager.getSniffers(context); } context.addTransientAppMetaData(DeploymentProperties.SNIFFERS, sniffers); snifferManager.validateSniffers(sniffers, context); return sniffers; }
private boolean isKeepState(DeploymentContext deployContext, boolean isDeploy) { Boolean keepState = null; if (isDeploy) { DeployCommandParameters dcp = deployContext.getCommandParameters(DeployCommandParameters.class); if (dcp != null) { keepState = dcp.keepstate; } } else { UndeployCommandParameters ucp = deployContext.getCommandParameters(UndeployCommandParameters.class); if (ucp != null) { keepState = ucp.keepstate; } } if (keepState == null) { String keepSessionsString = deployContext.getAppProps().getProperty(DeploymentProperties.KEEP_SESSIONS); if (keepSessionsString != null && keepSessionsString.trim().length() > 0) { keepState = Boolean.valueOf(keepSessionsString); } else { keepState = getDescriptor().getApplication().getKeepState(); } } return ((keepState != null) ? keepState : false); }
ctx.getSource().getParentArchive(); String compatProp = ctx.getAppProps().getProperty( DeploymentProperties.COMPATIBILITY);
private boolean loadOnCurrentInstance(DeploymentContext context) { final DeployCommandParameters commandParams = context.getCommandParameters(DeployCommandParameters.class); final Properties appProps = context.getAppProps(); if (commandParams.enabled) { // if the current instance match with the target if (domain.isCurrentInstanceMatchingTarget(commandParams.target, commandParams.name(), server.getName(), context.getTransientAppMetaData(DeploymentProperties.PREVIOUS_TARGETS, List.class))) { return true; } if (server.isDas()) { String objectType = appProps.getProperty(ServerTags.OBJECT_TYPE); if (objectType != null) { // if it's a system application needs to be loaded on DAS if (objectType.equals(DeploymentProperties.SYSTEM_ADMIN) || objectType.equals(DeploymentProperties.SYSTEM_ALL)) { return true; } } } } return false; }
private boolean loadOnCurrentInstance(DeploymentContext context) { final DeployCommandParameters commandParams = context.getCommandParameters(DeployCommandParameters.class); final Properties appProps = context.getAppProps(); if (commandParams.enabled) { // if the current instance match with the target if (domain.isCurrentInstanceMatchingTarget(commandParams.target, commandParams.name(), server.getName(), context.getTransientAppMetaData(DeploymentProperties.PREVIOUS_TARGETS, List.class))) { return true; } if (server.isDas()) { String objectType = appProps.getProperty(ServerTags.OBJECT_TYPE); if (objectType != null) { // if it's a system application needs to be loaded on DAS if (objectType.equals(DeploymentProperties.SYSTEM_ADMIN) || objectType.equals(DeploymentProperties.SYSTEM_ALL)) { return true; } } } } return false; }
/** * Copy from ApplicationLifeCycle.java */ private boolean loadOnCurrentInstance() { final DeployCommandParameters commandParams = dc.getCommandParameters(DeployCommandParameters.class); final Properties appProps = dc.getAppProps(); if (commandParams.enabled) { // if the current instance match with the target if (domain.isCurrentInstanceMatchingTarget(commandParams.target, commandParams.name(), server.getName(), dc.getTransientAppMetaData(DeploymentProperties.PREVIOUS_TARGETS, List.class))) { return true; } if (server.isDas()) { String objectType = appProps.getProperty(ServerTags.OBJECT_TYPE); if (objectType != null) { // if it's a system application needs to be loaded on DAS if (objectType.equals(DeploymentProperties.SYSTEM_ADMIN) || objectType.equals(DeploymentProperties.SYSTEM_ALL)) { return true; } } } } return false; } }
private WebModuleConfig loadWebModuleConfig(DeploymentContext dc) { WebModuleConfig wmInfo = new WebModuleConfig(); try { DeployCommandParameters params = dc.getCommandParameters(DeployCommandParameters.class); wmInfo.setDescriptor(dc.getModuleMetaData(WebBundleDescriptor.class)); wmInfo.setVirtualServers(params.virtualservers); wmInfo.setLocation(dc.getSourceDir()); wmInfo.setObjectType(dc.getAppProps().getProperty(ServerTags.OBJECT_TYPE)); } catch (Exception ex) { String msg = rb.getString("webdeployer.loadWebModuleConfig"); msg = MessageFormat.format(msg, wmInfo.getName()); logger.log(Level.WARNING, msg, ex); } return wmInfo; }
String compatProp = context.getAppProps().getProperty( DeploymentProperties.COMPATIBILITY); compatProp = gfEjbJarXMLParser.getCompatibilityValue(); if (compatProp != null) { context.getAppProps().put( DeploymentProperties.COMPATIBILITY, compatProp); compatProp = sunEjbJarXMLParser.getCompatibilityValue(); if (compatProp != null) { context.getAppProps().put( DeploymentProperties.COMPATIBILITY, compatProp);
Properties appProps = dc.getAppProps(); if (params.origin.isDeploy()) { String keepStateVal = (String) dc.getAppProps().get(EjbApplication.KEEP_STATE); if (keepStateVal != null) {
Properties appProps = dc.getAppProps(); if (params.origin.isDeploy()) { String keepStateVal = (String) dc.getAppProps().get(EjbApplication.KEEP_STATE); if (keepStateVal != null) {
dc.getAppProps().setProperty(ServerTags.CONTEXT_ROOT, contextRoot);
@Override public WebApplication load(WebContainer container, DeploymentContext dc) { super.load(container, dc); WebBundleDescriptor wbd = dc.getModuleMetaData( WebBundleDescriptor.class); if (wbd != null) { wbd.setClassLoader(dc.getClassLoader()); } WebModuleConfig wmInfo = loadWebModuleConfig(dc); WebApplication webApp = new WebApplication(container, wmInfo, new ApplicationConfigInfo(dc.getAppProps())); return webApp; }
public Transaction prepareAppConfigChanges(final DeploymentContext context) throws TransactionFailure { final Properties appProps = context.getAppProps(); final DeployCommandParameters deployParams = context.getCommandParameters(DeployCommandParameters.class); Transaction t = new Transaction(); try { // prepare the application element ConfigBean newBean = ((ConfigBean)ConfigBean.unwrap(applications)).allocate(Application.class); Application app = newBean.createProxy(); Application app_w = t.enroll(app); setInitialAppAttributes(app_w, deployParams, appProps, context); context.addTransientAppMetaData(ServerTags.APPLICATION, app_w); } catch(TransactionFailure e) { t.rollback(); throw e; } catch (Exception e) { t.rollback(); throw new TransactionFailure(e.getMessage(), e); } return t; }
public Transaction prepareAppConfigChanges(final DeploymentContext context) throws TransactionFailure { final Properties appProps = context.getAppProps(); final DeployCommandParameters deployParams = context.getCommandParameters(DeployCommandParameters.class); Transaction t = new Transaction(); try { // prepare the application element ConfigBean newBean = ((ConfigBean)ConfigBean.unwrap(applications)).allocate(Application.class); Application app = newBean.createProxy(); Application app_w = t.enroll(app); setInitialAppAttributes(app_w, deployParams, appProps, context); context.addTransientAppMetaData(ServerTags.APPLICATION, app_w); } catch(TransactionFailure e) { t.rollback(); throw e; } catch (Exception e) { t.rollback(); throw new TransactionFailure(e.getMessage(), e); } return t; }
keepState = resolveKeepStateOptions(depc, false, ejbBundle); if (keepState) { Properties appProps = depc.getAppProps(); Object appId = appProps.get(EjbDeployer.APP_UNIQUE_ID_PROP); Properties actionReportProps = null;