Package com.sun.enterprise.deployment

Examples of com.sun.enterprise.deployment.ApplicationClientDescriptor


         * Attach any names defined in the app client.  Validate the descriptor
         * first, then use it to bind names in the app client.  This order is
         * important - for example, to set up message destination refs correctly.
         */
        client.validateDescriptor();
        final ApplicationClientDescriptor desc = client.getDescriptor(classLoader);
        componentId = componentEnvManager.bindToComponentNamespace(desc);

        /*
         * Arrange for cleanup now instead of during launch() because in some use cases
         * the JVM will invoke the client's main method itself and launch will
         * be skipped.
         */
        cleanup = Cleanup.arrangeForShutdownCleanup(logger, habitat, desc);
       
        /*
         * Allow pre-destroy handling to work on the main class during clean-up.
         */
        cleanup.setInjectionManager(injectionManager,
                clientMainClassSetting.clientMainClass);

        /*
         * If this app client contains persistence unit refs, then initialize
         * the PU handling. 
         */
        Collection<? extends PersistenceUnitDescriptor> referencedPUs = desc.findReferencedPUs();
        if (referencedPUs != null && ! referencedPUs.isEmpty()) {

            ProviderContainerContractInfoImpl pcci = new ProviderContainerContractInfoImpl(
                    (ACCClassLoader) getClassLoader(), inst, client.getAnchorDir(), connectorRuntime);
            for (PersistenceUnitDescriptor puDesc : referencedPUs) {
                PersistenceUnitLoader pul = new PersistenceUnitLoader(puDesc, pcci);
                desc.addEntityManagerFactory(puDesc.getName(), pul.getEMF());
            }

            cleanup.setEMFs(pcci.emfs());
        }

        cleanup.setConnectorRuntime(connectorRuntime);

        prepareURLStreamHandling();

        //This is required for us to enable interrupt jaxws service
        //creation calls
        System.setProperty("javax.xml.ws.spi.Provider",
                           "com.sun.enterprise.webservice.spi.ProviderImpl");
        //InjectionManager's injectClass will be called from getMainMethod


        // Load any managed beans
        ManagedBeanManager managedBeanManager = habitat.getService(ManagedBeanManager.class);
        managedBeanManager.loadManagedBeans(desc.getApplication());
        cleanup.setManagedBeanManager(managedBeanManager);

        /**
         * We don't really need the main method here but we do need the side-effects.
         */
 
View Full Code Here


    private void setDescriptor() {
  acDescriptor = getApplicationClientDescriptor();
    }

    private ApplicationClientDescriptor getApplicationClientDescriptor() {
  ApplicationClientDescriptor appCD = null;
  try {
            Application app = configManager.getDescriptor(this.id, null, false);
            appCD = (ApplicationClientDescriptor) app.getStandaloneBundleDescriptor();
        } catch(ConfigException ex) {
            _logger.log(Level.WARNING,"Failed to get the ApplicationClientDescriptor");
View Full Code Here

        AnnotatedElementHandler aeHandler = null;
        if (bundleDesc instanceof EjbBundleDescriptor) {
            EjbBundleDescriptor ejbBundleDesc = (EjbBundleDescriptor)bundleDesc;
            aeHandler = new EjbBundleContext(ejbBundleDesc);
        } else if (bundleDesc instanceof ApplicationClientDescriptor) {
            ApplicationClientDescriptor appClientDesc =
                    (ApplicationClientDescriptor)bundleDesc;
            aeHandler = new AppClientContext(appClientDesc);
        } else if (bundleDesc instanceof WebBundleDescriptor) {
            WebBundleDescriptor webBundleDesc = (WebBundleDescriptor)bundleDesc;
            aeHandler = new WebBundleContext(webBundleDesc);
View Full Code Here

                   classLoader);
        } else if (ModuleType.WAR.equals(archivist.getModuleType())) {
            scanner = new WarScanner(f, (WebBundleDescriptor)bundleDesc,
                   classLoader);
        } else if (ModuleType.CAR.equals(archivist.getModuleType())) {
            ApplicationClientDescriptor appClientDesc =
                    (ApplicationClientDescriptor)bundleDesc;

            scanner = new AppClientScanner(f, appClientDesc, classLoader);
        }
View Full Code Here

      descriptor = new JavaWebStartAccessDescriptor();
            XMLNode parentNode = getParentNode();
            if (parentNode != null && (parentNode instanceof AppClientRuntimeNode)) {
                Object parentDescriptor = parentNode.getDescriptor();
                if (parentDescriptor != null && (parentDescriptor instanceof ApplicationClientDescriptor) ) {
                    ApplicationClientDescriptor acDescriptor = (ApplicationClientDescriptor) parentDescriptor;
                    acDescriptor.setJavaWebStartAccessDescriptor(descriptor);
                }
               
            }
  }
  return descriptor;
View Full Code Here

    public Node writeDescriptor(Node parent, Descriptor descriptor) {

        if (! (descriptor instanceof ApplicationClientDescriptor)) {
            throw new IllegalArgumentException(getClass() + " cannot handle descriptors of type " + descriptor.getClass());
        }
        ApplicationClientDescriptor appclientDesc = (ApplicationClientDescriptor) descriptor;
        Node appclientNode = super.writeDescriptor(parent, appclientDesc);     

  // env-entry*
        writeEnvEntryDescriptors(appclientNode, appclientDesc.getEnvironmentProperties().iterator());
       
        // ejb-ref * and ejb-local-ref*
        writeEjbReferenceDescriptors(appclientNode, appclientDesc.getEjbReferenceDescriptors().iterator());

        // service-ref*
        writeServiceReferenceDescriptors(appclientNode, appclientDesc.getServiceReferenceDescriptors().iterator());

        // resource-ref*
        writeResourceRefDescriptors(appclientNode, appclientDesc.getResourceReferenceDescriptors().iterator());
       
        // resource-env-ref*
        writeResourceEnvRefDescriptors(appclientNode, appclientDesc.getJmsDestinationReferenceDescriptors().iterator());

        // message-destination-ref*
        writeMessageDestinationRefDescriptors(appclientNode, appclientDesc.getMessageDestinationReferenceDescriptors().iterator());

        // persistence-unit-ref*
        writeEntityManagerFactoryReferenceDescriptors(appclientNode, appclientDesc.getEntityManagerFactoryReferenceDescriptors().iterator());

        // post-construct
        writePostConstructDescriptors(appclientNode, appclientDesc.getPostConstructDescriptors().iterator());
       
        // pre-destroy
        writePreDestroyDescriptors(appclientNode, appclientDesc.getPreDestroyDescriptors().iterator());
       
        appendTextChild(appclientNode, ApplicationClientTagNames.CALLBACK_HANDLER, appclientDesc.getCallbackHandler());               

         // message-destination*
        writeMessageDestinations
           (appclientNode, appclientDesc.getMessageDestinations().iterator());     
       
  return appclientNode;
             
    }
View Full Code Here

        if (! (descriptor instanceof ApplicationClientDescriptor)) {
            throw new IllegalArgumentException(getClass() + " cannot handles descriptors of type " + descriptor.getClass());
        }
       
        Node appClient = super.writeDescriptor(parent, descriptor);
        ApplicationClientDescriptor bundleDescriptor = (ApplicationClientDescriptor) descriptor;
        RuntimeDescriptorNode.writeCommonComponentInfo(appClient, descriptor);
        RuntimeDescriptorNode.writeMessageDestinationInfo(appClient, bundleDescriptor);
        JavaWebStartAccessNode.writeJavaWebStartInfo(appClient, bundleDescriptor.getJavaWebStartAccessDescriptor());
        return appClient;
    }
View Full Code Here

        // Register AppClient modules
        java.util.Set appClientBundles = application.getApplicationClientDescriptors();

        for (Iterator it = appClientBundles.iterator(); it.hasNext();) {
            ApplicationClientDescriptor bundleDesc = (ApplicationClientDescriptor) it.next();
            registerAppClient(bundleDesc, serverName, appLocation);
        }
    }
View Full Code Here

        // Register AppClient modules
        java.util.Set appClientBundles = application.getApplicationClientDescriptors();

        for (Iterator it = appClientBundles.iterator(); it.hasNext();) {
            ApplicationClientDescriptor bundleDesc = (ApplicationClientDescriptor) it.next();
            registerAppClient(bundleDesc, serverName, appLocation);
        }
    }
View Full Code Here

         */
        String result = null;

        BundleDescriptor bd = moduleDescr.getDescriptor();
        if (bd instanceof ApplicationClientDescriptor) {
            ApplicationClientDescriptor acd = (ApplicationClientDescriptor) bd;
            JavaWebStartAccessDescriptor jwsAD = acd.getJavaWebStartAccessDescriptor();
            if (jwsAD != null) {
                result = jwsAD.getContextRoot();
            }
        }
        return result;
View Full Code Here

TOP

Related Classes of com.sun.enterprise.deployment.ApplicationClientDescriptor

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.