Package com.sun.enterprise.deployment

Examples of com.sun.enterprise.deployment.ApplicationClientDescriptor


     *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


        t.setProperty("client.facade.jar.path", clientFacadeJARPath());

        t.setProperty("client.security", "<all-permissions/>");

        final ApplicationClientDescriptor acDesc = dHelper.appClientDesc();
        /*
         * Set the JNLP information title to the app client module's display name,
         * if one is present.
         */
        String displayName = acDesc.getDisplayName();
        String jnlpInformationTitle =
                (displayName != null && displayName.length() > 0) ?
                    displayName : localStrings.get("jws.information.title.prefix") + " " + dHelper.appName();
        t.setProperty("appclient.main.information.title", jnlpInformationTitle);
        t.setProperty("appclient.client.information.title", jnlpInformationTitle);

        /*
         * Set the one-line description the same as the title for now.
         */
        t.setProperty("appclient.main.information.description.one-line", jnlpInformationTitle);
        t.setProperty("appclient.client.information.description.one-line", jnlpInformationTitle);

        /*
         *Set the short description to the description from the descriptor, if any.
         */
        String description = acDesc.getDescription();
        String jnlpInformationShortDescription =
                (description != null && description.length() > 0) ?
                    description : jnlpInformationTitle;
        t.setProperty("appclient.main.information.description.short", jnlpInformationShortDescription);
        t.setProperty("appclient.client.information.description.short", jnlpInformationShortDescription);
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.getByContract(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 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

    @Override
    public AppClientServerApplication load(AppClientContainerStarter containerStarter, DeploymentContext dc) {
        // if the populated DOL object does not container appclient
        // descriptor, this is an indication that appclient deployer
        // should not handle this module
        ApplicationClientDescriptor appclientDesc =
            dc.getModuleMetaData(ApplicationClientDescriptor.class);
        if (appclientDesc == null) {
            return null;
        }
        appclientDesc.setClassLoader(dc.getClassLoader());
        AppClientDeployerHelper helper = null;
        try {
            helper = getSavedHelperOrCreateHelper(dc);
        } catch (IOException ex) {
            throw new RuntimeException(ex);
View Full Code Here

        }
        return h;
    }

    private String moduleURI(final DeploymentContext dc) {
        ApplicationClientDescriptor acd = dc.getModuleMetaData(ApplicationClientDescriptor.class);
        return acd.getModuleDescriptor().getArchiveUri();
    }
View Full Code Here

            for (ModuleDescriptor<BundleDescriptor> md : app.getModules()) {
                if ( ! md.getModuleType().equals(XModuleType.CAR)) {
                    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

    }

    @Override
    protected void massageDescriptor()
            throws IOException, AnnotationProcessorException {
        ApplicationClientDescriptor appClient = getDescriptor();
        appClient.setMainClassName(classFileFromCommandLine);
        appClient.getModuleDescriptor().setStandalone(true);
        FileArchive fa = new FileArchive();
        fa.open(new File(classFileFromCommandLine).toURI());
        new AppClientArchivist().processAnnotations(appClient, fa);
    }
View Full Code Here

            final DeploymentContext dc,
            final AppClientArchivist archivist,
            final ClassLoader gfClientModuleLoader,
            final ServiceLocator habitat,
            final ASJarSigner jarSigner) throws IOException {
        ApplicationClientDescriptor bundleDesc = dc.getModuleMetaData(ApplicationClientDescriptor.class);
        Application application = bundleDesc.getApplication();
        boolean insideEar = ! application.isVirtual();

        return (insideEar ? new NestedAppClientDeployerHelper(
                                    dc,
                                    bundleDesc,
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.