Merge pull request #2984 from eclipse/jetty-10.0.x-2983-JmxConfiguration

Issue #2983 JmxConfiguration JPMS ready
This commit is contained in:
Simone Bordet 2018-10-16 10:23:14 +02:00 committed by GitHub
commit 3c7ad4440d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 6 deletions

View File

@ -1,2 +0,0 @@
# Declared in the jmx package, but defined in the webapp package (as it depends on the Configuration interface)
org.eclipse.jetty.webapp.JmxConfiguration

View File

@ -73,11 +73,22 @@ public class Configurations extends AbstractList<Configuration>
if (__known.isEmpty())
{
ServiceLoader<Configuration> configs = ServiceLoader.load(Configuration.class);
for (Configuration configuration : configs)
for (Iterator<Configuration> i = configs.iterator(); i.hasNext(); )
{
try
{
Configuration configuration = i.next();
__known.add(configuration);
__knownByClassName.add(configuration.getClass().getName());
}
catch (Throwable e)
{
LOG.info("Configuration unavailable: "+e.getMessage());
if (LOG.isDebugEnabled())
LOG.debug(e);
}
}
sort(__known);
if (LOG.isDebugEnabled())
{

View File

@ -18,6 +18,8 @@
package org.eclipse.jetty.webapp;
import org.eclipse.jetty.jmx.ObjectMBean;
import java.util.ServiceLoader;
/**
@ -36,6 +38,6 @@ public class JmxConfiguration extends AbstractConfiguration
public JmxConfiguration()
{
addDependents(WebXmlConfiguration.class, MetaInfConfiguration.class, WebInfConfiguration.class);
protectAndExpose("org.eclipse.jetty.jmx.");
protectAndExpose(ObjectMBean.class.getPackage().getName()+".");
}
}

View File

@ -4,3 +4,4 @@ org.eclipse.jetty.webapp.MetaInfConfiguration
org.eclipse.jetty.webapp.WebInfConfiguration
org.eclipse.jetty.webapp.WebXmlConfiguration
org.eclipse.jetty.webapp.WebAppConfiguration
org.eclipse.jetty.webapp.JmxConfiguration