Examples of JndiName


Examples of org.jboss.as.deployment.naming.JndiName

        final ServiceName managedBeanServiceName = ManagedBeanService.SERVICE_NAME.append(deploymentContext.getName(), managedBeanName);
        final BatchServiceBuilder<?> serviceBuilder = batchBuilder.addService(managedBeanServiceName, managedBeanService);

        final ServiceName managedBeanContextServiceName = moduleContextServiceName.append(managedBeanName, "context");
        final JndiName managedBeanContextJndiName = moduleContext.getContextName().append(managedBeanName + "-context");

        // Process managed bean resources
        for (ResourceConfiguration resourceConfiguration : managedBeanConfiguration.getResourceConfigurations()) {
            final ResourceInjection<?> resourceInjection = processResource(deploymentContext, moduleContext, resourceConfiguration.getInjectedType(), resourceConfiguration, batchBuilder, serviceBuilder, managedBeanContextServiceName, managedBeanContextJndiName);
            if(resourceInjection != null) {
View Full Code Here

Examples of org.jboss.as.deployment.naming.JndiName

    private <T> ManagedBeanService<T> createManagedBeanService(final Class<T> beanClass, final ClassLoader classLoader, final ManagedBeanConfiguration managedBeanConfiguration, List<ResourceInjection<?>> resourceInjections, final List<ManagedBeanInterceptor<?>> interceptors) {
        return new ManagedBeanService<T>(new ManagedBeanContainer<T>(beanClass, classLoader, managedBeanConfiguration.getPostConstructMethods(), managedBeanConfiguration.getPreDestroyMethods(), resourceInjections, interceptors));
    }

    private <T> ResourceInjection<T> processResource(final DeploymentUnitContext deploymentContext, final ModuleContextConfig moduleContext, final Class<T> valueType, final ResourceConfiguration resourceConfiguration, final BatchBuilder batchBuilder, final BatchServiceBuilder<?> serviceBuilder, final ServiceName beanContextServiceName, final JndiName managedBeanContextJndiName) throws DeploymentUnitProcessingException {
        final JndiName localContextName = managedBeanContextJndiName.append(resourceConfiguration.getLocalContextName());
        final String targetContextName = resourceConfiguration.getTargetContextName();

        final NamingLookupValue<T> lookupValue = new NamingLookupValue<T>(localContextName);
        final ResourceInjection<T> resourceInjection = getResourceInjection(resourceConfiguration, lookupValue);

        // Now add a binder for the local context
        final ServiceName binderName = beanContextServiceName.append(localContextName.getLocalName());
        if(resourceInjection != null) {
            serviceBuilder.addDependency(binderName);
            serviceBuilder.addDependency(beanContextServiceName, Context.class, lookupValue.getContextInjector());
        }
View Full Code Here

Examples of org.jboss.as.naming.deployment.JndiName

        populate(existing, operation);
        return operation;
    }

    static String getContainerJNDIName(ModelNode container, String name) {
        JndiName jndiName = null ;
        if (container.hasDefined(ModelKeys.JNDI_NAME)) {
            // convert the JNDI name passed by the user
            jndiName = toJndiName(container.get(ModelKeys.JNDI_NAME).asString()) ;
        }
        else {
            // build the name from scratch as java:jboss/infinispan/<container name>
            jndiName = JndiName.of("java:jboss").append(InfinispanExtension.SUBSYSTEM_NAME).append(name) ;
        }
        return jndiName.getAbsoluteName();
    }
View Full Code Here

Examples of org.jboss.as.naming.deployment.JndiName

    public static JndiName parse(String value) {
        return value.startsWith("java:") ? JndiName.of(value) : createJndiName(DEFAULT_JNDI_NAMESPACE, value.startsWith("/") ? value.substring(1) : value);
    }

    public static JndiName createJndiName(String namespace, String... contexts) {
        JndiName name = JndiName.of(namespace);
        for (String context: contexts) {
            name = name.append(context);
        }
        return name;
    }
View Full Code Here

Examples of org.jboss.as.naming.deployment.JndiName

            builder.addDependency(ThreadsServices.executorName(executor), ScheduledExecutorService.class, injector);
        }
    }

    static ContextNames.BindInfo createCacheContainerBinding(String jndiName, String container) {
        JndiName name = (jndiName != null) ? JndiNameFactory.parse(jndiName) : JndiNameFactory.createJndiName(JndiNameFactory.DEFAULT_JNDI_NAMESPACE, InfinispanExtension.SUBSYSTEM_NAME, "container", container);
        return ContextNames.bindInfoFor(name.getAbsoluteName());
    }
View Full Code Here

Examples of org.jboss.as.naming.deployment.JndiName

    public static JndiName toJndiName(String value) {
        return value.startsWith("java:") ? JndiName.of(value) : JndiName.of(DEFAULT_JNDI_NAMESPACE).append(value.startsWith("/") ? value.substring(1) : value);
    }

    public static String createCacheJndiNameOrDefault(String jndiNameString, String containerName, String cacheName) {
        JndiName jndiName = null ;
        if (jndiNameString != null) {
           jndiName = InfinispanJndiName.toJndiName(jndiNameString) ;
        } else {
            jndiName = InfinispanJndiName.defaultCacheJndiName(containerName, cacheName);
        }
        return jndiName.getAbsoluteName();
    }
View Full Code Here

Examples of org.jboss.as.naming.deployment.JndiName

        }
        return jndiName.getAbsoluteName();
    }

    public static String createCacheContainerJndiNameOrDefault(String jndiNameString, String containerName) {
        JndiName jndiName = null ;
        if (jndiNameString != null) {
           jndiName = InfinispanJndiName.toJndiName(jndiNameString) ;
        } else {
            jndiName = InfinispanJndiName.defaultCacheContainerJndiName(containerName);
        }
        return jndiName.getAbsoluteName();
    }
View Full Code Here

Examples of org.jboss.as.naming.deployment.JndiName

    public static JndiName toJndiName(String value) {
        return value.startsWith("java:") ? JndiName.of(value) : JndiName.of(DEFAULT_JNDI_NAMESPACE).append(value.startsWith("/") ? value.substring(1) : value);
    }

    public static String createCacheJndiName(String jndiNameString, String containerName, String cacheName) {
        JndiName jndiName = (jndiNameString != null) ? InfinispanJndiName.toJndiName(jndiNameString) : InfinispanJndiName.defaultCacheJndiName(containerName, cacheName);
        return jndiName.getAbsoluteName();
    }
View Full Code Here

Examples of org.jboss.as.naming.deployment.JndiName

        JndiName jndiName = (jndiNameString != null) ? InfinispanJndiName.toJndiName(jndiNameString) : InfinispanJndiName.defaultCacheJndiName(containerName, cacheName);
        return jndiName.getAbsoluteName();
    }

    public static String createCacheContainerJndiName(String jndiNameString, String containerName) {
        JndiName jndiName = (jndiNameString != null) ? InfinispanJndiName.toJndiName(jndiNameString) : InfinispanJndiName.defaultCacheContainerJndiName(containerName);
        return jndiName.getAbsoluteName();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.