Package org.apache.deltaspike.example.optional

Examples of org.apache.deltaspike.example.optional.OptionalService


        defaultEchoService = BeanProvider.getContextualReference("defaultEchoService", false, EchoService.class);

        LOG.info(defaultEchoService.echo("Hello CDI bean resolved by name!"));

        OptionalService optionalService = BeanProvider.getContextualReference(OptionalService.class, true);

        if (optionalService == null)
        {
            LOG.info("No (optional) implementation found for " + OptionalService.class.getName());
        }
        else
        {
            LOG.severe("Unexpected implementation found: " + optionalService.getClass().getName());
        }

        contextControl.stopContext(ApplicationScoped.class);
        cdiContainer.shutdown();
View Full Code Here

TOP

Related Classes of org.apache.deltaspike.example.optional.OptionalService

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.