本文整理了Java中com.sun.enterprise.deployment.Application.getKeepState()
方法的一些代码示例,展示了Application.getKeepState()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Application.getKeepState()
方法的具体详情如下:
包路径:com.sun.enterprise.deployment.Application
类名称: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()));
内容来源于网络,如有侵权,请联系作者删除!