Search in sources :

Example 6 with WebBundleContext

use of com.sun.enterprise.deployment.annotation.context.WebBundleContext in project Payara by payara.

the class WebServiceUtils method isJaxwsRIDeployment.

/**
 * If WEB-INF/sun-jaxws.xml exists and is not processed in EJB context , then it returns true.
 * @param annInfo
 * @return
 */
static boolean isJaxwsRIDeployment(AnnotationInfo annInfo) {
    boolean riDeployment = false;
    AnnotatedElementHandler annCtx = annInfo.getProcessingContext().getHandler();
    try {
        ReadableArchive moduleArchive = annInfo.getProcessingContext().getArchive();
        if (moduleArchive != null && moduleArchive.exists("WEB-INF/sun-jaxws.xml") && !((Class) annInfo.getAnnotatedElement()).isInterface() && ((annCtx instanceof WebBundleContext) || (annCtx instanceof WebComponentContext))) {
            riDeployment = true;
        }
    } catch (Exception e) {
    // continue, processing
    }
    return riDeployment;
}
Also used : WebBundleContext(com.sun.enterprise.deployment.annotation.context.WebBundleContext) WebComponentContext(com.sun.enterprise.deployment.annotation.context.WebComponentContext) ReadableArchive(org.glassfish.api.deployment.archive.ReadableArchive) AnnotatedElementHandler(org.glassfish.apf.AnnotatedElementHandler)

Aggregations

WebBundleContext (com.sun.enterprise.deployment.annotation.context.WebBundleContext)6 WebComponentContext (com.sun.enterprise.deployment.annotation.context.WebComponentContext)4 AnnotatedElementHandler (org.glassfish.apf.AnnotatedElementHandler)3 WebComponentDescriptor (com.sun.enterprise.deployment.WebComponentDescriptor)2 EjbContext (com.sun.enterprise.deployment.annotation.context.EjbContext)2 EjbsContext (com.sun.enterprise.deployment.annotation.context.EjbsContext)2 AnnotatedElement (java.lang.reflect.AnnotatedElement)2 QName (javax.xml.namespace.QName)2 WebComponentDescriptorImpl (org.glassfish.web.deployment.descriptor.WebComponentDescriptorImpl)2 BundleDescriptor (com.sun.enterprise.deployment.BundleDescriptor)1 EjbBundleDescriptor (com.sun.enterprise.deployment.EjbBundleDescriptor)1 EjbDescriptor (com.sun.enterprise.deployment.EjbDescriptor)1 WebBundleDescriptor (com.sun.enterprise.deployment.WebBundleDescriptor)1 WebService (com.sun.enterprise.deployment.WebService)1 WebServiceEndpoint (com.sun.enterprise.deployment.WebServiceEndpoint)1 WebServicesDescriptor (com.sun.enterprise.deployment.WebServicesDescriptor)1 AppClientContext (com.sun.enterprise.deployment.annotation.context.AppClientContext)1 EjbBundleContext (com.sun.enterprise.deployment.annotation.context.EjbBundleContext)1 RarBundleContext (com.sun.enterprise.deployment.annotation.context.RarBundleContext)1 WebComponentsContext (com.sun.enterprise.deployment.annotation.context.WebComponentsContext)1