/** * @return the visitor for this bundle descriptor */ public ComponentVisitor getBundleVisitor() { return new ApplicationValidator(); }
/** * @return a validated WebBundleDescriptor corresponding to default-web.xml * that can be used in webtier. */ public synchronized WebBundleDescriptor getDefaultWebXmlBundleDescriptor() { if (defaultWebXmlBundleDescriptor == null) { defaultWebXmlBundleDescriptor = getPlainDefaultWebXmlBundleDescriptor(); ApplicationValidator validator = new ApplicationValidator(); validator.accept(defaultWebXmlBundleDescriptor ); } return defaultWebXmlBundleDescriptor ; }
if (!compareVectorForApp(myVector,jndiName)) { return false;
if (descriptor instanceof Application) { Application application = (Application)descriptor; accept(application); if (!validateResourceDescriptor(application)) { DOLUtils.getDefaultLogger().log(Level.SEVERE, "enterprise.deployment.util.application.fail", new Object[] { application.getAppName() }); validateEnvEntries(application); ebd.visit(getSubDescriptorVisitor(ebd)); wbd.visit(getSubDescriptorVisitor(wbd)); cd.visit(getSubDescriptorVisitor(cd)); acd.visit(getSubDescriptorVisitor(acd)); accept(injectable);
if (!compareVectorForComp(scopeVector,jndiName)) { return false; if (!compareVectorForModule(scopeVector,jndiName)) { return false; if (!compareVectorForApp(scopeVector,jndiName)) { return false;
@Override public void accept(ManagedBeanDescriptor managedBean) { this.bundleDescriptor = managedBean.getBundle(); this.application = bundleDescriptor.getApplication(); for (Iterator itr = managedBean.getEjbReferenceDescriptors().iterator(); itr.hasNext();) { EjbReference aRef = (EjbReference) itr.next(); accept(aRef); } for (Iterator it = managedBean.getResourceReferenceDescriptors().iterator(); it.hasNext();) { ResourceReferenceDescriptor next = (ResourceReferenceDescriptor) it.next(); accept(next); } for (Iterator it = managedBean.getResourceEnvReferenceDescriptors().iterator(); it.hasNext();) { ResourceEnvReferenceDescriptor next = (ResourceEnvReferenceDescriptor) it.next(); accept(next); } for (Iterator it = managedBean.getMessageDestinationReferenceDescriptors().iterator(); it.hasNext();) { MessageDestinationReferencer next = (MessageDestinationReferencer) it.next(); accept(next); } Set serviceRefs = managedBean.getServiceReferenceDescriptors(); for (Iterator itr = serviceRefs.iterator(); itr.hasNext();) { accept((ServiceReferenceDescriptor) itr.next()); } }
Set<ResourceDescriptor> resourceDescriptors = commonResourceBundleDescriptor .getAllResourcesDescriptors(); if (findExistingDescriptors(resourceDescriptors, APP_LEVEL + commonResourceBundleDescriptor.getName())) { return false; Set<ResourceDescriptor> resourceDescriptors = acd .getAllResourcesDescriptors(ApplicationClientDescriptor.class); if (findExistingDescriptors(resourceDescriptors, APPCLIENTBUNDLE_LEVEL + acd.getName())) { return false; Set<ResourceDescriptor> resourceDescriptors = cd .getAllResourcesDescriptors(ApplicationClientDescriptor.class); if (findExistingDescriptors(resourceDescriptors, APPCLIENT_LEVEL + cd.getName())) { return false; Set<ResourceDescriptor> resourceDescriptors = ebd .getAllResourcesDescriptors(); if (findExistingDescriptors(resourceDescriptors, EJBBUNDLE_LEVEL + ebd.getName())) { return false; EjbDescriptor ejbDescriptor = (EjbDescriptor) itr.next(); resourceDescriptors = ejbDescriptor.getAllResourcesDescriptors(); if (findExistingDescriptors(resourceDescriptors, EJB_LEVEL + ebd.getName() + "#" + ejbDescriptor.getName())) { return false;
if (!compareVectorForModule(myVector,jndiName)) { return false;
private void computeRuntimeDefault(WebComponentDescriptor webComp) { if (!webComp.getUsesCallerIdentity()) { computeRunAsPrincipalDefault( webComp.getRunAsIdentity(), webComp.getApplication()); } }
/** * visit a web component descriptor * * @param descriptor the web component */ public void accept(WebComponentDescriptor descriptor) { //set default value if (descriptor.getLoadOnStartUp() == null) { descriptor.setLoadOnStartUp(-1); } if (descriptor.isAsyncSupported() == null) { descriptor.setAsyncSupported(false); } MultipartConfig multipartConfig = descriptor.getMultipartConfig(); if (multipartConfig != null) { if (multipartConfig.getMaxFileSize() == null) { multipartConfig.setMaxFileSize(new Long(-1)); } if (multipartConfig.getMaxRequestSize() == null) { multipartConfig.setMaxRequestSize(new Long(-1)); } if (multipartConfig.getFileSizeThreshold() == null) { multipartConfig.setFileSizeThreshold(new Integer(0)); } } computeRuntimeDefault(descriptor); }
@Override public void accept (BundleDescriptor descriptor) { if (descriptor instanceof ApplicationClientDescriptor) { ApplicationClientDescriptor appClientDesc = (ApplicationClientDescriptor)descriptor; accept(appClientDesc); // Visit all injectables first. In some cases, basic type // information has to be derived from target inject method or // inject field. for(InjectionCapable injectable : appClientDesc.getInjectableResources(appClientDesc)) { accept(injectable); } super.accept(descriptor); } }
public void validate() { visit((ManagedBeanVisitor)new ApplicationValidator()); }
public void validate() { visit(new ApplicationValidator()); }
/** * validates the DOL Objects associated with this archivist, usually * it requires that a class loader being set on this archivist or passed * as a parameter */ @Override public void validate(ClassLoader aClassLoader) { ClassLoader cl = aClassLoader; if (cl==null) { cl = classLoader; } if (cl==null) { return; } descriptor.setClassLoader(cl); descriptor.visit((WebBundleVisitor) new ApplicationValidator()); }
/** * validates the DOL Objects associated with this archivist, usually * it requires that a class loader being set on this archivist or passed * as a parameter */ @Override public void validate(ClassLoader aClassLoader) { ClassLoader cl = aClassLoader; if (cl==null) { cl = classLoader; } if (cl==null) { return; } descriptor.setClassLoader(cl); descriptor.visit((ApplicationVisitor) new ApplicationValidator()); }
/** * validates the DOL Objects associated with this archivist, usually * it requires that a class loader being set on this archivist or passed * as a parameter */ @Override public void validate(ClassLoader aClassLoader) { ClassLoader cl = aClassLoader; if (cl==null) { cl = classLoader; } if (cl==null) { return; } descriptor.setClassLoader(cl); descriptor.visit((ApplicationVisitor) new ApplicationValidator()); }
/** * validates the DOL Objects associated with this archivist, usually * it requires that a class loader being set on this archivist or passed * as a parameter */ @Override public void validate(ClassLoader aClassLoader) { ClassLoader cl = aClassLoader; if (cl == null) { cl = classLoader; } if (cl == null) { return; } descriptor.setClassLoader(cl); descriptor.visit(new ApplicationValidator()); }
/** * validates the DOL Objects associated with this archivist, usually * it requires that a class loader being set on this archivist or passed * as a parameter */ @Override public void validate(ClassLoader aClassLoader) { ClassLoader cl = aClassLoader; if (cl==null) { cl = classLoader; } if (cl==null) { return; } descriptor.setClassLoader(cl); descriptor.visit((WebBundleVisitor) new ApplicationValidator()); }
/** * This method populates the rest of the Application object from the * previous standard deployment descriptor reading * @param archive the archive for the application */ public Application openWith(Application application, ReadableArchive archive, Archivist archivist) throws IOException, SAXException { archivist.openWith(application, archive); // validate if (application.isVirtual()) { application.setClassLoader(archivist.getClassLoader()); application.visit((ApplicationVisitor) new ApplicationValidator()); } return application; }
/** * This method populates the rest of the Application object from the * previous standard deployment descriptor reading * @param archive the archive for the application */ public Application openWith(Application application, ReadableArchive archive, Archivist archivist) throws IOException, SAXParseException { archivist.openWith(application, archive); // validate if (application.isVirtual()) { application.setClassLoader(archivist.getClassLoader()); application.visit((ApplicationVisitor) new ApplicationValidator()); } return application; }