aClass) {
+ return Globals.getDefaultHabitat().getService(aClass);
+ }
+}
diff --git a/appserver/admingui/core/src/main/java/org/glassfish/admingui/cdi/SecurityProducer.java b/appserver/admingui/core/src/main/java/org/glassfish/admingui/cdi/SecurityProducer.java
new file mode 100644
index 00000000000..f093b9e9373
--- /dev/null
+++ b/appserver/admingui/core/src/main/java/org/glassfish/admingui/cdi/SecurityProducer.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2024 Contributors to the Eclipse Foundation
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+package org.glassfish.admingui.cdi;
+
+import jakarta.enterprise.context.ApplicationScoped;
+import jakarta.enterprise.inject.Produces;
+import jakarta.security.enterprise.SecurityContext;
+import java.security.Principal;
+import java.util.Set;
+import javax.security.auth.Subject;
+
+@ApplicationScoped
+public class SecurityProducer {
+
+ @Produces
+ Subject getSubject(SecurityContext securityContext) {
+ return new Subject(true, securityContext.getPrincipalsByType(Principal.class), Set.of(), Set.of());
+ }
+
+}
diff --git a/appserver/admingui/plugin-service/src/main/java/org/glassfish/admingui/plugin/ConsolePluginService.java b/appserver/admingui/plugin-service/src/main/java/org/glassfish/admingui/plugin/ConsolePluginService.java
index bc417a968ed..23c6996c85d 100644
--- a/appserver/admingui/plugin-service/src/main/java/org/glassfish/admingui/plugin/ConsolePluginService.java
+++ b/appserver/admingui/plugin-service/src/main/java/org/glassfish/admingui/plugin/ConsolePluginService.java
@@ -44,6 +44,7 @@
import org.glassfish.admingui.connector.ConsoleConfig;
import jakarta.inject.Inject;
+import java.util.Iterator;
/**
*
@@ -80,24 +81,39 @@ protected synchronized void init() {
if ((providers != null) && (providers.iterator().hasNext())) {
// Get our parser...
ConfigParser parser = new ConfigParser(habitat);
- URL url = null;
String id = null;
+ Map configUrls = new HashMap<>();
+
// Loop through the configs and add them all
for (ConsoleProvider provider : providers) {
// Read the contents from the URL
- url = provider.getConfiguration();
- if (url == null) {
- url = provider.getClass().getClassLoader().getResource(
- ConsoleProvider.DEFAULT_CONFIG_FILENAME);
+ URL url = provider.getConfiguration();
+ Iterator urlsIterator;
+ if (url != null) {
+ urlsIterator = List.of(url).iterator();
+ } else {
+ try {
+ urlsIterator = provider.getClass().getClassLoader().getResources(
+ ConsoleProvider.DEFAULT_CONFIG_FILENAME).asIterator();
+ } catch (IOException ex) {
+ throw new RuntimeException(ex);
+ }
+ if (!urlsIterator.hasNext()) {
+ logger.log(Level.INFO, "Unable to find "
+ + ConsoleProvider.DEFAULT_CONFIG_FILENAME
+ + " file for provider '"
+ + provider.getClass().getName() + "'");
+ continue;
+ }
}
- if (url == null) {
- logger.log(Level.INFO, "Unable to find "
- + ConsoleProvider.DEFAULT_CONFIG_FILENAME
- + " file for provider '"
- + provider.getClass().getName() + "'");
- continue;
+ while (urlsIterator.hasNext()) {
+ configUrls.put(urlsIterator.next(), provider.getClass().getClassLoader());
}
+ }
+ for (Map.Entry entry : configUrls.entrySet()) {
+ URL url = entry.getKey();
+ ClassLoader classLoader = entry.getValue();
//System.out.println("Provider *"+provider+"* : url=*"+url+"*");
DomDocument doc = parser.parse(url);
@@ -107,8 +123,8 @@ protected synchronized void init() {
// Save the ClassLoader for later
//System.out.println("Storing: " + config.getId() + " : " + provider.getClass().getClassLoader());
id = config.getId();
- moduleClassLoaderMap.put(id, provider.getClass().getClassLoader());
- classLoaderModuleMap.put(provider.getClass().getClassLoader(), id);
+ moduleClassLoaderMap.put(id, classLoader);
+ classLoaderModuleMap.put(classLoader, id);
// Add the new IntegrationPoints
addIntegrationPoints(config.getIntegrationPoints(), id);
diff --git a/appserver/admingui/pom.xml b/appserver/admingui/pom.xml
index 9187551c8a5..c88a61c33ec 100644
--- a/appserver/admingui/pom.xml
+++ b/appserver/admingui/pom.xml
@@ -86,6 +86,7 @@
core
concurrent
cluster
+ commandrecorder
community-theme
web
gf-admingui-connector
diff --git a/appserver/admingui/war/pom.xml b/appserver/admingui/war/pom.xml
index 50c949a030b..46cdf00521e 100644
--- a/appserver/admingui/war/pom.xml
+++ b/appserver/admingui/war/pom.xml
@@ -54,6 +54,17 @@