private void loadManagedBeans(ApplicationInfo appInfo) { Application app = appInfo.getMetaData(Application.class); if( app == null ) { return; } loadManagedBeans(app); }
protected Application getApplicationFromApplicationInfo( String appName) { ApplicationInfo appInfo = appRegistry.get(appName); if (appInfo == null) { return null; } return appInfo.getMetaData(Application.class); }
private void loadManagedBeans(ApplicationInfo appInfo) { Application app = appInfo.getMetaData(Application.class); if( app == null ) { return; } loadManagedBeans(app); }
private void registerAppLevelDependencies(ApplicationInfo appInfo) { Application app = appInfo.getMetaData(Application.class); if( app == null ) { return; } try { compEnvManager.bindToComponentNamespace(app); } catch(Exception e) { throw new RuntimeException("Error binding app-level env dependencies " + app.getAppName(), e); } }
private void registerAppLevelDependencies(ApplicationInfo appInfo) { Application app = appInfo.getMetaData(Application.class); if( app == null ) { return; } try { compEnvManager.bindToComponentNamespace(app); } catch(Exception e) { throw new RuntimeException("Error binding app-level env dependencies " + app.getAppName(), e); } }
/** * {@inheritDoc} */ public Set<String> getRARsReferredByApplication(String appName) { ApplicationInfo appInfo = appRegistry.get(appName); if (appInfo != null) { Application app = appInfo.getMetaData(Application.class); if(appInfo.isJavaEEApp()){ return app.getResourceAdapters(); } } return new HashSet<String>(); }
private Vector getEjbDescriptors(Application application, ApplicationRegistry appsRegistry) { Vector ejbDescriptors = new Vector(); if(ResourcesUtil.createInstance().isEnabled(application)){ ApplicationInfo appInfo = appsRegistry.get(application.getName()); if(appInfo != null){ com.sun.enterprise.deployment.Application app = appInfo.getMetaData(com.sun.enterprise.deployment.Application.class); Set<BundleDescriptor> descriptors = app.getBundleDescriptors(); for (BundleDescriptor descriptor : descriptors) { if (descriptor instanceof EjbBundleDescriptor) { EjbBundleDescriptor ejbBundleDescriptor = (EjbBundleDescriptor) descriptor; Set<? extends EjbDescriptor> ejbDescriptorsSet = ejbBundleDescriptor.getEjbs(); for (EjbDescriptor ejbDescriptor : ejbDescriptorsSet) { ejbDescriptors.add(ejbDescriptor); } } } }else{ //application is enabled, but still not found in app-registry _logger.log(Level.WARNING, "application.not.started.skipping.recovery", application.getName()); } } return ejbDescriptors; }
Application app = null; if (appInfo != null) { app = appInfo.getMetaData(Application.class); } else {
throw new IllegalStateException("ApplicationInfo is not available for application [ " + appName + " ]"); Application app = appInfo.getMetaData(Application.class);
Application app = appInfo.getMetaData(Application.class); if (app == null) {
Application app = appInfo.getMetaData(Application.class); if (app == null) {
String appName = application.getName(); ApplicationInfo appInfo = appRegistry.get(appName); Application dolApp = appInfo.getMetaData(Application.class); Collection<ConnectorDescriptor> rarDescriptors = dolApp.getRarDescriptors(); for (ConnectorDescriptor desc : rarDescriptors) {
return null; final Application app = appInfo.getMetaData(Application.class); if ( app == null )
/** * Entry point from the framework into the command execution * @param context context for the command. */ public void execute(AdminCommandContext context) { final ActionReport report = context.getActionReport(); ActionReport.MessagePart part = report.getTopMessagePart(); ApplicationInfo appInfo = appRegistry.get(appname); if (appInfo != null) { Application app = appInfo.getMetaData(Application.class); if (app != null) { BundleDescriptor bundleDesc = app.getModuleByUri(modulename); if (bundleDesc != null && bundleDesc instanceof WebBundleDescriptor) { String contextRoot = ((WebBundleDescriptor)bundleDesc).getContextRoot(); part.addProperty(DeploymentProperties.CONTEXT_ROOT, contextRoot); part.setMessage(contextRoot); } } } } }
public static boolean isRAConnectionFactory(ServiceLocator habitat, String type, Application thisApp) { // first check if this is a connection factory defined in a resource // adapter in this application if (isRAConnectionFactory(type, thisApp)) { return true; } // then check if this is a connection factory defined in a standalone // resource adapter Applications applications = habitat.getService(Applications.class); if (applications != null) { List<com.sun.enterprise.config.serverbeans.Application> raApps = applications.getApplicationsWithSnifferType(com.sun.enterprise.config.serverbeans.ServerTags.CONNECTOR, true); ApplicationRegistry appRegistry = habitat.getService(ApplicationRegistry.class); for (com.sun.enterprise.config.serverbeans.Application raApp : raApps) { ApplicationInfo appInfo = appRegistry.get(raApp.getName()); if (appInfo == null) continue; if (isRAConnectionFactory(type, appInfo.getMetaData(Application.class))) { return true; } } } return false; }
} else if (Deployment.APPLICATION_LOADED.equals(event.type())) { ApplicationInfo appInfo = (ApplicationInfo) event.hook(); app = appInfo.getMetaData(Application.class); if (app == null) {
public void event(Event event) { if (event.is(Deployment.APPLICATION_LOADED) ) { ApplicationInfo info = Deployment.APPLICATION_LOADED.getHook(event); loadManagedBeans(info); registerAppLevelDependencies(info); } else if( event.is(Deployment.APPLICATION_UNLOADED) ) { ApplicationInfo info = Deployment.APPLICATION_UNLOADED.getHook(event); Application app = info.getMetaData(Application.class); doCleanup(app); } else if( event.is(Deployment.DEPLOYMENT_FAILURE) ) { Application app = Deployment.DEPLOYMENT_FAILURE.getHook(event).getModuleMetaData(Application.class); doCleanup(app); } }
public void event(Event event) { if (event.is(Deployment.APPLICATION_LOADED) ) { ApplicationInfo info = Deployment.APPLICATION_LOADED.getHook(event); loadManagedBeans(info); registerAppLevelDependencies(info); } else if( event.is(Deployment.APPLICATION_UNLOADED) ) { ApplicationInfo info = Deployment.APPLICATION_UNLOADED.getHook(event); Application app = info.getMetaData(Application.class); doCleanup(app); } else if( event.is(Deployment.DEPLOYMENT_FAILURE) ) { Application app = Deployment.DEPLOYMENT_FAILURE.getHook(event).getModuleMetaData(Application.class); doCleanup(app); } }
} else if (Deployment.APPLICATION_LOADED.equals(event.type())) { ApplicationInfo appInfo = (ApplicationInfo) event.hook(); app = appInfo.getMetaData(Application.class); if (app == null) {
String appName = params.name(); ApplicationInfo appInfo = applicationRegistry.get(appName); Application application = appInfo.getMetaData(Application.class); Set<BundleDescriptor> bundles = application.getBundleDescriptors();