Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-19983 Remove all non-breaking uses of ModuleIdentifier
  3. WFLY-20005

Persistence/JPA subsystem should remove non-breaking use of ModuleIdentifier

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Done
    • Icon: Major Major
    • 35.0.0.Final
    • None
    • JPA / Hibernate
    • None

      The Persistence/JPA subsystem only has a few ModuleIdentifier references:

      subsystem/src/main/java/org/jboss/as/jpa/messages/JpaLogger.java
      subsystem/src/main/java/org/jboss/as/jpa/processor/HibernateSearchProcessor.java
      subsystem/src/main/java/org/jboss/as/jpa/processor/JPADependencyProcessor.java
      subsystem/src/main/java/org/jboss/as/jpa/processor/PersistenceProviderAdaptorLoader.java

       

      I think that changes might look something like:

      diff --git a/jpa/subsystem/src/main/java/org/jboss/as/jpa/persistenceprovider/PersistenceProviderLoader.java b/jpa/subsystem/src/main/java/org/jboss/as/jpa/persistenceprovider/PersistenceProviderLoader
      .java
      
      index 12aec5e823..1c83c01a89 100644
      
      --- a/jpa/subsystem/src/main/java/org/jboss/as/jpa/persistenceprovider/PersistenceProviderLoader.java
      
      +++ b/jpa/subsystem/src/main/java/org/jboss/as/jpa/persistenceprovider/PersistenceProviderLoader.java
      
      @@ -13,7 +13,6 @@ import jakarta.persistence.spi.PersistenceProvider;
      
        
       import org.jboss.as.jpa.config.Configuration;
      
       import org.jboss.modules.Module;
      
      -import org.jboss.modules.ModuleIdentifier;
      
       import org.jboss.modules.ModuleLoadException;
      
       import org.jboss.modules.ModuleLoader;
      
        
      @@ -45,7 +44,7 @@ public class PersistenceProviderLoader {
      
            */
      
           public static List<PersistenceProvider> loadProviderModuleByName(String moduleName) throws ModuleLoadException {
      
               final ModuleLoader moduleLoader = Module.getBootModuleLoader();
      
      -        Module module = moduleLoader.loadModule(ModuleIdentifier.fromString(moduleName));
      
      +        Module module = moduleLoader.loadModule(moduleName);
      
               final ServiceLoader<PersistenceProvider> serviceLoader =
      
                   module.loadService(PersistenceProvider.class);
      
               List<PersistenceProvider> result = new ArrayList<>();
       

              smarlow1@redhat.com Scott Marlow
              smarlow1@redhat.com Scott Marlow
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: