Search in sources :

Example 46 with WebBundleDescriptor

use of com.sun.enterprise.deployment.WebBundleDescriptor in project Payara by payara.

the class WebBundleDescriptorImpl method combineResourceEnvReferenceDescriptors.

@Override
protected void combineResourceEnvReferenceDescriptors(JndiNameEnvironment env) {
    for (Object ojdRef : env.getResourceEnvReferenceDescriptors()) {
        ResourceEnvReferenceDescriptor jdRef = (ResourceEnvReferenceDescriptor) ojdRef;
        ResourceEnvReferenceDescriptor jdr = _getResourceEnvReferenceByName(jdRef.getName());
        if (jdr != null) {
            combineInjectionTargets(jdr, jdRef);
        } else {
            if (env instanceof WebBundleDescriptor && ((WebBundleDescriptor) env).isConflictResourceEnvReference()) {
                throw new IllegalArgumentException(localStrings.getLocalString("web.deployment.exceptionconflictresourceenvref", "There are more than one resource env references defined in web fragments with the same name, but not overrided in web.xml"));
            } else {
                addResourceEnvReferenceDescriptor(jdRef);
            }
        }
    }
}
Also used : WebBundleDescriptor(com.sun.enterprise.deployment.WebBundleDescriptor) ResourceEnvReferenceDescriptor(com.sun.enterprise.deployment.ResourceEnvReferenceDescriptor)

Example 47 with WebBundleDescriptor

use of com.sun.enterprise.deployment.WebBundleDescriptor in project Payara by payara.

the class WebBundleDescriptorImpl method combineResourceReferenceDescriptors.

/**
 * @param env
 */
@Override
protected void combineResourceReferenceDescriptors(JndiNameEnvironment env) {
    for (Object oresRef : env.getResourceReferenceDescriptors()) {
        ResourceReferenceDescriptor resRef = (ResourceReferenceDescriptor) oresRef;
        ResourceReferenceDescriptor rrd = _getResourceReferenceByName(resRef.getName());
        if (rrd != null) {
            combineInjectionTargets(rrd, resRef);
        } else {
            if (env instanceof WebBundleDescriptor && ((WebBundleDescriptor) env).isConflictResourceReference()) {
                throw new IllegalArgumentException(localStrings.getLocalString("web.deployment.exceptionconflictresourceref", "There are more than one resource references defined in web fragments with the same name, but not overrided in web.xml"));
            } else {
                addResourceReferenceDescriptor(resRef);
            }
        }
    }
}
Also used : WebBundleDescriptor(com.sun.enterprise.deployment.WebBundleDescriptor) ResourceReferenceDescriptor(com.sun.enterprise.deployment.ResourceReferenceDescriptor)

Aggregations

WebBundleDescriptor (com.sun.enterprise.deployment.WebBundleDescriptor)47 EjbBundleDescriptor (com.sun.enterprise.deployment.EjbBundleDescriptor)14 EjbDescriptor (com.sun.enterprise.deployment.EjbDescriptor)10 BundleDescriptor (com.sun.enterprise.deployment.BundleDescriptor)9 WebComponentDescriptor (com.sun.enterprise.deployment.WebComponentDescriptor)7 Application (com.sun.enterprise.deployment.Application)6 ApplicationClientDescriptor (com.sun.enterprise.deployment.ApplicationClientDescriptor)5 ArrayList (java.util.ArrayList)4 ApplicationInfo (org.glassfish.internal.data.ApplicationInfo)4 JndiNameEnvironment (com.sun.enterprise.deployment.JndiNameEnvironment)3 ManagedBeanDescriptor (com.sun.enterprise.deployment.ManagedBeanDescriptor)3 SecurityConstraint (com.sun.enterprise.deployment.web.SecurityConstraint)3 WebResourceCollection (com.sun.enterprise.deployment.web.WebResourceCollection)3 IASSecurityException (com.sun.enterprise.security.util.IASSecurityException)3 Iterator (java.util.Iterator)3 ConnectorDescriptor (com.sun.enterprise.deployment.ConnectorDescriptor)2 JMSDestinationDefinitionDescriptor (com.sun.enterprise.deployment.JMSDestinationDefinitionDescriptor)2 XMLNode (com.sun.enterprise.deployment.node.XMLNode)2 LoginConfiguration (com.sun.enterprise.deployment.web.LoginConfiguration)2 File (java.io.File)2