diff --git a/pojo/src/main/java/org/jboss/as/pojo/KernelDeploymentModuleProcessor.java b/pojo/src/main/java/org/jboss/as/pojo/KernelDeploymentModuleProcessor.java index ec1b60002d7b..f12c97c6c2b8 100644 --- a/pojo/src/main/java/org/jboss/as/pojo/KernelDeploymentModuleProcessor.java +++ b/pojo/src/main/java/org/jboss/as/pojo/KernelDeploymentModuleProcessor.java @@ -15,7 +15,6 @@ import org.jboss.as.server.deployment.module.ModuleDependency; import org.jboss.as.server.deployment.module.ModuleSpecification; import org.jboss.modules.Module; -import org.jboss.modules.ModuleIdentifier; import org.jboss.modules.ModuleLoader; import org.jboss.modules.filter.PathFilter; import org.jboss.modules.filter.PathFilters; @@ -29,7 +28,7 @@ */ public class KernelDeploymentModuleProcessor implements DeploymentUnitProcessor { - private ModuleIdentifier POJO_MODULE = ModuleIdentifier.create("org.jboss.as.pojo"); + private final String POJO_MODULE = "org.jboss.as.pojo"; /** * Add POJO module if we have any bean factories. diff --git a/pojo/src/main/java/org/jboss/as/pojo/descriptor/ConfigVisitor.java b/pojo/src/main/java/org/jboss/as/pojo/descriptor/ConfigVisitor.java index e7a5b9c55be8..9077bed2ebaa 100644 --- a/pojo/src/main/java/org/jboss/as/pojo/descriptor/ConfigVisitor.java +++ b/pojo/src/main/java/org/jboss/as/pojo/descriptor/ConfigVisitor.java @@ -9,7 +9,6 @@ import org.jboss.as.pojo.service.BeanInfo; import org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex; import org.jboss.modules.Module; -import org.jboss.modules.ModuleIdentifier; import org.jboss.msc.inject.Injector; import org.jboss.msc.service.ServiceName; @@ -55,7 +54,7 @@ public interface ConfigVisitor { * @param identifier the module identifier * @return loaded module */ - Module loadModule(ModuleIdentifier identifier); + Module loadModule(String identifier); /** * Get reflection index. diff --git a/pojo/src/main/java/org/jboss/as/pojo/descriptor/DefaultConfigVisitor.java b/pojo/src/main/java/org/jboss/as/pojo/descriptor/DefaultConfigVisitor.java index c1a75c3f6800..e5ecfd2ebf4b 100644 --- a/pojo/src/main/java/org/jboss/as/pojo/descriptor/DefaultConfigVisitor.java +++ b/pojo/src/main/java/org/jboss/as/pojo/descriptor/DefaultConfigVisitor.java @@ -9,7 +9,6 @@ import org.jboss.as.pojo.service.BeanInfo; import org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex; import org.jboss.modules.Module; -import org.jboss.modules.ModuleIdentifier; import org.jboss.msc.inject.Injector; import org.jboss.msc.service.ServiceBuilder; import org.jboss.msc.service.ServiceName; @@ -50,7 +49,7 @@ public Module getModule() { } @Override - public Module loadModule(ModuleIdentifier identifier) { + public Module loadModule(String identifier) { try { return module.getModule(identifier); } catch (Throwable t) { diff --git a/pojo/src/main/java/org/jboss/as/pojo/descriptor/KernelDeploymentXmlDescriptorParser.java b/pojo/src/main/java/org/jboss/as/pojo/descriptor/KernelDeploymentXmlDescriptorParser.java index f1bb02ea4ee2..4f4ba2f20b21 100644 --- a/pojo/src/main/java/org/jboss/as/pojo/descriptor/KernelDeploymentXmlDescriptorParser.java +++ b/pojo/src/main/java/org/jboss/as/pojo/descriptor/KernelDeploymentXmlDescriptorParser.java @@ -17,6 +17,7 @@ import javax.xml.stream.XMLStreamConstants; import javax.xml.stream.XMLStreamException; +import org.jboss.as.controller.ModuleIdentifierUtil; import org.jboss.as.pojo.BeanState; import org.jboss.as.pojo.ParseResult; import org.jboss.as.pojo.logging.PojoLogger; @@ -362,7 +363,7 @@ private ModuleConfig parseModuleConfig(final XMLExtendedStreamReader reader) thr switch (attribute) { case NAME: - moduleConfig.setModuleName(attributeValue); + moduleConfig.setModuleName(ModuleIdentifierUtil.canonicalModuleIdentifier(attributeValue)); break; default: throw unexpectedAttribute(reader, i); diff --git a/pojo/src/main/java/org/jboss/as/pojo/descriptor/ModuleConfig.java b/pojo/src/main/java/org/jboss/as/pojo/descriptor/ModuleConfig.java index 9adce2026b1f..0e34d3310ba1 100644 --- a/pojo/src/main/java/org/jboss/as/pojo/descriptor/ModuleConfig.java +++ b/pojo/src/main/java/org/jboss/as/pojo/descriptor/ModuleConfig.java @@ -32,7 +32,7 @@ public void visit(ConfigVisitor visitor) { ServiceName serviceName = ServiceModuleLoader.moduleServiceName(identifier); visitor.addDependency(serviceName, getInjectedModule()); } else { - Module dm = visitor.loadModule(identifier); + Module dm = visitor.loadModule(moduleName); getInjectedModule().setValue(() -> dm); } } else {