use of org.apache.openejb.assembler.classic.ContainerInfo in project tomee by apache.
the class ContainerUtils method getContainerInfos.
public static List<ContainerInfo> getContainerInfos(final AppModule module, final ConfigurationFactory configFactory) throws OpenEJBException {
final List<ContainerInfo> containerInfos = new ArrayList<>();
if (module.getContainers().isEmpty()) {
return containerInfos;
}
final String prefix = module.getModuleId() + "/";
for (final Container container : module.getContainers()) {
if (container.getId() == null) {
throw new IllegalStateException("a container can't get a null id: " + container.getType() + " from " + module.getModuleId());
}
if (!container.getId().startsWith(prefix)) {
container.setId(prefix + container.getId());
}
final ContainerInfo containerInfo = configFactory.createContainerInfo(container);
containerInfo.originAppName = module.getModuleId();
final Object applicationWideProperty = containerInfo.properties.remove("ApplicationWide");
if (applicationWideProperty != null) {
containerInfo.applicationWide = Boolean.parseBoolean(applicationWideProperty.toString().trim());
}
containerInfos.add(containerInfo);
}
return containerInfos;
}
use of org.apache.openejb.assembler.classic.ContainerInfo in project tomee by apache.
the class ServerContext method createContainer.
public void createContainer(final Container service) throws OpenEJBException {
final ContainerInfo serviceInfo = factory.configureService(service, ContainerInfo.class);
assembler.createContainer(serviceInfo);
}
Aggregations