Skip to content

Commit

Permalink
[WFLY-20005] Use ModuleIdentifierUtil.canonicalModuleIdentifier with …
Browse files Browse the repository at this point in the history
…Hibernate Search (adaptor) module loading

Signed-off-by: Scott Marlow <[email protected]>
  • Loading branch information
scottmarlow committed Dec 11, 2024
1 parent 00e6180 commit 2bcf75b
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import jakarta.enterprise.inject.spi.BeanManager;
import jakarta.persistence.spi.PersistenceProvider;

import org.jboss.as.controller.ModuleIdentifierUtil;
import org.jboss.as.jpa.messages.JpaLogger;
import org.jboss.as.jpa.transaction.JtaManagerImpl;
import org.jboss.jandex.Index;
Expand Down Expand Up @@ -95,7 +96,7 @@ public void markPersistenceUnitAvailable(Object wrapperBeanManagerLifeCycle) {
* @return the persistence provider adaptor for the provider class
* @throws ModuleLoadException
*/
public static PersistenceProviderAdaptor loadPersistenceAdapterModule(final String adapterModule, final Platform platform, JtaManagerImpl manager) throws
public static PersistenceProviderAdaptor loadPersistenceAdapterModule(String adapterModule, final Platform platform, JtaManagerImpl manager) throws
ModuleLoadException {
final ModuleLoader moduleLoader = Module.getBootModuleLoader();

Expand All @@ -104,7 +105,7 @@ public static PersistenceProviderAdaptor loadPersistenceAdapterModule(final Stri
}

PersistenceProviderAdaptor persistenceProviderAdaptor=null;

adapterModule = ModuleIdentifierUtil.canonicalModuleIdentifier(adapterModule);
Module module = moduleLoader.loadModule(adapterModule);
final ServiceLoader<PersistenceProviderAdaptor> serviceLoader =
module.loadService(PersistenceProviderAdaptor.class);
Expand Down Expand Up @@ -171,7 +172,7 @@ public static List<PersistenceProviderIntegratorAdaptor> loadPersistenceProvider
final ModuleLoader moduleLoader = Module.getBootModuleLoader();

List<PersistenceProviderIntegratorAdaptor> persistenceProviderAdaptors = new ArrayList<>();

adapterModule = ModuleIdentifierUtil.canonicalModuleIdentifier(adapterModule);
Module module = moduleLoader.loadModule(adapterModule);
final ServiceLoader<PersistenceProviderIntegratorAdaptor> serviceLoader =
module.loadService(PersistenceProviderIntegratorAdaptor.class);
Expand Down

0 comments on commit 2bcf75b

Please sign in to comment.