/** * Obtain the full set of all the WARs in this application. * * @return the Set of WebBundleDescriptor objects. */ public Set<WebBundleDescriptor> getWebBundleDescriptors() { return getBundleDescriptors(WebBundleDescriptor.class); }
/** * Obtain the full set of all the Ejb JAR deployment information in this application. * * @return the Set of EjbBundleDescriptor objects. */ public Set<EjbBundleDescriptor> getEjbBundleDescriptors() { return getBundleDescriptors(EjbBundleDescriptor.class); }
/** * Return the Set of app client deploymenbt objects. */ public Set<ApplicationClientDescriptor> getApplicationClientDescriptors() { return getBundleDescriptors(ApplicationClientDescriptor.class); }
/** * Obtain the full set of all the Ejb JAR deployment information in this application. * * @return the Set of EjbBundleDescriptor objects. */ public Set<ConnectorDescriptor> getRarDescriptors() { return getBundleDescriptors(ConnectorDescriptor.class); }
public int getRarComponentCount() { return getBundleDescriptors(ConnectorDescriptor.class).size(); }
/** * Adds a new abstract role */ public void addRole(Role role) { for (BundleDescriptor bd : getBundleDescriptors()) { bd.addRole(role); } }
/** * Return all my subcomponents that have a file format (EJB, WAR and * AppCLient JAR). */ public Set getArchivableDescriptors() { Set archivableDescriptors = new OrderedSet(); archivableDescriptors.addAll(getBundleDescriptors()); return archivableDescriptors; }
/** * Return the Vector of ejb deployment objects. */ public Vector getEjbDescriptors() { Vector ejbDescriptors = new Vector(); for (EjbBundleDescriptor ejbBundleDescriptor : getBundleDescriptors(EjbBundleDescriptor.class)) { ejbDescriptors.addAll(ejbBundleDescriptor.getEjbs()); } return ejbDescriptors; }
/** * @return true if this bundle descriptor contains at least one CMP * EntityBean */ public boolean containsCMPEntity() { for (EjbBundleDescriptor ebd : getBundleDescriptors(EjbBundleDescriptor.class)) { if (ebd.containsCMPEntity()) return true; } return false; }
/** * Remove a web bundle descriptor from this application. * * @param bundleDescriptor the web bundle descriptor to remove */ public void removeBundleDescriptor(BundleDescriptor bundleDescriptor) { bundleDescriptor.setApplication(null); getBundleDescriptors().remove(bundleDescriptor); }
private static boolean isRAConnectionFactory(String type, Application app) { if (app == null) { return false; } for (ConnectorDescriptor cd : app.getBundleDescriptors(ConnectorDescriptor.class)) { if (cd.getConnectionDefinitionByCFType(type) != null) { return true; } } return false; }
/** * Return the Vector of ejb deployment objects. */ public Vector<EjbDescriptor> getEjbDescriptors() { Vector<EjbDescriptor> ejbDescriptors = new Vector<EjbDescriptor>(); for (EjbBundleDescriptor ejbBundleDescriptor : getBundleDescriptors(EjbBundleDescriptor.class)) { ejbDescriptors.addAll(ejbBundleDescriptor.getEjbs()); } return ejbDescriptors; }
/** * Return all my subcomponents that have a file format (EJB, WAR and * AppCLient JAR). */ public Set getArchivableDescriptors() { Set archivableDescriptors = new OrderedSet(); archivableDescriptors.addAll(getBundleDescriptors()); return archivableDescriptors; }
private boolean isEmbedded(String raname) { String ranameWithRAR = raname + ".rar"; // check for rar named this for (BundleDescriptor bd : application.getBundleDescriptors(ConnectorDescriptor.class)) { if(raname.equals(bd.getModuleName()) || ranameWithRAR.equals(bd.getModuleName())) return true; } return false; }
/** * Removes the given role. */ public void removeRole(Role role) { getAppRoles().remove(role); for (BundleDescriptor bd : getBundleDescriptors()) { bd.removeRole(role); } }
private ArrayList<EjbEndpoint> getEjbEndpoints() { ejbendpoints = new ArrayList<EjbEndpoint>(); Application app = deploymentCtx.getModuleMetaData(Application.class); Set<BundleDescriptor> bundles = app.getBundleDescriptors(); for(BundleDescriptor bundle : bundles) { collectEjbEndpoints(bundle); } return ejbendpoints; }
private void parseManagedBeans(AppResources appResources) { for (BundleDescriptor bd : application.getBundleDescriptors()) { for (ManagedBeanDescriptor managedBean : bd.getManagedBeans()) { appResources.storeInNamespace(managedBean.getGlobalJndiName(), (JndiNameEnvironment)bd); } } }
public void unRegisterDataSourceDefinitions(com.sun.enterprise.deployment.Application application) { Set<BundleDescriptor> bundles = application.getBundleDescriptors(); for (BundleDescriptor bundle : bundles) { unRegisterDataSourceDefinitions(bundle); Collection<RootDeploymentDescriptor> dds = bundle.getExtensionsDescriptors(); if(dds != null){ for(RootDeploymentDescriptor dd : dds){ unRegisterDataSourceDefinitions(dd); } } } }
public void registerDataSourceDefinitions(com.sun.enterprise.deployment.Application application) { String appName = application.getAppName(); Set<BundleDescriptor> bundles = application.getBundleDescriptors(); for (BundleDescriptor bundle : bundles) { registerDataSourceDefinitions(appName, bundle); Collection<RootDeploymentDescriptor> dds = bundle.getExtensionsDescriptors(); if(dds != null){ for(RootDeploymentDescriptor dd : dds){ registerDataSourceDefinitions(appName, dd); } } } }
@Override public DummyApplication load(SecurityContainer container, DeploymentContext context) { DeployCommandParameters dparams = context.getCommandParameters(DeployCommandParameters.class); Application app = context.getModuleMetaData(Application.class); handleCNonceCacheBSInit(app.getAppName(), app.getBundleDescriptors(WebBundleDescriptor.class), dparams.availabilityenabled); return new DummyApplication(); }