
com.oneandone.cdi.weld1starter.CDI1DeploymentImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of weld1-starter Show documentation
Show all versions of weld1-starter Show documentation
Supports the starting of a weld 1 standalone engine using a version-independent configuration.
The newest version!
package com.oneandone.cdi.weld1starter;
import java.util.Arrays;
import java.util.Collection;
import javax.enterprise.inject.spi.Extension;
import org.jboss.weld.bootstrap.api.ServiceRegistry;
import org.jboss.weld.bootstrap.spi.BeanDeploymentArchive;
import org.jboss.weld.bootstrap.spi.Deployment;
import org.jboss.weld.bootstrap.spi.Metadata;
/**
* @author aschoerk
*/
public class CDI1DeploymentImpl implements Deployment {
private final BeanDeploymentArchive oneDeploymentArchive;
private final ServiceRegistry services;
private final Iterable> extensions;
public CDI1DeploymentImpl(final ServiceRegistry services, final BeanDeploymentArchive oneDeploymentArchive,
Iterable> extensions) {
this.services = services;
this.oneDeploymentArchive = oneDeploymentArchive;
this.extensions = extensions;
}
@Override
public Collection getBeanDeploymentArchives() {
return Arrays.asList(oneDeploymentArchive);
}
@Override
public BeanDeploymentArchive loadBeanDeploymentArchive(final Class> beanClass) {
System.out.println("Loading " + beanClass.getName());
return oneDeploymentArchive;
}
@Override
public ServiceRegistry getServices() {
return oneDeploymentArchive.getServices();
}
@Override
public Iterable> getExtensions() {
return extensions;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy