Package com.sun.enterprise.deployment

Examples of com.sun.enterprise.deployment.ApplicationClientDescriptor


            for (ModuleDescriptor<BundleDescriptor> md : app.getModules()) {
                if ( ! md.getModuleType().equals(DOLUtils.carType())) {
                    continue;
                }

                ApplicationClientDescriptor acd = (ApplicationClientDescriptor) md.getDescriptor();

                final String displayName = acd.getDisplayName();
                final String appName = acd.getModuleID();

                ArchiveFactory archiveFactory = Util.getArchiveFactory();
                ReadableArchive clientRA = archiveFactory.openArchive(ra.getURI().resolve(md.getArchiveUri()));

                /*
 
View Full Code Here


    private ApplicationClientDescriptor chooseFromEmbeddedAppClients(
            Set<ApplicationClientDescriptor> embeddedAppClients,
            String mainClassFromCommandLine,
            String displayNameFromCommandLine) {
        ApplicationClientDescriptor result = null;
       
        /*
         *There are at least two app clients embedded in the ear.
         *
         *To remain compatible with earlier releases the logic below
View Full Code Here

        }
        return result;
    }
       
    private ApplicationClientDescriptor useFirstEmbeddedAppClient(Set<ApplicationClientDescriptor> embeddedAppClients, String mainClassNameFromCommandLine) {
        ApplicationClientDescriptor result = null;
       
        /*
         *If the size is 1 then there is sure to be a non-null .next.
         *Still, may as well be sure.
         */
        Iterator<ApplicationClientDescriptor> it = embeddedAppClients.iterator();
        if ( ! it.hasNext()) {
            throw new IllegalStateException(getLocalString(
                    "appclient.unexpectedEndOfEmbeddedClients",
                    "The application module seems to contain one app client but the iterator reported no more elements prematurely"));
        }

        result = embeddedAppClients.iterator().next();

        /*
         *If, in addition, the user specified a main class on the command
         *line, then use the user's class name as the main class name, rather
         *than the class specified by the Main-Class attribute in the
         *app client archive.  This allows the user to override the Main-Class
         *setting in the app client's manifest.
         */
        if (mainClassNameFromCommandLine != null) {
            result.setMainClassName(mainClassNameFromCommandLine);
        }
        return result;
    }
View Full Code Here

                        logger.getResourceBundle().getString("appclient.missingClient"),
                        new File(clientRA.getURI().getSchemeSpecificPart()).getAbsolutePath()));
            }
            AppClientArchivist facadeClientArchivist = getArchivist(habitat);
            MultiReadableArchive combinedRA = openCombinedReadableArchive(habitat, clientFacadeRA, clientRA);
            final ApplicationClientDescriptor facadeClientDescriptor = facadeClientArchivist.open(combinedRA);
            final String moduleID = Launchable.LaunchableUtil.moduleID(
                    groupFacadeURI, clientURI, facadeClientDescriptor);

            final Manifest clientMF = clientRA.getManifest();
            if (clientMF == null) {
View Full Code Here

                        }
                    }
                );
            archivist.setClassLoader(tempLoader);

            final ApplicationClientDescriptor acDesc = archivist.open(facadeRA, clientRA);
            archivist.setDescriptor(acDesc);
            return acDesc;

        }
View Full Code Here

     *actually reside.
     */
    protected void fixupWSDLEntries()
        throws URISyntaxException, MalformedURLException, IOException,
               AnnotationProcessorException {
        ApplicationClientDescriptor ac = getAppClient();
        URI uri = (new File(getAppClientRoot(appClientArchive, ac))).toURI();
        File moduleFile = new File(uri);
        for (Iterator itr = ac.getServiceReferenceDescriptors().iterator();
                    itr.hasNext();) {
            ServiceReferenceDescriptor serviceRef =
                    (ServiceReferenceDescriptor) itr.next();
            if (serviceRef.getWsdlFileUri()!=null) {
                // In case WebServiceRef does not specify wsdlLocation, we get
View Full Code Here

         * 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

        }
    }

    @Override
    protected ApplicationClientDescriptor createDescriptor() {
        return new ApplicationClientDescriptor();
    }
View Full Code Here

                        logger.getResourceBundle().getString("appclient.missingClient"),
                        new File(clientRA.getURI().getSchemeSpecificPart()).getAbsolutePath()));
            }
            AppClientArchivist facadeClientArchivist = getArchivist(habitat);
            MultiReadableArchive combinedRA = openCombinedReadableArchive(habitat, clientFacadeRA, clientRA);
            final ApplicationClientDescriptor facadeClientDescriptor = facadeClientArchivist.open(combinedRA);
            final String moduleID = Launchable.LaunchableUtil.moduleID(
                    groupFacadeURI, clientURI, facadeClientDescriptor);

            final Manifest clientMF = clientRA.getManifest();
            if (clientMF == null) {
View Full Code Here

                final ReadableArchive clientRA) throws IOException, SAXParseException {
            archivist.setAnnotationProcessingRequested(true);
            final ACCClassLoader tempLoader = new ACCClassLoader(loader.getURLs(), loader.getParent());
            archivist.setClassLoader(tempLoader);

            final ApplicationClientDescriptor acDesc = archivist.open(facadeRA, clientRA);
            archivist.setDescriptor(acDesc);
            return acDesc;

        }
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.