Package javax.enterprise.inject.spi

Examples of javax.enterprise.inject.spi.Extension


        final List<String> services = servicesAttachment.getServiceImplementations(Extension.class.getName());
        if (services == null) {
            return;
        }
        for (String service : services) {
            final Extension extension = loadExtension(service, index,  module.getClassLoader());
            if(extension == null) {
                continue;
            }
            Metadata<Extension> metadata = new MetadataImpl<Extension>(extension, deploymentUnit.getName());
            WeldLogger.DEPLOYMENT_LOGGER.debug("Loaded portable extension " + extension);
View Full Code Here


        final List<String> services = servicesAttachment.getServiceImplementations(Extension.class.getName());
        if (services == null) {
            return;
        }
        for (String service : services) {
            final Extension extension = loadExtension(service, index,  module.getClassLoader());
            if(extension == null) {
                continue;
            }
            Metadata<Extension> metadata = new MetadataImpl<Extension>(extension, deploymentUnit.getName());
            WeldLogger.DEPLOYMENT_LOGGER.debug("Loaded portable extension " + extension);
View Full Code Here

        List<Extension> extensionList = ServiceProvider.loadServices(Extension.class);
        Assert.assertEquals(extensionList.size(), 3);

        Iterator<Extension> iterator = extensionList.iterator();

        Extension extension;
        while (iterator.hasNext())
        {
            extension = iterator.next();
            Assert.assertTrue(extension instanceof ActivationExtension ||
                extension instanceof BeanManagerProvider ||
View Full Code Here

                ServiceProvider.loadServices(Extension.class, new SimpleServiceProviderContext());
        Assert.assertEquals(extensionList.size(), 3);

        Iterator<Extension> iterator = extensionList.iterator();

        Extension extension;
        while (iterator.hasNext())
        {
            extension = iterator.next();
            Assert.assertTrue(extension instanceof ActivationExtension ||
                extension instanceof BeanManagerProvider ||
View Full Code Here

        }.loadServiceImplementations();
        Assert.assertEquals(extensionList.size(), 3);

        Iterator<Extension> iterator = extensionList.iterator();

        Extension extension;
        while (iterator.hasNext())
        {
            extension = iterator.next();
            Assert.assertTrue(extension instanceof ActivationExtension ||
                extension instanceof BeanManagerProvider ||
View Full Code Here

        ServiceLoader<Extension> loader = ServiceLoader.load(Extension.class, WebBeansUtil.getCurrentClassLoader());
        Iterator<Extension> iterator = loader.iterator();
       
        while(iterator.hasNext())
        {
            Extension ext = iterator.next();
            try
            {
                addExtension(ext);
            }
            catch (Exception e)
View Full Code Here

        final List<String> services = servicesAttachment.getServiceImplementations(Extension.class.getName());
        if (services == null) {
            return;
        }
        for (String service : services) {
            final Extension extension = loadExtension(service, index,  module.getClassLoader());
            if(extension == null) {
                continue;
            }
            Metadata<Extension> metadata = new MetadataImpl<Extension>(extension, deploymentUnit.getName());
            log.debug("Loaded portable extension " + extension);
View Full Code Here

    }

    @Override
    protected void storeSyntheticAnnotatedType(BeanDeployment deployment, AnnotatedType<?> type, String id) {
        SlimAnnotatedType<?> annotatedType = transformer.getUnbackedAnnotatedType(type, getBeanManager().getId(), id);
        Extension extension = getReceiver();
        SlimAnnotatedTypeContext<?> annotatedTypeContext = SlimAnnotatedTypeContext.of(annotatedType, transformer, extension);

        ProcessAnnotatedTypeImpl<?> event = events.fireProcessAnnotatedType(getBeanManager(), annotatedTypeContext);
        if (event == null) {
            deployment.getBeanDeployer().getEnvironment().addAnnotatedType(annotatedTypeContext);
View Full Code Here

            return; // skip non weld deployments
        }

        final Module module = deploymentUnit.getAttachment(Attachments.MODULE);
        final DeploymentReflectionIndex index = deploymentUnit.getAttachment(Attachments.REFLECTION_INDEX);
        final Extension extension = loadExtension(CDIPortletContextExtension.class.getName(), index,  module.getClassLoader());

        Metadata<Extension> metadata = new MetadataImpl<Extension>(extension, deploymentUnit.getName());
        log.debug("Loaded portable extension " + extension);

        deploymentUnit.addToAttachmentList(WeldAttachments.PORTABLE_EXTENSIONS, metadata);
View Full Code Here

    {
        ServiceLoader<Extension> loader = ServiceLoader.load(Extension.class, WebBeansUtil.getCurrentClassLoader());
        Iterator<Extension> iterator = loader.iterator();
        while(iterator.hasNext())
        {
            Extension ext = iterator.next();
            if (!extensionClasses.contains(ext.getClass()))
            {
                extensionClasses.add(ext.getClass());
                try
                {
                    addExtension(ext);
                }
                catch (Exception e)
View Full Code Here

TOP

Related Classes of javax.enterprise.inject.spi.Extension

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.