/** * writes the deployment descriptors (standard and runtime) * to a JarFile using the right deployment descriptor path * * @param in the input archive * @param out the abstract archive file to write to */ @Override public void writeDeploymentDescriptors(Archivist main, BundleDescriptor descriptor, ReadableArchive in, WritableArchive out) throws IOException { Collection<EjbBundleDescriptorImpl> ejbExtensions = descriptor.getExtensionsDescriptors(EjbBundleDescriptorImpl.class); for (EjbBundleDescriptorImpl ejbBundle : ejbExtensions) { super.writeDeploymentDescriptors(main, ejbBundle, in, out); } } }
@Override public <T> T getModuleMetaData(Class<T> metadataType) { try { return metadataType.cast(application.getModuleByUri(moduleUri)); } catch (Exception e) { // let's first try the extensions mechanisms... if (RootDeploymentDescriptor.class.isAssignableFrom(metadataType)) { for (RootDeploymentDescriptor extension : application.getModuleByUri(moduleUri).getExtensionsDescriptors((Class<RootDeploymentDescriptor>) metadataType)) { // we assume there can only be one type of if (extension!=null) { try { return metadataType.cast(extension); } catch (Exception e1) { // next one... } } } } return context.getModuleMetaData(metadataType); } } };
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); } } } }
/** * Obtain a set of all bundle descriptors, regardless of type * * @return the set of bundle descriptors */ public Set<BundleDescriptor> getBundleDescriptors() { Set<BundleDescriptor> bundleSet = new OrderedSet<BundleDescriptor>(); for (ModuleDescriptor<BundleDescriptor> aModule : getModules()) { BundleDescriptor bundleDesc = aModule.getDescriptor(); if (bundleDesc != null) { bundleSet.add(bundleDesc); for (RootDeploymentDescriptor rd : bundleDesc.getExtensionsDescriptors()) { if (rd instanceof BundleDescriptor) { bundleSet.add((BundleDescriptor)rd); } } } else { DOLUtils.getDefaultLogger().fine("Null descriptor for module " + aModule.getArchiveUri()); } } return bundleSet; }
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); } } } }
Collection<RootDeploymentDescriptor> extensionBundles = bundleDescriptor.getExtensionsDescriptors(); for(Iterator<RootDeploymentDescriptor> itr = extensionBundles.iterator(); itr.hasNext();) { RootDeploymentDescriptor next = itr.next();
Collection<RootDeploymentDescriptor> extensionBundles = bundleDescriptor.getExtensionsDescriptors(); for(Iterator<RootDeploymentDescriptor> itr = extensionBundles.iterator(); itr.hasNext();) { RootDeploymentDescriptor next = itr.next();
private void collectEjbEndpoints(BundleDescriptor bundleDesc) { WebServicesDescriptor wsDesc = bundleDesc.getWebServices(); for (WebService ws : wsDesc.getWebServices()) { for (WebServiceEndpoint endpoint : ws.getEndpoints()) { //Only add for ejb based endpoints if (endpoint.implementedByEjbComponent()) { ejbendpoints.add(new EjbEndpoint(endpoint.getEndpointAddressUri(), endpoint.isSecure())); } } } //For ejb webservices in war we need to get the extension descriptors //from the WebBundleDescriptor and process those too //http://monaco.sfbay/detail.jsf?cr=6956406 for (EjbBundleDescriptor ejbD : bundleDesc.getExtensionsDescriptors(EjbBundleDescriptor.class)) { collectEjbEndpoints(ejbD); } } public boolean stop(ApplicationContext stopContext) {
bundle.getExtensionsDescriptors(EjbBundleDescriptorImpl.class).iterator().next() : (EjbBundleDescriptorImpl) bundle;
String moduleName = getModuleName(bundleDesc, app); processDescriptorForRAReferences(app, bundleDesc, moduleName); Collection<RootDeploymentDescriptor> dds = bundleDesc.getExtensionsDescriptors(); if(dds != null){ for(RootDeploymentDescriptor dd : dds){
public Application load(DeploymentContext dc) throws IOException { DeployCommandParameters params = dc.getCommandParameters(DeployCommandParameters.class); Application application = processDOL(dc); // write out xml files if needed if (Boolean.valueOf(WRITEOUT_XML)) { saveAppDescriptor(application, dc); } if (application.isVirtual()) { dc.addModuleMetaData(application.getStandaloneBundleDescriptor()); for (RootDeploymentDescriptor extension : application.getStandaloneBundleDescriptor().getExtensionsDescriptors()) { dc.addModuleMetaData(extension); } } addModuleConfig(dc, application); validateKeepStateOption(dc, params, application); return application; }
public ModuleInfo doBundle(ModuleDescriptor bundle) throws Exception { ExtendedDeploymentContext sContext = subContext(application, context, bundle.getArchiveUri()); ModuleInfo info = prepareBundle(bundle, application, sContext); if (info == null) { sContext.getActionReport().setActionExitCode(ActionReport.ExitCode.WARNING); String msg = localStrings.getLocalString("skipmoduleprocessing", "Skipped processing for module {0} as its module type was not recognized", bundle.getArchiveUri()); sContext.getActionReport().setMessage(msg); deplLogger.log(Level.WARNING, UNRECOGNIZED_MODULE_TYPE, bundle.getArchiveUri()); return null; } info.addMetaData(application); BundleDescriptor bundleDesc = application.getModuleByUri( bundle.getArchiveUri()); info.addMetaData(bundleDesc); for (RootDeploymentDescriptor ext : bundleDesc.getExtensionsDescriptors()) { info.addMetaData(ext); } appInfo.addModule(info); return info; }
if (bundle.getModuleType().equals(XModuleType.WAR)) { Collection<EjbBundleDescriptor> ejbExtensions = bundle.getExtensionsDescriptors(EjbBundleDescriptor.class); for (EjbBundleDescriptor ejbBundle : ejbExtensions) { Archivist ejbArchivist =
for (PersistenceUnitsDescriptor pus : bd.getExtensionsDescriptors(PersistenceUnitsDescriptor.class)) { for (PersistenceUnitDescriptor pu : pus.getPersistenceUnitDescriptors()) { parseResources(pu, env, appResources);