com.sun.enterprise.config.serverbeans.Application.getAppTenants()方法的使用及代码示例

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

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

Application.getAppTenants介绍

暂无

代码示例

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

public void unregisterTenantWithAppInDomainXML(
    final String appName,
    final String tenantName
    ) throws TransactionFailure, RetryableException {
  final com.sun.enterprise.config.serverbeans.Application app =
      applications.getApplication(appName);
  if (app == null) {
    throw new IllegalArgumentException("Application " + appName + " not found");
  }
  final AppTenants appTenants = app.getAppTenants();
  final AppTenant appTenant = appTenants.getAppTenant(tenantName);
  if (appTenant == null) {
    throw new IllegalArgumentException("Tenant " + tenantName + " not provisioned for application " + appName);
  }
  Transaction t = new Transaction();
  final AppTenants appTenants_w = t.enroll(appTenants);
  appTenants_w.getAppTenant().remove(appTenant);
  t.commit();
}

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

public void unregisterTenantWithAppInDomainXML(
    final String appName,
    final String tenantName
    ) throws TransactionFailure, RetryableException {
  final com.sun.enterprise.config.serverbeans.Application app =
      applications.getApplication(appName);
  if (app == null) {
    throw new IllegalArgumentException("Application " + appName + " not found");
  }
  final AppTenants appTenants = app.getAppTenants();
  final AppTenant appTenant = appTenants.getAppTenant(tenantName);
  if (appTenant == null) {
    throw new IllegalArgumentException("Tenant " + tenantName + " not provisioned for application " + appName);
  }
  Transaction t = new Transaction();
  final AppTenants appTenants_w = t.enroll(appTenants);
  appTenants_w.getAppTenant().remove(appTenant);
  t.commit();
}

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

private AppTenant writeableTenantForApp(
    final String appName,
    final Transaction t) throws TransactionFailure, PropertyVetoException {
  final com.sun.enterprise.config.serverbeans.Application app =
      applications.getApplication(appName);
  if (app == null) {
    throw new IllegalArgumentException("Application " + appName + " not found");
  }
  /*
   * The app-tenants subelement might or might not already be there.
   */
  AppTenants appTenants = app.getAppTenants();
  AppTenants appTenants_w;
  if (appTenants == null) {
    com.sun.enterprise.config.serverbeans.Application app_w =
        t.enroll(app);
    appTenants_w = app_w.createChild(AppTenants.class);
    app_w.setAppTenants(appTenants_w);
  } else {
    appTenants_w = t.enroll(appTenants);
  }
  final List<AppTenant> appTenantList = appTenants_w.getAppTenant();
  AppTenant appTenant_w = appTenants_w.createChild(AppTenant.class);
  appTenantList.add(appTenant_w);
  return appTenant_w;
}

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

private AppTenant writeableTenantForApp(
    final String appName,
    final Transaction t) throws TransactionFailure, PropertyVetoException {
  final com.sun.enterprise.config.serverbeans.Application app =
      applications.getApplication(appName);
  if (app == null) {
    throw new IllegalArgumentException("Application " + appName + " not found");
  }
  /*
   * The app-tenants subelement might or might not already be there.
   */
  AppTenants appTenants = app.getAppTenants();
  AppTenants appTenants_w;
  if (appTenants == null) {
    com.sun.enterprise.config.serverbeans.Application app_w =
        t.enroll(app);
    appTenants_w = app_w.createChild(AppTenants.class);
    app_w.setAppTenants(appTenants_w);
  } else {
    appTenants_w = t.enroll(appTenants);
  }
  final List<AppTenant> appTenantList = appTenants_w.getAppTenant();
  AppTenant appTenant_w = appTenants_w.createChild(AppTenant.class);
  appTenantList.add(appTenant_w);
  return appTenant_w;
}

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

private void loadApplicationForTenants(Application app, ApplicationRef appRef, ActionReport report) {
  if (app.getAppTenants() == null) {
    return;
  for (AppTenant tenant : app.getAppTenants().getAppTenant()) {
    DeployCommandParameters commandParams = app.getDeployParameters(appRef);
    commandParams.contextroot = tenant.getContextRoot();

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

private void unloadApplicationForTenants(Application app, ActionReport report) {
  if (app == null || app.getAppTenants() == null) {
    return;
  for (AppTenant tenant : app.getAppTenants().getAppTenant()) {
    UndeployCommandParameters parameters = new UndeployCommandParameters();
    parameters.name = DeploymentUtils.getInternalNameForTenant(app.getName(), tenant.getTenant());

相关文章

微信公众号

最新文章

更多