Package org.jvnet.glassfish.comms.deployment.backend

Examples of org.jvnet.glassfish.comms.deployment.backend.SipApplication


    // =================================================================
    // Copy parameters from the SipApplication Model to the Context
    //
    //
    private void copyContextProperties() {
        SipApplication sipApplication = convergedContext.getSipApplication();

        if (sipApplication.getDisplayName() != null) {
            convergedContext.setDisplayName(sipApplication.getDisplayName());
        }
        context.setDistributable(sipApplication.isDistributable());
        copyContextParameters();
        copySecurityRoles();
        configureContextResource(convergedContext, sipApplication);
        configureResourceRefs(convergedContext, sipApplication);
        configureEjbReferences(convergedContext, sipApplication);
View Full Code Here


            logger.log(Level.SEVERE, "Error initializing resources: " + e.getMessage());
        }
    }

    private void getSipApplication() throws Exception {
        SipApplication sipApplication = null;

        try {
            if ((super.getDescriptor() != null) && super.getDescriptor() instanceof SipBundleDescriptor) {
                sipApplication = ((SipBundleDescriptor) super.getDescriptor()).getSipApplication();
                convergedContext.setSipApplication((SipApplication) sipApplication);
View Full Code Here

            webModule.addResource(decorator);
        }
    }

    public void configureResources() {
        SipApplication sipApp = convergedContext.getSipApplication();
        SunSipApp sunSipApp = convergedContext.getSipApplication().getSunSipDescriptor();
        ResourceRef[] rr = sunSipApp.getResourceRef();
        DefaultResourcePrincipal drp;
        ResourcePrincipal rp;
        ResourceReferenceDescriptor resRefDesc;
        ContextResourceDecorator decorator;

        if (rr != null) {
            for (int j = 0; j < rr.length; j++) {
                if (sipApp.getResourceReferenceByName(rr[j].getResRefName()) != null) {
                    sipApp.getResourceReferenceByName(rr[j].getResRefName()).setJndiName(rr[j].getJndiName());
                    drp = rr[j].getDefaultResourcePrincipal();

                    if (drp != null) {
                        rp = new ResourcePrincipal(drp.getName(), drp.getPassword());
                        sipApp.getResourceReferenceByName(rr[j].getResRefName()).setResourcePrincipal(rp);
                    }
                }
            }
        }
    }
View Full Code Here

        boolean isSipAppDistributable = false;
        SipBundleDescriptor sbd = null;
        if (_wbd instanceof SipBundleDescriptor) {
            sbd = (SipBundleDescriptor) _wbd;
            SipApplication sipApp = sbd.getSipApplication();

            if (sipApp != null) {
                isSipAppDistributable = ((SipApplication)sipApp).isDistributable();
            }
View Full Code Here

        boolean isSipAppDistributable = false;
        SipBundleDescriptor sbd = null;
        if (_wbd instanceof SipBundleDescriptor) {
            sbd = (SipBundleDescriptor) _wbd;
            SipApplication sipApp = sbd.getSipApplication();

            if (sipApp != null) {
                isSipAppDistributable = ((SipApplication)sipApp).isDistributable();
            }
View Full Code Here

    public void setElementValue(XMLElement element, String value) {
        if (SipTagNames.MAIN_SERVLET.equals(element.getQName())) {
            XMLNode node = getParentNode().getParentNode();
            if( node instanceof SipBundleNode) {
                SipBundleNode sipBundleNode = (SipBundleNode) node;
                SipApplication sipApp = (SipApplication) sipBundleNode.getDescriptor();
                sipApp.setMainservletName(value);

                // create a mapping for this servlet
                ExistsOperand existsOperand = new ExistsOperand();
                existsOperand.setVariable("request.method");
                Pattern pattern = new Pattern();
                pattern.addCondition(existsOperand);

                ServletMapping servletMapping = new ServletMapping();
                servletMapping.setServletName(value);
                servletMapping.setPattern(pattern);

                sipApp.addServletMapping(servletMapping);
            }
        }
    }
View Full Code Here

          theirLog.log(Level.SEVERE, LOGPREFIX + "webBundleContext.getDescriptor() is not a SipBundleDescriptor");
            return getDefaultFailedResult();
        }
       
      SipBundleDescriptor sipBundleDescriptor = (SipBundleDescriptor) descrptor;
      SipApplication sipApplication = sipBundleDescriptor.getSipApplication();
      if ( sipApplication == null )
      {
        return getDefaultFailedResult();
      }
View Full Code Here

        if (resp.getRequestImpl().getSupervised()) {
            // 3a. pass response to servlet
            try {
                // Design flaw in JSR289
                SipApplication application = getSipApplication();

                if (application == null) {
                    throw new IllegalStateException("Proxy without application");
                }

                switch (application.getApplicationVersion()) {
                case VERSION_1_0:

                    // In version 1.0 we cannot call servlet
                    // because of backward compabitility problem
                    break;
View Full Code Here

        // processing.
        if (hasDDXML(moduleRootDirectory, SIP_JAR_ENTRY)) {
            readSipDeploymentDescriptors(moduleRootDirectory);
        } else {
            sbd = new SipBundleDescriptor();
            SipApplication sipApplication = new SipApplication();
            sbd.setSipApplication(sipApplication);
        }
        // set the module name
        sbd.getSipApplication().setModuleName(moduleName);
        //set the Referring Decsriptor
View Full Code Here

   
    public void generateSipPolicy(ArchiveDescriptor desc) throws Exception {
        super.generatePolicy();
        SipBundleDescriptor sipDesc = (org.jvnet.glassfish.comms.deployment.backend.SipBundleDescriptor) desc;

        SipApplication sipApplication = (SipApplication) sipDesc.getSipApplication();

        SipSecurityManager manager = SipSecurityManager.createManager(sipDesc, true);
        String pContextId = manager.getContextID();

        if (!manager.inService()) {
View Full Code Here

TOP

Related Classes of org.jvnet.glassfish.comms.deployment.backend.SipApplication

Copyright © 2018 www.massapicom. 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.