本文整理了Java中org.glassfish.internal.deployment.Deployment.get()
方法的一些代码示例,展示了Deployment.get()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Deployment.get()
方法的具体详情如下:
包路径:org.glassfish.internal.deployment.Deployment
类名称:Deployment
方法名:get
[英]Scans the source of the deployment operation for all types and store the result in the deployment context. Subsequent calls will return the cached copy from the context
[中]扫描部署操作源中的所有类型,并将结果存储在部署上下文中。后续调用将从上下文返回缓存副本
代码示例来源: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.core/kernel
ApplicationInfo appInfo = info!=null?info.appInfo:null;
if (appInfo==null) {
appInfo = deployment.get(name);
代码示例来源:origin: org.glassfish.deployment/deployment-admin
String appName = (String)it.next();
ApplicationInfo info = deployment.get(appName);
代码示例来源:origin: org.glassfish.main.core/kernel
continue;
ApplicationInfo appInfo = deployment.get(app.getName());
stopApplication(app, appInfo);
ApplicationInfo appInfo = deployment.get(app.getName());
stopApplication(app, appInfo);
代码示例来源:origin: org.glassfish.main.core/kernel
parameters.origin = UndeployCommandParameters.Origin.unload;
parameters.target = server.getName();
ApplicationInfo appInfo = deployment.get(parameters.name);
if (appInfo == null) {
continue;
代码示例来源:origin: org.glassfish.deployment/deployment-admin
ApplicationInfo appInfo = deployment.get(appName);
if (env.isDas()) {
try {
代码示例来源:origin: org.glassfish.deployment/deployment-admin
ApplicationInfo appInfo = deployment.get(appName);
if (appInfo != null) {
source = appInfo.getSource();
内容来源于网络,如有侵权,请联系作者删除!