com.sun.enterprise.deployment.Application.getKeepState()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(2.5k)|赞(0)|评价(0)|浏览(131)

本文整理了Java中com.sun.enterprise.deployment.Application.getKeepState()方法的一些代码示例,展示了Application.getKeepState()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Application.getKeepState()方法的具体详情如下:
包路径:com.sun.enterprise.deployment.Application
类名称:Application
方法名:getKeepState

Application.getKeepState介绍

[英]Returns the resolved keepstate value.
[中]返回已解析的keepstate值。

代码示例

代码示例来源:origin: org.glassfish.web/web-glue

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);
}

代码示例来源:origin: org.glassfish.main.ejb/ejb-container

keepState = app.getKeepState();

代码示例来源:origin: org.glassfish.ejb/ejb-container

keepState = app.getKeepState();

代码示例来源:origin: org.glassfish.main.deployment/deployment-javaee-core

private void validateKeepStateOption(DeploymentContext context, DeployCommandParameters params, Application app) {
  if ((params.keepstate != null && params.keepstate) || 
    app.getKeepState()) {
    if (!isDASTarget(context, params)) {
      // for non-DAS target, and keepstate is set to true either 
      // through deployment option or deployment descriptor
      // explicitly set the deployment option to false
      params.keepstate = false;
      String warningMsg = localStrings.getLocalString("not.support.keepstate.in.cluster", "Ignoring the keepstate setting: the keepstate option is only supported in developer profile and not cluster profile.");
      ActionReport subReport = context.getActionReport().addSubActionsReport();
      subReport.setActionExitCode(ActionReport.ExitCode.WARNING);
      subReport.setMessage(warningMsg);
      context.getLogger().log(Level.WARNING, warningMsg);
    }
  }    
}

代码示例来源:origin: org.glassfish.deployment/dol

appendTextChild(appNode, RuntimeTagNames.KEEP_STATE, String.valueOf(application.getKeepState()));

代码示例来源:origin: org.glassfish.main.deployment/dol

appendTextChild(appNode, RuntimeTagNames.KEEP_STATE, String.valueOf(application.getKeepState()));

相关文章

微信公众号

最新文章

更多

Application类方法