/** * Adds a service to all bean deployment archives in the module * @param clazz The service type * @param service The service * @param <S> The service type */ public synchronized <S extends Service> void addService(Class<S> clazz, S service) { for (BeanDeploymentArchiveImpl bda : beanDeploymentArchives) { bda.getServices().add(clazz,service); } }
public synchronized <T extends Service> void addWeldService(Class<T> type, T service) { serviceRegistry.add(type, service); for (BeanDeploymentArchiveImpl bda : additionalBeanDeploymentArchivesByClassloader.values()) { bda.getServices().add(type, service); } }
WeldLogger.DEPLOYMENT_LOGGER.beanArchiveDiscovered(newBda); newBda.addBeanClass(beanClass); ServiceRegistry newBdaServices = newBda.getServices(); for (Entry<Class<? extends Service>, Service> entry : serviceRegistry.entrySet()) { newBda.getServices().add(EEModuleDescriptor.class, eeModuleDescriptors.get(module.getIdentifier()));
bda.getServices().add(moduleService.getKey(), Reflections.cast(moduleService.getValue()));
beanDeploymentArchives.add(additional); for (Entry<Class<? extends Service>, Service> entry : rootModuleServices.entrySet()) { additional.getServices().add(entry.getKey(), Reflections.cast(entry.getValue()));
/** * Adds a service to all bean deployment archives in the module * @param clazz The service type * @param service The service * @param <S> The service type */ public synchronized <S extends Service> void addService(Class<S> clazz, S service) { for (BeanDeploymentArchiveImpl bda : beanDeploymentArchives) { bda.getServices().add(clazz,service); } }
@Override public Class<T> getInterface() { return (Class<T>) beanDeploymentArchive.getServices().get(ResourceLoader.class).classForName(className); } }
/** * Adds a {@link Service} to the deployment. This method must not be called after the container has started */ public <T extends org.jboss.weld.bootstrap.api.Service> void addWeldService(Class<T> type, T service) { deployment.getServices().add(type, service); deployment.getAdditionalBeanDeploymentArchive().getServices().add(type, service); }
final Set<BusinessInterfaceDescriptor<?>> localInterfaces = new HashSet<BusinessInterfaceDescriptor<?>>(); final Set<BusinessInterfaceDescriptor<?>> remoteInterfaces = new HashSet<BusinessInterfaceDescriptor<?>>(); final ResourceLoader loader = beanDeploymentArchive.getServices().get(ResourceLoader.class);