Issue #2983 JmxConfiguration JPMS ready

Signed-off-by: Greg Wilkins <gregw@webtide.com>
This commit is contained in:
Greg Wilkins 2018-10-16 12:07:46 +11:00
parent ff81168b57
commit 458f402cf0
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