Examples of SunWebApp


Examples of com.sun.enterprise.deployment.runtime.web.SunWebApp

     *
     * @return object representation of web deployment descriptor
     */
    public SunWebApp getSunDescriptor() {
        if (sunWebApp == null) {
            sunWebApp = new SunWebApp();
        }
        return sunWebApp;
    }
View Full Code Here

Examples of com.sun.enterprise.deployment.runtime.web.SunWebApp

     */
    public Node writeDescriptor(Node parent, WebBundleDescriptor bundleDescriptor) {
        Element root = appendChildNS(parent, getXMLRootTag().getQName(),
                    TagNames.WL_WEB_APP_NAMESPACE);

        SunWebApp sunWebApp = bundleDescriptor.getSunDescriptor();

        //security-role-assignment*
        WLSecurityRoleAssignment[] wlRoleAssignments = sunWebApp.getWLSecurityRoleAssignment();
        if (wlRoleAssignments != null && wlRoleAssignments.length > 0) {
            WLSecurityRoleAssignmentNode sran = new WLSecurityRoleAssignmentNode();
            for (int i = 0; i < wlRoleAssignments.length; i++) {
                sran.writeDescriptor(root, RuntimeTagNames.WL_SECURITY_ROLE_ASSIGNMENT, wlRoleAssignments[i]);
            }
        }

        //resource-description*
        ResourceRef[] resourceRefs = sunWebApp.getResourceRef();
        if (resourceRefs != null && resourceRefs.length > 0) {
            WLResourceDescriptionNode node = new WLResourceDescriptionNode();
            for (ResourceRef resRef : resourceRefs) {
                node.writeDescriptor(root, RuntimeTagNames.RESOURCE_DESCRIPTION, resRef);
            }
        }

        //resource-env-description*
        ResourceEnvRef[] resourceEnvRefs = sunWebApp.getResourceEnvRef();
        if (resourceEnvRefs != null && resourceEnvRefs.length > 0) {
            WLResourceEnvDescriptionNode node = new WLResourceEnvDescriptionNode();
            for (ResourceEnvRef resourceEnvRef : resourceEnvRefs) {
                node.writeDescriptor(root, RuntimeTagNames.RESOURCE_ENV_DESCRIPTION, resourceEnvRef);
            }
        }

        //ejb-reference-description*
        EjbRef[] ejbRefs = sunWebApp.getEjbRef();
        if (ejbRefs != null && ejbRefs.length > 0) {
            WLEjbReferenceDescriptionNode node = new WLEjbReferenceDescriptionNode();
            for (EjbRef ejbRef : ejbRefs) {
                node.writeDescriptor(root, RuntimeTagNames.EJB_REF, ejbRef);
            }
View Full Code Here

Examples of com.sun.enterprise.deployment.runtime.web.SunWebApp

    /**
     * Get and create a runtime SessionConfig if necessary.
     */
    private com.sun.enterprise.deployment.runtime.web.SessionConfig getRuntimeSessionConfig() {
        WebBundleDescriptor webBundleDescriptor = (WebBundleDescriptor)getParentNode().getDescriptor();
        SunWebApp sunDescriptor = webBundleDescriptor.getSunDescriptor();
        com.sun.enterprise.deployment.runtime.web.SessionConfig runtimeSessionConfig =
                sunDescriptor.getSessionConfig();
        if (runtimeSessionConfig == null) {
            runtimeSessionConfig = new com.sun.enterprise.deployment.runtime.web.SessionConfig();
            sunDescriptor.setSessionConfig(runtimeSessionConfig);
        }

        return runtimeSessionConfig;
    }
View Full Code Here

Examples of com.sun.enterprise.deployment.runtime.web.SunWebApp

        // set habitat for jsf injection
        servletContext.setAttribute(
                Constants.HABITAT_ATTRIBUTE, defaultHabitat);

        SunWebApp bean = webModule.getIasWebAppConfigBean();

        // Find the default jsp servlet
        Wrapper wrapper = (Wrapper) webModule.findChild(
            org.apache.catalina.core.Constants.JSP_SERVLET_NAME);
        if (wrapper == null) {
            return;
        }

        if (webModule.getTldValidation()) {
            wrapper.addInitParameter("enableTldValidation", "true");
        }
        if (bean != null && bean.getJspConfig()  != null) {
            WebProperty[]  props = bean.getJspConfig().getWebProperty();
            for (int i = 0; i < props.length; i++) {
                String pname = props[i].getAttributeValue("name");
                String pvalue = props[i].getAttributeValue("value");
                if (_logger.isLoggable(Level.FINE)) {
                    _logger.fine("jsp-config property for [" +
View Full Code Here

Examples of com.sun.enterprise.deployment.runtime.web.SunWebApp

            return "warning";
    }

    private void startCacheManager(WebModule webModule) {

        SunWebApp bean  = webModule.getIasWebAppConfigBean();

        // Configure the cache, cache-mapping and other settings
        if (bean != null) {
            CacheManager cm = null;
            try {
View Full Code Here

Examples of com.sun.enterprise.deployment.runtime.web.SunWebApp

    }

    private void stopCoherenceWeb() {
        if (wmInfo.getDescriptor() != null &&
                wmInfo.getDescriptor().getSunDescriptor() != null) {
            SunWebApp sunWebApp = wmInfo.getDescriptor().getSunDescriptor();
            if (sunWebApp.getSessionConfig() != null &&
                    sunWebApp.getSessionConfig().getSessionManager() != null) {
                SessionManager sessionManager =
                    sunWebApp.getSessionConfig().getSessionManager();
                String persistenceType = sessionManager.getAttributeValue(
                    SessionManager.PERSISTENCE_TYPE);
                if (PersistenceType.COHERENCE_WEB.getType().equals(persistenceType)) {
                    ClassLoader cloader = wmInfo.getAppClassLoader();
                    try {
View Full Code Here

Examples of com.sun.enterprise.deployment.runtime.web.SunWebApp

   * @param wbd WebBundleDescriptor of the web module whose sun-web.xml
     * is used to configure the given JspC instance
   */
        private static void configureJspc(JspC jspc, WebBundleDescriptor wbd) {

          SunWebApp sunWebApp = wbd.getSunDescriptor();
          if (sunWebApp == null) {
               return;
            }

            // START SJSAS 6384538
            if (sunWebApp.sizeWebProperty() > 0) {
                WebProperty[] props = sunWebApp.getWebProperty();
                for (int i = 0; i < props.length; i++) {
                    String pName = props[i].getAttributeValue("name");
                    String pValue = props[i].getAttributeValue("value");
                    if (pName == null || pValue == null) {
                        throw new IllegalArgumentException(
                            "Missing sun-web-app property name or value");
                    }
                    if ("enableTldValidation".equals(pName)) {
                        jspc.setIsValidationEnabled(
                            Boolean.valueOf(pValue).booleanValue());
                    }
                }
            }
            // END SJSAS 6384538

            // START SJSAS 6170435
            /*
             * Configure JspC with the init params of the JspServlet
             */
            Set<WebComponentDescriptor> set = wbd.getWebComponentDescriptors();
            if (!set.isEmpty()) {
                Iterator<WebComponentDescriptor> iterator = set.iterator();
                while (iterator.hasNext()) {
                    WebComponentDescriptor webComponentDesc = iterator.next();
                    if ("jsp".equals(webComponentDesc.getCanonicalName())) {
                        Enumeration<InitializationParameter> en
                            = webComponentDesc.getInitializationParameters();
                        if (en != null) {
                            while (en.hasMoreElements()) {
                                InitializationParameter initP = en.nextElement();
                                configureJspc(jspc,
                                              initP.getName(),
                                              initP.getValue());
                            }
                        }
                        break;
                    }
                }
            }
            // END SJSAS 6170435

            /*
             * Configure JspC with jsp-config properties from sun-web.xml,
             * which override JspServlet init params of the same name.
             */
            JspConfig jspConfig = sunWebApp.getJspConfig();
            if (jspConfig == null) {
                return;
            }
            WebProperty[] props = jspConfig.getWebProperty();
            for (int i=0; props!=null && i<props.length; i++) {
View Full Code Here

Examples of com.sun.enterprise.deployment.runtime.web.SunWebApp

            envProps.add(envEntry);
        }

        ContextResource[] resources = context.findResources();
        ResourceReferenceDescriptor resourceReference;
        SunWebApp iasBean = webBundleDescriptor.getSunDescriptor();
        ResourceRef[] rr = iasBean.getResourceRef();
        DefaultResourcePrincipal drp;
        ResourcePrincipal rp;


        for (int i=0; i<resources.length; i++) {
View Full Code Here

Examples of com.sun.enterprise.deployment.runtime.web.SunWebApp

        if (webBundle != null) {
            String policyContextId = WebSecurityManager.getContextID(webBundle);
            map.put(HttpServletConstants.POLICY_CONTEXT, policyContextId);

      SunWebApp sunWebApp = webBundle.getSunDescriptor();
      String pid = (sunWebApp != null ? sunWebApp.getAttributeValue
        (sunWebApp.HTTPSERVLET_SECURITY_PROVIDER) : null);
            boolean nullConfigProvider = false;

            if (isSystemApp && (pid == null || pid.length() == 0)) {
                pid = defaultSystemProviderID;
View Full Code Here

Examples of com.sun.enterprise.deployment.runtime.web.SunWebApp

        //V3:Commented if(VirtualServer.ADMIN_VS.equals(getVirtualServers(appName))){
           if(Constants.ADMIN_VS.equals(getVirtualServers(appName))){
            LoginConfiguration lgConf = wbd.getLoginConfiguration();
            if (lgConf != null){
                String realmName = lgConf.getRealmName();
                SunWebApp sunDes = wbd.getSunDescriptor();
                if(sunDes != null){
                    SecurityRoleMapping[] srms = sunDes.getSecurityRoleMapping();
                    if(srms != null){
                        for (SecurityRoleMapping srm : srms) {
                            String[] principals = srm.getPrincipalName();
                            if (principals != null) {
                                for (String principal : principals) {
                                    wsmf.ADMIN_PRINCIPAL.put(realmName + principal, new PrincipalImpl(principal));
                                }
                            }
                            for (String group : srm.getGroupNames()) {
                                wsmf.ADMIN_GROUP.put(realmName + group, new Group(group));
                            }
                        }
                    }
                    WLSecurityRoleAssignment[] sras = sunDes.getWLSecurityRoleAssignment();
                    if(sras != null){
                        for (WLSecurityRoleAssignment sra : sras) {
                            List<String> principals = sra.getPrincipalNames();
                            if (sra.isExternallyDefined()) {
                                wsmf.ADMIN_GROUP.put(realmName + sra.getRoleName(), new Group(sra.getRoleName()));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.