org.glassfish.internal.deployment.Deployment.isAppEnabled()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(3.2k)|赞(0)|评价(0)|浏览(154)

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

Deployment.isAppEnabled介绍

暂无

代码示例

代码示例来源:origin: jersey/jersey

private ApplicationInfo getApplicationInfo(EjbContainerUtil ejbUtil) throws NamingException {
  ApplicationRegistry appRegistry = ejbUtil.getServices().getService(ApplicationRegistry.class);
  Applications applications = ejbUtil.getServices().getService(Applications.class);
  String appNamePrefix = (String) initialContext.lookup("java:app/AppName");
  Set<String> appNames = appRegistry.getAllApplicationNames();
  Set<String> disabledApps = new TreeSet<>();
  for (String appName : appNames) {
    if (appName.startsWith(appNamePrefix)) {
      Application appDesc = applications.getApplication(appName);
      if (appDesc != null && !ejbUtil.getDeployment().isAppEnabled(appDesc)) {
        // skip disabled version of the app
        disabledApps.add(appName);
      } else {
        return ejbUtil.getDeployment().get(appName);
      }
    }
  }
  // grab the latest one, there is no way to make
  // sure which one the user is actually enabling,
  // so use the best case, i.e. upgrade
  Iterator<String> it = disabledApps.iterator();
  String lastDisabledApp = null;
  while (it.hasNext()) {
    lastDisabledApp = it.next();
  }
  if (lastDisabledApp != null) {
    return ejbUtil.getDeployment().get(lastDisabledApp);
  }
  throw new NamingException("Application Information Not Found");
}

代码示例来源:origin: org.glassfish.main.concurrent/concurrent-impl

private boolean isApplicationEnabled(String appId) {
  if (appId != null) {
    Application app = applications.getApplication(appId);
    if (app != null)
      return deployment.isAppEnabled(app);
  }
  return false;
}

代码示例来源:origin: org.glassfish.main.core/kernel

private void handleOtherAppConfigChanges(Object parent, String appName) {
  Application application = applications.getApplication(appName);
  if (application.isLifecycleModule()) {
    return;
  }
  // reload the application for other application related 
  // config changes if the application is in enabled state
  if (isCurrentInstanceMatchingTarget(parent) && 
    deployment.isAppEnabled(application)) {
    disableApplication(appName); 
    enableApplication(appName);
  }
}

代码示例来源:origin: org.glassfish.main.core/kernel

if (!deployment.isAppEnabled(app)) {
  return;

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

enabled = deployment.isAppEnabled(app);
} else {
  enabled = Boolean.valueOf(domain.getEnabledForApplication(

代码示例来源:origin: fujitsu/launcher

enabled = deployment.isAppEnabled(app);
} else {
  enabled = Boolean.valueOf(domain.getEnabledForApplication(

代码示例来源:origin: org.glassfish.main.core/kernel

if (deployment.isAppEnabled(systemApp) || loadAppOnDAS(systemApp.getName())) {
   Integer order = appOrderInfoMap.get(systemApp.getName());
   ApplicationOrderInfo info = new ApplicationOrderInfo(systemApp, order);
if (deployment.isAppEnabled(standaloneAdapter) || loadAppOnDAS(standaloneAdapter.getName())) {
 DeploymentOrder.addApplicationDeployment(new ApplicationOrderInfo(standaloneAdapter, appOrderInfoMap.get(standaloneAdapter.getName()).intValue()));
if (deployment.isAppEnabled(app) || loadAppOnDAS(app.getName())) {
 DeploymentOrder.addApplicationDeployment(new ApplicationOrderInfo(app, appOrderInfoMap.get(app.getName()).intValue()));

相关文章