You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by sv...@apache.org on 2014/03/21 16:48:15 UTC

[2/3] git commit: use proxies for mbeans, so application is set on thread automatically

use proxies for mbeans, so application is set on thread automatically

Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/fea2b8e4
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/fea2b8e4
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/fea2b8e4

Branch: refs/heads/master
Commit: fea2b8e4e0feb6a7374bcfe6de2da5d1a2feba20
Parents: 329b945
Author: svenmeier <sv...@meiers.net>
Authored: Fri Mar 21 16:39:29 2014 +0100
Committer: svenmeier <sv...@meiers.net>
Committed: Fri Mar 21 16:39:29 2014 +0100

----------------------------------------------------------------------
 wicket-jmx/pom.xml                              |   8 +
 .../java/org/apache/wicket/jmx/Application.java | 113 ------------
 .../apache/wicket/jmx/ApplicationSettings.java  | 101 -----------
 .../org/apache/wicket/jmx/DebugSettings.java    | 164 ------------------
 .../java/org/apache/wicket/jmx/Initializer.java | 111 +++++++++---
 .../org/apache/wicket/jmx/MarkupSettings.java   | 128 --------------
 .../apache/wicket/jmx/MarkupSettingsMBean.java  |   2 +
 .../org/apache/wicket/jmx/PageSettings.java     |  56 ------
 .../apache/wicket/jmx/RequestCycleSettings.java | 125 --------------
 .../org/apache/wicket/jmx/RequestLogger.java    | 166 ------------------
 .../org/apache/wicket/jmx/ResourceSettings.java | 173 -------------------
 .../org/apache/wicket/jmx/SecuritySettings.java |  65 -------
 .../org/apache/wicket/jmx/SessionSettings.java  |  55 ------
 .../org/apache/wicket/jmx/StoreSettings.java    |  68 --------
 .../java/org/apache/wicket/jmx/Stringz.java     |  25 ---
 .../apache/wicket/jmx/wrapper/Application.java  | 104 +++++++++++
 .../wicket/jmx/wrapper/ApplicationSettings.java | 103 +++++++++++
 .../wicket/jmx/wrapper/DebugSettings.java       | 167 ++++++++++++++++++
 .../wicket/jmx/wrapper/MarkupSettings.java      | 131 ++++++++++++++
 .../apache/wicket/jmx/wrapper/PageSettings.java |  59 +++++++
 .../jmx/wrapper/RequestCycleSettings.java       | 127 ++++++++++++++
 .../wicket/jmx/wrapper/RequestLogger.java       | 168 ++++++++++++++++++
 .../wicket/jmx/wrapper/ResourceSettings.java    | 165 ++++++++++++++++++
 .../wicket/jmx/wrapper/SecuritySettings.java    |  68 ++++++++
 .../wicket/jmx/wrapper/SessionSettings.java     |  58 +++++++
 .../wicket/jmx/wrapper/StoreSettings.java       |  69 ++++++++
 .../org/apache/wicket/jmx/wrapper/Stringz.java  |  25 +++
 27 files changed, 1340 insertions(+), 1264 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/pom.xml
----------------------------------------------------------------------
diff --git a/wicket-jmx/pom.xml b/wicket-jmx/pom.xml
index 9bc5a08..c58cb06 100644
--- a/wicket-jmx/pom.xml
+++ b/wicket-jmx/pom.xml
@@ -32,6 +32,14 @@
 			<groupId>org.apache.wicket</groupId>
 			<artifactId>wicket-core</artifactId>
 		</dependency>
+		<dependency>
+			<groupId>cglib</groupId>
+			<artifactId>cglib</artifactId>
+		</dependency>
+<!-- 	<dependency>
+			<groupId>org.ow2.asm</groupId>
+			<artifactId>asm-util</artifactId>
+		</dependency> -->
 	</dependencies>
 	<build>
 		<pluginManagement>

http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/Application.java
----------------------------------------------------------------------
diff --git a/wicket-jmx/src/main/java/org/apache/wicket/jmx/Application.java b/wicket-jmx/src/main/java/org/apache/wicket/jmx/Application.java
deleted file mode 100644
index 5eaa003..0000000
--- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/Application.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.wicket.jmx;
-
-import java.io.IOException;
-
-import org.apache.wicket.ThreadContext;
-
-/**
- * Exposes Application related functionality for JMX.
- * 
- * @author eelcohillenius
- */
-public class Application implements ApplicationMBean
-{
-	private final org.apache.wicket.Application application;
-
-	/**
-	 * Create.
-	 * 
-	 * @param application
-	 */
-	public Application(final org.apache.wicket.Application application)
-	{
-		this.application = application;
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.ApplicationMBean#clearMarkupCache()
-	 */
-	@Override
-	public void clearMarkupCache() throws IOException
-	{
-		application.getMarkupSettings().getMarkupFactory().getMarkupCache().clear();
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.ApplicationMBean#getApplicationClass()
-	 */
-	@Override
-	public String getApplicationClass() throws IOException
-	{
-		return application.getClass().getName();
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.ApplicationMBean#getConfigurationType()
-	 */
-	@Override
-	public String getConfigurationType()
-	{
-		return application.getConfigurationType().name();
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.ApplicationMBean#getHomePageClass()
-	 */
-	@Override
-	public String getHomePageClass() throws IOException
-	{
-		return application.getHomePage().getName();
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.ApplicationMBean#getMarkupCacheSize()
-	 */
-	@Override
-	public int getMarkupCacheSize() throws IOException
-	{
-		ThreadContext.setApplication(application);
-		
-		try
-		{
-			return application.getMarkupSettings().getMarkupFactory().getMarkupCache().size();
-		}
-		finally
-		{
-			ThreadContext.detach();
-		}
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.ApplicationMBean#getWicketVersion()
-	 */
-	@Override
-	public String getWicketVersion() throws IOException
-	{
-		return application.getFrameworkSettings().getVersion();
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.ApplicationMBean#clearLocalizerCache()
-	 */
-	@Override
-	public void clearLocalizerCache() throws IOException
-	{
-		application.getResourceSettings().getLocalizer().clearCache();
-	}
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/ApplicationSettings.java
----------------------------------------------------------------------
diff --git a/wicket-jmx/src/main/java/org/apache/wicket/jmx/ApplicationSettings.java b/wicket-jmx/src/main/java/org/apache/wicket/jmx/ApplicationSettings.java
deleted file mode 100644
index 52c8e0b..0000000
--- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/ApplicationSettings.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.wicket.jmx;
-
-import org.apache.wicket.util.lang.Bytes;
-import org.apache.wicket.util.lang.Classes;
-
-/**
- * Exposes Application related functionality for JMX.
- * 
- * @author eelcohillenius
- */
-public class ApplicationSettings implements ApplicationSettingsMBean
-{
-	private final org.apache.wicket.Application application;
-
-	/**
-	 * Create.
-	 * 
-	 * @param application
-	 */
-	public ApplicationSettings(final org.apache.wicket.Application application)
-	{
-		this.application = application;
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.ApplicationSettingsMBean#getAccessDeniedPage()
-	 */
-	@Override
-	public String getAccessDeniedPage()
-	{
-		return Classes.name(application.getApplicationSettings().getAccessDeniedPage());
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.ApplicationSettingsMBean#getClassResolver()
-	 */
-	@Override
-	public String getClassResolver()
-	{
-		return Stringz.className(application.getApplicationSettings().getClassResolver());
-	}
-
-	@Override
-	public String getDefaultMaximumUploadSize()
-	{
-		return application.getApplicationSettings().getDefaultMaximumUploadSize().toString();
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.ApplicationSettingsMBean#getInternalErrorPage()
-	 */
-	@Override
-	public String getInternalErrorPage()
-	{
-		return Classes.name(application.getApplicationSettings().getInternalErrorPage());
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.ApplicationSettingsMBean#getPageExpiredErrorPage()
-	 */
-	@Override
-	public String getPageExpiredErrorPage()
-	{
-		return Classes.name(application.getApplicationSettings().getPageExpiredErrorPage());
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.ApplicationSettingsMBean#getUnexpectedExceptionDisplay()
-	 */
-	@Override
-	public String getUnexpectedExceptionDisplay()
-	{
-		return application.getExceptionSettings().getUnexpectedExceptionDisplay().toString();
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.ApplicationSettingsMBean#setDefaultMaximumUploadSize(java.lang.String)
-	 */
-	@Override
-	public void setDefaultMaximumUploadSize(final String defaultUploadSize)
-	{
-		application.getApplicationSettings().setDefaultMaximumUploadSize(
-			Bytes.valueOf(defaultUploadSize));
-	}
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/DebugSettings.java
----------------------------------------------------------------------
diff --git a/wicket-jmx/src/main/java/org/apache/wicket/jmx/DebugSettings.java b/wicket-jmx/src/main/java/org/apache/wicket/jmx/DebugSettings.java
deleted file mode 100644
index 0055dcf..0000000
--- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/DebugSettings.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.wicket.jmx;
-
-/**
- * Exposes Application related functionality for JMX.
- * 
- * @author eelcohillenius
- */
-public class DebugSettings implements DebugSettingsMBean
-{
-	private final org.apache.wicket.Application application;
-
-	/**
-	 * Create.
-	 * 
-	 * @param application
-	 */
-	public DebugSettings(final org.apache.wicket.Application application)
-	{
-		this.application = application;
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.DebugSettingsMBean#getComponentUseCheck()
-	 */
-	@Override
-	public boolean getComponentUseCheck()
-	{
-		return application.getDebugSettings().getComponentUseCheck();
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.DebugSettingsMBean#isAjaxDebugModeEnabled()
-	 */
-	@Override
-	public boolean isAjaxDebugModeEnabled()
-	{
-		return application.getDebugSettings().isAjaxDebugModeEnabled();
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.DebugSettingsMBean#setAjaxDebugModeEnabled(boolean)
-	 */
-	@Override
-	public void setAjaxDebugModeEnabled(final boolean enable)
-	{
-		application.getDebugSettings().setAjaxDebugModeEnabled(enable);
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.DebugSettingsMBean#setComponentUseCheck(boolean)
-	 */
-	@Override
-	public void setComponentUseCheck(final boolean check)
-	{
-		application.getDebugSettings().setComponentUseCheck(check);
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.DebugSettingsMBean#setOutputComponentPath(boolean)
-	 */
-	@Override
-	public void setOutputComponentPath(final boolean enabled)
-	{
-		application.getDebugSettings().setOutputComponentPath(enabled);
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.DebugSettingsMBean#isOutputComponentPath()
-	 */
-	@Override
-	public boolean isOutputComponentPath()
-	{
-		return application.getDebugSettings().isOutputComponentPath();
-	}
-
-
-	/**
-	 * @see org.apache.wicket.jmx.DebugSettingsMBean#setOutputMarkupContainerClassName(boolean)
-	 */
-	@Override
-	public void setOutputMarkupContainerClassName(final boolean enable)
-	{
-		application.getDebugSettings().setOutputMarkupContainerClassName(enable);
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.DebugSettingsMBean#isOutputMarkupContainerClassName()
-	 */
-	@Override
-	public boolean isOutputMarkupContainerClassName()
-	{
-		return application.getDebugSettings().isOutputMarkupContainerClassName();
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.DebugSettingsMBean#isLinePreciseReportingOnAddComponentEnabled()
-	 */
-	@Override
-	public boolean isLinePreciseReportingOnAddComponentEnabled()
-	{
-		return application.getDebugSettings().isLinePreciseReportingOnAddComponentEnabled();
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.DebugSettingsMBean#setLinePreciseReportingOnAddComponentEnabled(boolean)
-	 */
-	@Override
-	public void setLinePreciseReportingOnAddComponentEnabled(final boolean enable)
-	{
-		application.getDebugSettings().setLinePreciseReportingOnAddComponentEnabled(enable);
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.DebugSettingsMBean#isLinePreciseReportingOnNewComponentEnabled()
-	 */
-	@Override
-	public boolean isLinePreciseReportingOnNewComponentEnabled()
-	{
-		return application.getDebugSettings().isLinePreciseReportingOnNewComponentEnabled();
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.DebugSettingsMBean#setLinePreciseReportingOnNewComponentEnabled(boolean)
-	 */
-	@Override
-	public void setLinePreciseReportingOnNewComponentEnabled(final boolean enable)
-	{
-		application.getDebugSettings().setLinePreciseReportingOnNewComponentEnabled(enable);
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.DebugSettingsMBean#setDevelopmentUtilitiesEnabled(boolean)
-	 */
-	@Override
-	public void setDevelopmentUtilitiesEnabled(final boolean enable)
-	{
-		application.getDebugSettings().setDevelopmentUtilitiesEnabled(enable);
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.DebugSettingsMBean#isDevelopmentUtilitiesEnabled()
-	 */
-	@Override
-	public boolean isDevelopmentUtilitiesEnabled()
-	{
-		return application.getDebugSettings().isDevelopmentUtilitiesEnabled();
-	}
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/Initializer.java
----------------------------------------------------------------------
diff --git a/wicket-jmx/src/main/java/org/apache/wicket/jmx/Initializer.java b/wicket-jmx/src/main/java/org/apache/wicket/jmx/Initializer.java
index 77aaa2d..27f4c33 100644
--- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/Initializer.java
+++ b/wicket-jmx/src/main/java/org/apache/wicket/jmx/Initializer.java
@@ -17,6 +17,7 @@
 package org.apache.wicket.jmx;
 
 import java.lang.management.ManagementFactory;
+import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -29,8 +30,24 @@ import javax.management.MalformedObjectNameException;
 import javax.management.NotCompliantMBeanException;
 import javax.management.ObjectName;
 
+import net.sf.cglib.core.DefaultNamingPolicy;
+import net.sf.cglib.core.Predicate;
+import net.sf.cglib.proxy.Enhancer;
+
 import org.apache.wicket.IInitializer;
+import org.apache.wicket.ThreadContext;
 import org.apache.wicket.WicketRuntimeException;
+import org.apache.wicket.jmx.wrapper.Application;
+import org.apache.wicket.jmx.wrapper.ApplicationSettings;
+import org.apache.wicket.jmx.wrapper.DebugSettings;
+import org.apache.wicket.jmx.wrapper.MarkupSettings;
+import org.apache.wicket.jmx.wrapper.PageSettings;
+import org.apache.wicket.jmx.wrapper.RequestCycleSettings;
+import org.apache.wicket.jmx.wrapper.RequestLogger;
+import org.apache.wicket.jmx.wrapper.ResourceSettings;
+import org.apache.wicket.jmx.wrapper.SecuritySettings;
+import org.apache.wicket.jmx.wrapper.SessionSettings;
+import org.apache.wicket.jmx.wrapper.StoreSettings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -172,30 +189,30 @@ public class Initializer implements IInitializer
 			domain = tempDomain;
 
 			Application appBean = new Application(application);
-			register(appBean, appBeanName);
-
-			register(new ApplicationSettings(application), new ObjectName(domain +
-				":type=Application,name=ApplicationSettings"));
-			register(new DebugSettings(application), new ObjectName(domain +
-				":type=Application,name=DebugSettings"));
-			register(new MarkupSettings(application), new ObjectName(domain +
-				":type=Application,name=MarkupSettings"));
-			register(new ResourceSettings(application), new ObjectName(domain +
-				":type=Application,name=ResourceSettings"));
-			register(new PageSettings(application), new ObjectName(domain +
-				":type=Application,name=PageSettings"));
-			register(new RequestCycleSettings(application), new ObjectName(domain +
-				":type=Application,name=RequestCycleSettings"));
-			register(new SecuritySettings(application), new ObjectName(domain +
-				":type=Application,name=SecuritySettings"));
-			register(new SessionSettings(application), new ObjectName(domain +
-				":type=Application,name=SessionSettings"));
-			register(new StoreSettings(application), new ObjectName(domain +
-				":type=Application,name=StoreSettings"));
+			register(application, appBean, appBeanName);
+
+			register(application, new ApplicationSettings(application), new ObjectName(domain
+				+ ":type=Application,name=ApplicationSettings"));
+			register(application, new DebugSettings(application), new ObjectName(domain
+				+ ":type=Application,name=DebugSettings"));
+			register(application, new MarkupSettings(application), new ObjectName(domain
+				+ ":type=Application,name=MarkupSettings"));
+			register(application, new ResourceSettings(application), new ObjectName(domain
+				+ ":type=Application,name=ResourceSettings"));
+			register(application, new PageSettings(application), new ObjectName(domain
+				+ ":type=Application,name=PageSettings"));
+			register(application, new RequestCycleSettings(application), new ObjectName(domain
+				+ ":type=Application,name=RequestCycleSettings"));
+			register(application, new SecuritySettings(application), new ObjectName(domain
+				+ ":type=Application,name=SecuritySettings"));
+			register(application, new SessionSettings(application), new ObjectName(domain
+				+ ":type=Application,name=SessionSettings"));
+			register(application, new StoreSettings(application), new ObjectName(domain
+				+ ":type=Application,name=StoreSettings"));
 
 			RequestLogger sessionsBean = new RequestLogger(application);
 			ObjectName sessionsBeanName = new ObjectName(domain + ":type=RequestLogger");
-			register(sessionsBean, sessionsBeanName);
+			register(application, sessionsBean, sessionsBeanName);
 		}
 		catch (MalformedObjectNameException e)
 		{
@@ -236,11 +253,55 @@ public class Initializer implements IInitializer
 	 * @throws MBeanRegistrationException
 	 * @throws InstanceAlreadyExistsException
 	 */
-	private void register(final Object o, final ObjectName objectName)
-		throws InstanceAlreadyExistsException, MBeanRegistrationException,
-		NotCompliantMBeanException
+	private void register(final org.apache.wicket.Application application, final Object o,
+		final ObjectName objectName) throws InstanceAlreadyExistsException,
+		MBeanRegistrationException, NotCompliantMBeanException
 	{
-		mbeanServer.registerMBean(o, objectName);
+		Object proxy = createProxy(application, o);
+		mbeanServer.registerMBean(proxy, objectName);
 		registered.add(objectName);
 	}
+
+	private Object createProxy(final org.apache.wicket.Application application, final Object o)
+	{
+		Enhancer e = new Enhancer();
+		e.setInterfaces(o.getClass().getInterfaces());
+		e.setSuperclass(Object.class);
+		e.setCallback(new net.sf.cglib.proxy.InvocationHandler()
+		{
+			@Override
+			public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
+			{
+				boolean existed = ThreadContext.exists();
+
+				if (existed == false)
+				{
+					ThreadContext.setApplication(application);
+				}
+
+				try
+				{
+					return method.invoke(o, args);
+				}
+				finally
+				{
+					if (existed == false)
+					{
+						ThreadContext.detach();
+					}
+				}
+			}
+		});
+		e.setNamingPolicy(new DefaultNamingPolicy()
+		{
+			@Override
+			public String getClassName(final String prefix, final String source, final Object key,
+				final Predicate names)
+			{
+				return o.getClass().getName().replace(".wrapper", "");
+			}
+		});
+
+		return e.create();
+	}
 }

http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettings.java
----------------------------------------------------------------------
diff --git a/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettings.java b/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettings.java
deleted file mode 100644
index efa6048..0000000
--- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettings.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.wicket.jmx;
-
-
-/**
- * Exposes Application related functionality for JMX.
- * 
- * @author eelcohillenius
- */
-public class MarkupSettings implements MarkupSettingsMBean
-{
-	private final org.apache.wicket.Application application;
-
-	/**
-	 * Create.
-	 * 
-	 * @param application
-	 */
-	public MarkupSettings(final org.apache.wicket.Application application)
-	{
-		this.application = application;
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.MarkupSettingsMBean#getAutomaticLinking()
-	 */
-	@Override
-	public boolean getAutomaticLinking()
-	{
-		return application.getMarkupSettings().getAutomaticLinking();
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.MarkupSettingsMBean#getCompressWhitespace()
-	 */
-	@Override
-	public boolean getCompressWhitespace()
-	{
-		return application.getMarkupSettings().getCompressWhitespace();
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.MarkupSettingsMBean#getDefaultMarkupEncoding()
-	 */
-	@Override
-	public String getDefaultMarkupEncoding()
-	{
-		return application.getMarkupSettings().getDefaultMarkupEncoding();
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.MarkupSettingsMBean#getStripComments()
-	 */
-	@Override
-	public boolean getStripComments()
-	{
-		return application.getMarkupSettings().getStripComments();
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.MarkupSettingsMBean#getStripWicketTags()
-	 */
-	@Override
-	public boolean getStripWicketTags()
-	{
-		return application.getMarkupSettings().getStripWicketTags();
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.MarkupSettingsMBean#setAutomaticLinking(boolean)
-	 */
-	@Override
-	public void setAutomaticLinking(final boolean automaticLinking)
-	{
-		application.getMarkupSettings().setAutomaticLinking(automaticLinking);
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.MarkupSettingsMBean#setCompressWhitespace(boolean)
-	 */
-	@Override
-	public void setCompressWhitespace(final boolean compressWhitespace)
-	{
-		application.getMarkupSettings().setCompressWhitespace(compressWhitespace);
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.MarkupSettingsMBean#setDefaultMarkupEncoding(java.lang.String)
-	 */
-	@Override
-	public void setDefaultMarkupEncoding(final String encoding)
-	{
-		application.getMarkupSettings().setDefaultMarkupEncoding(encoding);
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.MarkupSettingsMBean#setStripComments(boolean)
-	 */
-	@Override
-	public void setStripComments(final boolean stripComments)
-	{
-		application.getMarkupSettings().setStripComments(stripComments);
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.MarkupSettingsMBean#setStripWicketTags(boolean)
-	 */
-	@Override
-	public void setStripWicketTags(final boolean stripWicketTags)
-	{
-		application.getMarkupSettings().setStripWicketTags(stripWicketTags);
-	}
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettingsMBean.java
----------------------------------------------------------------------
diff --git a/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettingsMBean.java b/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettingsMBean.java
index 91f2b23..df0d25d 100644
--- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettingsMBean.java
+++ b/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettingsMBean.java
@@ -16,6 +16,8 @@
  */
 package org.apache.wicket.jmx;
 
+import org.apache.wicket.jmx.wrapper.MarkupSettings;
+
 /**
  * Markup settings.
  * 

http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/PageSettings.java
----------------------------------------------------------------------
diff --git a/wicket-jmx/src/main/java/org/apache/wicket/jmx/PageSettings.java b/wicket-jmx/src/main/java/org/apache/wicket/jmx/PageSettings.java
deleted file mode 100644
index b91b1e7..0000000
--- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/PageSettings.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.wicket.jmx;
-
-
-/**
- * Exposes Application related functionality for JMX.
- * 
- * @author eelcohillenius
- */
-public class PageSettings implements PageSettingsMBean
-{
-	private final org.apache.wicket.Application application;
-
-	/**
-	 * Create.
-	 * 
-	 * @param application
-	 */
-	public PageSettings(final org.apache.wicket.Application application)
-	{
-		this.application = application;
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.PageSettingsMBean#getVersionPagesByDefault()
-	 */
-	@Override
-	public boolean getVersionPagesByDefault()
-	{
-		return application.getPageSettings().getVersionPagesByDefault();
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.PageSettingsMBean#setVersionPagesByDefault(boolean)
-	 */
-	@Override
-	public void setVersionPagesByDefault(final boolean pagesVersionedByDefault)
-	{
-		application.getPageSettings().setVersionPagesByDefault(pagesVersionedByDefault);
-	}
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestCycleSettings.java
----------------------------------------------------------------------
diff --git a/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestCycleSettings.java b/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestCycleSettings.java
deleted file mode 100644
index 8815ee0..0000000
--- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestCycleSettings.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.wicket.jmx;
-
-import org.apache.wicket.util.time.Duration;
-
-
-/**
- * Exposes Application related functionality for JMX.
- * 
- * @author eelcohillenius
- */
-public class RequestCycleSettings implements RequestCycleSettingsMBean
-{
-	private final org.apache.wicket.Application application;
-
-	/**
-	 * Create.
-	 * 
-	 * @param application
-	 */
-	public RequestCycleSettings(final org.apache.wicket.Application application)
-	{
-		this.application = application;
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.RequestCycleSettingsMBean#getBufferResponse()
-	 */
-	@Override
-	public boolean getBufferResponse()
-	{
-		return application.getRequestCycleSettings().getBufferResponse();
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.RequestCycleSettingsMBean#getGatherExtendedBrowserInfo()
-	 */
-	@Override
-	public boolean getGatherExtendedBrowserInfo()
-	{
-		return application.getRequestCycleSettings().getGatherExtendedBrowserInfo();
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.RequestCycleSettingsMBean#getResponseRequestEncoding()
-	 */
-	@Override
-	public String getResponseRequestEncoding()
-	{
-		return application.getRequestCycleSettings().getResponseRequestEncoding();
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.RequestCycleSettingsMBean#getTimeout()
-	 */
-	@Override
-	public String getTimeout()
-	{
-		return application.getRequestCycleSettings().getTimeout().toString();
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.RequestCycleSettingsMBean#setBufferResponse(boolean)
-	 */
-	@Override
-	public void setBufferResponse(final boolean bufferResponse)
-	{
-		application.getRequestCycleSettings().setBufferResponse(bufferResponse);
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.RequestCycleSettingsMBean#setGatherExtendedBrowserInfo(boolean)
-	 */
-	@Override
-	public void setGatherExtendedBrowserInfo(final boolean gatherExtendedBrowserInfo)
-	{
-		application.getRequestCycleSettings().setGatherExtendedBrowserInfo(
-			gatherExtendedBrowserInfo);
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.RequestCycleSettingsMBean#setResponseRequestEncoding(java.lang.String)
-	 */
-	@Override
-	public void setResponseRequestEncoding(final String responseRequestEncoding)
-	{
-		application.getRequestCycleSettings().setResponseRequestEncoding(responseRequestEncoding);
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.RequestCycleSettingsMBean#setTimeout(java.lang.String)
-	 */
-	@Override
-	public void setTimeout(final String timeout)
-	{
-		application.getRequestCycleSettings().setTimeout(Duration.valueOf(timeout));
-	}
-
-	@Override
-	public void setExceptionRetryCount(int retries)
-	{
-		application.getRequestCycleSettings().setExceptionRetryCount(retries);
-	}
-
-	@Override
-	public int getExceptionRetryCount()
-	{
-		return application.getRequestCycleSettings().getExceptionRetryCount();
-	}
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestLogger.java
----------------------------------------------------------------------
diff --git a/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestLogger.java b/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestLogger.java
deleted file mode 100644
index 28ec4cf..0000000
--- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestLogger.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.wicket.jmx;
-
-import java.io.IOException;
-
-import org.apache.wicket.protocol.http.WebApplication;
-
-
-/**
- * Exposes {@link org.apache.wicket.protocol.http.RequestLogger} for JMX.
- * 
- * @author eelcohillenius
- */
-public class RequestLogger implements RequestLoggerMBean
-{
-	private final org.apache.wicket.Application application;
-
-	private final WebApplication webApplication;
-
-	/**
-	 * Construct.
-	 * 
-	 * @param application
-	 *            The application
-	 */
-	public RequestLogger(final org.apache.wicket.Application application)
-	{
-		this.application = application;
-
-		// do this so that we don't have to cast all the time
-		if (application instanceof WebApplication)
-		{
-			webApplication = (WebApplication)application;
-		}
-		else
-		{
-			webApplication = null;
-		}
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.RequestLoggerMBean#getNumberOfCreatedSessions()
-	 */
-	@Override
-	public Integer getNumberOfCreatedSessions() throws IOException
-	{
-		org.apache.wicket.protocol.http.IRequestLogger logger = getRequestLogger();
-		if (logger != null)
-		{
-			return logger.getTotalCreatedSessions();
-		}
-		return null;
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.RequestLoggerMBean#getNumberOfLiveSessions()
-	 */
-	@Override
-	public Integer getNumberOfLiveSessions() throws IOException
-	{
-		org.apache.wicket.protocol.http.IRequestLogger logger = getRequestLogger();
-		if (logger != null)
-		{
-			return logger.getLiveSessions().length;
-		}
-		return null;
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.RequestLoggerMBean#getPeakNumberOfSessions()
-	 */
-	@Override
-	public Integer getPeakNumberOfSessions() throws IOException
-	{
-		org.apache.wicket.protocol.http.IRequestLogger logger = getRequestLogger();
-		if (logger != null)
-		{
-			return logger.getPeakSessions();
-		}
-		return null;
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.RequestLoggerMBean#getNumberOfCurrentActiveRequests()
-	 */
-	@Override
-	public Integer getNumberOfCurrentActiveRequests() throws IOException
-	{
-		org.apache.wicket.protocol.http.IRequestLogger logger = getRequestLogger();
-		if (logger != null)
-		{
-			return Integer.valueOf(logger.getCurrentActiveRequestCount());
-		}
-		return null;
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.RequestLoggerMBean#getPeakNumberOfActiveRequests()
-	 */
-	@Override
-	public Integer getPeakNumberOfActiveRequests() throws IOException
-	{
-		org.apache.wicket.protocol.http.IRequestLogger logger = getRequestLogger();
-		if (logger != null)
-		{
-			return Integer.valueOf(logger.getPeakActiveRequestCount());
-		}
-		return null;
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.RequestLoggerMBean#restart()
-	 */
-	@Override
-	public void restart() throws IOException
-	{
-		if (webApplication != null)
-		{
-			webApplication.getRequestLoggerSettings().setRequestLoggerEnabled(false);
-			webApplication.getRequestLogger();
-			webApplication.getRequestLoggerSettings().setRequestLoggerEnabled(true);
-		}
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.RequestLoggerMBean#stop()
-	 */
-	@Override
-	public void stop() throws IOException
-	{
-		if (webApplication != null)
-		{
-			webApplication.getRequestLoggerSettings().setRequestLoggerEnabled(false);
-		}
-	}
-
-	/**
-	 * Gets the request logger for this application.
-	 * 
-	 * @return The request logger or null if no request is active, or if this is not a web
-	 *         application
-	 */
-	protected org.apache.wicket.protocol.http.IRequestLogger getRequestLogger()
-	{
-		if (application instanceof WebApplication)
-		{
-			return application.getRequestLogger();
-		}
-		return null;
-	}
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/ResourceSettings.java
----------------------------------------------------------------------
diff --git a/wicket-jmx/src/main/java/org/apache/wicket/jmx/ResourceSettings.java b/wicket-jmx/src/main/java/org/apache/wicket/jmx/ResourceSettings.java
deleted file mode 100644
index af7f60d..0000000
--- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/ResourceSettings.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.wicket.jmx;
-
-import java.util.List;
-
-import org.apache.wicket.ThreadContext;
-import org.apache.wicket.resource.loader.IStringResourceLoader;
-import org.apache.wicket.util.file.IResourceFinder;
-import org.apache.wicket.util.lang.Generics;
-import org.apache.wicket.util.time.Duration;
-
-
-/**
- * Exposes Application related functionality for JMX.
- * 
- * @author eelcohillenius
- */
-public class ResourceSettings implements ResourceSettingsMBean
-{
-	private final org.apache.wicket.Application application;
-
-	/**
-	 * Create.
-	 * 
-	 * @param application
-	 */
-	public ResourceSettings(final org.apache.wicket.Application application)
-	{
-		this.application = application;
-	}
-
-	/**
-	 * {@inheritDoc}
-	 */
-	@Override
-	public String getLocalizer()
-	{
-		return Stringz.className(application.getResourceSettings().getLocalizer());
-	}
-
-	/**
-	 * {@inheritDoc}
-	 */
-	@Override
-	public String getPackageResourceGuard()
-	{
-		return Stringz.className(application.getResourceSettings().getPackageResourceGuard());
-	}
-
-	/**
-	 * {@inheritDoc}
-	 */
-	@Override
-	public String getPropertiesFactory()
-	{
-		ThreadContext.setApplication(application);
-
-		try
-		{
-			return Stringz.className(application.getResourceSettings().getPropertiesFactory());
-		}
-		finally
-		{
-			ThreadContext.detach();
-		}
-	}
-
-	/**
-	 * {@inheritDoc}
-	 */
-	@Override
-	public String getResourceFinders()
-	{
-		StringBuilder builder = new StringBuilder();
-		for (IResourceFinder rf : application.getResourceSettings().getResourceFinders())
-		{
-			builder.append(Stringz.className(rf));
-		}
-		return builder.toString();
-	}
-
-	/**
-	 * {@inheritDoc}
-	 */
-	@Override
-	public String getResourcePollFrequency()
-	{
-		Duration duration = application.getResourceSettings().getResourcePollFrequency();
-		return (duration != null) ? duration.toString() : null;
-	}
-
-	/**
-	 * {@inheritDoc}
-	 */
-	@Override
-	public String getResourceStreamLocator()
-	{
-		return Stringz.className(application.getResourceSettings().getResourceStreamLocator());
-	}
-
-	/**
-	 * {@inheritDoc}
-	 */
-	@Override
-	public String[] getStringResourceLoaders()
-	{
-		List<IStringResourceLoader> loaders = application.getResourceSettings()
-			.getStringResourceLoaders();
-		if (loaders != null)
-		{
-			List<String> list = Generics.newArrayList();
-			for (Object loader : loaders)
-			{
-				list.add(loader.toString());
-			}
-			return list.toArray(new String[loaders.size()]);
-		}
-		return null;
-	}
-
-	/**
-	 * {@inheritDoc}
-	 */
-	@Override
-	public boolean getThrowExceptionOnMissingResource()
-	{
-		return application.getResourceSettings().getThrowExceptionOnMissingResource();
-	}
-
-	/**
-	 * {@inheritDoc}
-	 */
-	@Override
-	public boolean getUseDefaultOnMissingResource()
-	{
-		return application.getResourceSettings().getUseDefaultOnMissingResource();
-	}
-
-	/**
-	 * {@inheritDoc}
-	 */
-	@Override
-	public void setThrowExceptionOnMissingResource(final boolean throwExceptionOnMissingResource)
-	{
-		application.getResourceSettings().setThrowExceptionOnMissingResource(
-			throwExceptionOnMissingResource);
-	}
-
-	/**
-	 * {@inheritDoc}
-	 */
-	@Override
-	public void setUseDefaultOnMissingResource(final boolean useDefaultOnMissingResource)
-	{
-		application.getResourceSettings().setUseDefaultOnMissingResource(
-			useDefaultOnMissingResource);
-	}
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/SecuritySettings.java
----------------------------------------------------------------------
diff --git a/wicket-jmx/src/main/java/org/apache/wicket/jmx/SecuritySettings.java b/wicket-jmx/src/main/java/org/apache/wicket/jmx/SecuritySettings.java
deleted file mode 100644
index be89017..0000000
--- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/SecuritySettings.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.wicket.jmx;
-
-/**
- * Exposes Application related functionality for JMX.
- * 
- * @author eelcohillenius
- */
-public class SecuritySettings implements SecuritySettingsMBean
-{
-	private final org.apache.wicket.Application application;
-
-	/**
-	 * Create.
-	 * 
-	 * @param application
-	 */
-	public SecuritySettings(final org.apache.wicket.Application application)
-	{
-		this.application = application;
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.SecuritySettingsMBean#getAuthorizationStrategy()
-	 */
-	@Override
-	public String getAuthorizationStrategy()
-	{
-		return Stringz.className(application.getSecuritySettings().getAuthorizationStrategy());
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.SecuritySettingsMBean#getCryptFactory()
-	 */
-	@Override
-	public String getCryptFactory()
-	{
-		return Stringz.className(application.getSecuritySettings().getCryptFactory());
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.SecuritySettingsMBean#getUnauthorizedComponentInstantiationListener()
-	 */
-	@Override
-	public String getUnauthorizedComponentInstantiationListener()
-	{
-		return Stringz.className(application.getSecuritySettings()
-			.getUnauthorizedComponentInstantiationListener());
-	}
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/SessionSettings.java
----------------------------------------------------------------------
diff --git a/wicket-jmx/src/main/java/org/apache/wicket/jmx/SessionSettings.java b/wicket-jmx/src/main/java/org/apache/wicket/jmx/SessionSettings.java
deleted file mode 100644
index 6c15ab3..0000000
--- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/SessionSettings.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.wicket.jmx;
-
-/**
- * Exposes Application related functionality for JMX.
- * 
- * @author eelcohillenius
- */
-public class SessionSettings implements SessionSettingsMBean
-{
-	private final org.apache.wicket.Application application;
-
-	/**
-	 * Create.
-	 * 
-	 * @param application
-	 */
-	public SessionSettings(final org.apache.wicket.Application application)
-	{
-		this.application = application;
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.SessionSettingsMBean#getPageFactory()
-	 */
-	@Override
-	public String getPageFactory()
-	{
-		return Stringz.className(application.getPageFactory());
-	}
-
-	/**
-	 * @see org.apache.wicket.jmx.SessionSettingsMBean#getSessionStore()
-	 */
-	@Override
-	public String getSessionStore()
-	{
-		return Stringz.className(application.getSessionStore());
-	}
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/StoreSettings.java
----------------------------------------------------------------------
diff --git a/wicket-jmx/src/main/java/org/apache/wicket/jmx/StoreSettings.java b/wicket-jmx/src/main/java/org/apache/wicket/jmx/StoreSettings.java
deleted file mode 100644
index 4705f3f..0000000
--- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/StoreSettings.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.wicket.jmx;
-
-import org.apache.wicket.Application;
-
-/**
- * Exposes Application's StoreSettings for JMX.
- */
-public class StoreSettings implements StoreSettingsMBean
-{
-	private final Application application;
-
-	/**
-	 * Construct.
-	 * 
-	 * @param application
-	 */
-	public StoreSettings(final Application application)
-	{
-		this.application = application;
-	}
-
-	@Override
-	public int getInmemoryCacheSize()
-	{
-		return application.getStoreSettings().getInmemoryCacheSize();
-	}
-
-	@Override
-	public long getMaxSizePerSession()
-	{
-		return application.getStoreSettings().getMaxSizePerSession().bytes();
-	}
-
-	@Override
-	public String getFileStoreFolder()
-	{
-		return application.getStoreSettings().getFileStoreFolder().getAbsolutePath();
-	}
-
-	@Override
-	public int getAsynchronousQueueCapacity()
-	{
-		return application.getStoreSettings().getAsynchronousQueueCapacity();
-	}
-
-	@Override
-	public boolean isAsynchronous()
-	{
-		return application.getStoreSettings().isAsynchronous();
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/Stringz.java
----------------------------------------------------------------------
diff --git a/wicket-jmx/src/main/java/org/apache/wicket/jmx/Stringz.java b/wicket-jmx/src/main/java/org/apache/wicket/jmx/Stringz.java
deleted file mode 100644
index f9f6381..0000000
--- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/Stringz.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.wicket.jmx;
-
-class Stringz
-{
-	static String className(final Object o)
-	{
-		return (o != null) ? o.getClass().getName() : null;
-	}
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/Application.java
----------------------------------------------------------------------
diff --git a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/Application.java b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/Application.java
new file mode 100644
index 0000000..56e0eff
--- /dev/null
+++ b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/Application.java
@@ -0,0 +1,104 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wicket.jmx.wrapper;
+
+import java.io.IOException;
+
+import org.apache.wicket.jmx.ApplicationMBean;
+
+/**
+ * Exposes Application related functionality for JMX.
+ * 
+ * @author eelcohillenius
+ */
+public class Application implements ApplicationMBean
+{
+	private final org.apache.wicket.Application application;
+
+	/**
+	 * Create.
+	 * 
+	 * @param application
+	 */
+	public Application(final org.apache.wicket.Application application)
+	{
+		this.application = application;
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.ApplicationMBean#clearMarkupCache()
+	 */
+	@Override
+	public void clearMarkupCache() throws IOException
+	{
+		application.getMarkupSettings().getMarkupFactory().getMarkupCache().clear();
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.ApplicationMBean#getApplicationClass()
+	 */
+	@Override
+	public String getApplicationClass() throws IOException
+	{
+		return application.getClass().getName();
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.ApplicationMBean#getConfigurationType()
+	 */
+	@Override
+	public String getConfigurationType()
+	{
+		return application.getConfigurationType().name();
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.ApplicationMBean#getHomePageClass()
+	 */
+	@Override
+	public String getHomePageClass() throws IOException
+	{
+		return application.getHomePage().getName();
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.ApplicationMBean#getMarkupCacheSize()
+	 */
+	@Override
+	public int getMarkupCacheSize() throws IOException
+	{
+		return application.getMarkupSettings().getMarkupFactory().getMarkupCache().size();
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.ApplicationMBean#getWicketVersion()
+	 */
+	@Override
+	public String getWicketVersion() throws IOException
+	{
+		return application.getFrameworkSettings().getVersion();
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.ApplicationMBean#clearLocalizerCache()
+	 */
+	@Override
+	public void clearLocalizerCache() throws IOException
+	{
+		application.getResourceSettings().getLocalizer().clearCache();
+	}
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/ApplicationSettings.java
----------------------------------------------------------------------
diff --git a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/ApplicationSettings.java b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/ApplicationSettings.java
new file mode 100644
index 0000000..a6a0d4c
--- /dev/null
+++ b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/ApplicationSettings.java
@@ -0,0 +1,103 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wicket.jmx.wrapper;
+
+import org.apache.wicket.Application;
+import org.apache.wicket.jmx.ApplicationSettingsMBean;
+import org.apache.wicket.util.lang.Bytes;
+import org.apache.wicket.util.lang.Classes;
+
+/**
+ * Exposes Application related functionality for JMX.
+ * 
+ * @author eelcohillenius
+ */
+public class ApplicationSettings implements ApplicationSettingsMBean
+{
+	private final Application application;
+
+	/**
+	 * Create.
+	 * 
+	 * @param application
+	 */
+	public ApplicationSettings(final Application application)
+	{
+		this.application = application;
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.ApplicationSettingsMBean#getAccessDeniedPage()
+	 */
+	@Override
+	public String getAccessDeniedPage()
+	{
+		return Classes.name(application.getApplicationSettings().getAccessDeniedPage());
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.ApplicationSettingsMBean#getClassResolver()
+	 */
+	@Override
+	public String getClassResolver()
+	{
+		return Stringz.className(application.getApplicationSettings().getClassResolver());
+	}
+
+	@Override
+	public String getDefaultMaximumUploadSize()
+	{
+		return application.getApplicationSettings().getDefaultMaximumUploadSize().toString();
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.ApplicationSettingsMBean#getInternalErrorPage()
+	 */
+	@Override
+	public String getInternalErrorPage()
+	{
+		return Classes.name(application.getApplicationSettings().getInternalErrorPage());
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.ApplicationSettingsMBean#getPageExpiredErrorPage()
+	 */
+	@Override
+	public String getPageExpiredErrorPage()
+	{
+		return Classes.name(application.getApplicationSettings().getPageExpiredErrorPage());
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.ApplicationSettingsMBean#getUnexpectedExceptionDisplay()
+	 */
+	@Override
+	public String getUnexpectedExceptionDisplay()
+	{
+		return application.getExceptionSettings().getUnexpectedExceptionDisplay().toString();
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.ApplicationSettingsMBean#setDefaultMaximumUploadSize(java.lang.String)
+	 */
+	@Override
+	public void setDefaultMaximumUploadSize(final String defaultUploadSize)
+	{
+		application.getApplicationSettings().setDefaultMaximumUploadSize(
+			Bytes.valueOf(defaultUploadSize));
+	}
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/DebugSettings.java
----------------------------------------------------------------------
diff --git a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/DebugSettings.java b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/DebugSettings.java
new file mode 100644
index 0000000..fcd073a
--- /dev/null
+++ b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/DebugSettings.java
@@ -0,0 +1,167 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wicket.jmx.wrapper;
+
+import org.apache.wicket.Application;
+import org.apache.wicket.jmx.DebugSettingsMBean;
+
+/**
+ * Exposes Application related functionality for JMX.
+ * 
+ * @author eelcohillenius
+ */
+public class DebugSettings implements DebugSettingsMBean
+{
+	private final Application application;
+
+	/**
+	 * Create.
+	 * 
+	 * @param application
+	 */
+	public DebugSettings(final Application application)
+	{
+		this.application = application;
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.DebugSettingsMBean#getComponentUseCheck()
+	 */
+	@Override
+	public boolean getComponentUseCheck()
+	{
+		return application.getDebugSettings().getComponentUseCheck();
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.DebugSettingsMBean#isAjaxDebugModeEnabled()
+	 */
+	@Override
+	public boolean isAjaxDebugModeEnabled()
+	{
+		return application.getDebugSettings().isAjaxDebugModeEnabled();
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.DebugSettingsMBean#setAjaxDebugModeEnabled(boolean)
+	 */
+	@Override
+	public void setAjaxDebugModeEnabled(final boolean enable)
+	{
+		application.getDebugSettings().setAjaxDebugModeEnabled(enable);
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.DebugSettingsMBean#setComponentUseCheck(boolean)
+	 */
+	@Override
+	public void setComponentUseCheck(final boolean check)
+	{
+		application.getDebugSettings().setComponentUseCheck(check);
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.DebugSettingsMBean#setOutputComponentPath(boolean)
+	 */
+	@Override
+	public void setOutputComponentPath(final boolean enabled)
+	{
+		application.getDebugSettings().setOutputComponentPath(enabled);
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.DebugSettingsMBean#isOutputComponentPath()
+	 */
+	@Override
+	public boolean isOutputComponentPath()
+	{
+		return application.getDebugSettings().isOutputComponentPath();
+	}
+
+
+	/**
+	 * @see org.apache.wicket.jmx.DebugSettingsMBean#setOutputMarkupContainerClassName(boolean)
+	 */
+	@Override
+	public void setOutputMarkupContainerClassName(final boolean enable)
+	{
+		application.getDebugSettings().setOutputMarkupContainerClassName(enable);
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.DebugSettingsMBean#isOutputMarkupContainerClassName()
+	 */
+	@Override
+	public boolean isOutputMarkupContainerClassName()
+	{
+		return application.getDebugSettings().isOutputMarkupContainerClassName();
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.DebugSettingsMBean#isLinePreciseReportingOnAddComponentEnabled()
+	 */
+	@Override
+	public boolean isLinePreciseReportingOnAddComponentEnabled()
+	{
+		return application.getDebugSettings().isLinePreciseReportingOnAddComponentEnabled();
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.DebugSettingsMBean#setLinePreciseReportingOnAddComponentEnabled(boolean)
+	 */
+	@Override
+	public void setLinePreciseReportingOnAddComponentEnabled(final boolean enable)
+	{
+		application.getDebugSettings().setLinePreciseReportingOnAddComponentEnabled(enable);
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.DebugSettingsMBean#isLinePreciseReportingOnNewComponentEnabled()
+	 */
+	@Override
+	public boolean isLinePreciseReportingOnNewComponentEnabled()
+	{
+		return application.getDebugSettings().isLinePreciseReportingOnNewComponentEnabled();
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.DebugSettingsMBean#setLinePreciseReportingOnNewComponentEnabled(boolean)
+	 */
+	@Override
+	public void setLinePreciseReportingOnNewComponentEnabled(final boolean enable)
+	{
+		application.getDebugSettings().setLinePreciseReportingOnNewComponentEnabled(enable);
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.DebugSettingsMBean#setDevelopmentUtilitiesEnabled(boolean)
+	 */
+	@Override
+	public void setDevelopmentUtilitiesEnabled(final boolean enable)
+	{
+		application.getDebugSettings().setDevelopmentUtilitiesEnabled(enable);
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.DebugSettingsMBean#isDevelopmentUtilitiesEnabled()
+	 */
+	@Override
+	public boolean isDevelopmentUtilitiesEnabled()
+	{
+		return application.getDebugSettings().isDevelopmentUtilitiesEnabled();
+	}
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/MarkupSettings.java
----------------------------------------------------------------------
diff --git a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/MarkupSettings.java b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/MarkupSettings.java
new file mode 100644
index 0000000..387b2ba
--- /dev/null
+++ b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/MarkupSettings.java
@@ -0,0 +1,131 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wicket.jmx.wrapper;
+
+import org.apache.wicket.Application;
+import org.apache.wicket.jmx.MarkupSettingsMBean;
+
+
+/**
+ * Exposes Application related functionality for JMX.
+ * 
+ * @author eelcohillenius
+ */
+public class MarkupSettings implements MarkupSettingsMBean
+{
+	private final Application application;
+
+	/**
+	 * Create.
+	 * 
+	 * @param application
+	 */
+	public MarkupSettings(final Application application)
+	{
+		this.application = application;
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.MarkupSettingsMBean#getAutomaticLinking()
+	 */
+	@Override
+	public boolean getAutomaticLinking()
+	{
+		return application.getMarkupSettings().getAutomaticLinking();
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.MarkupSettingsMBean#getCompressWhitespace()
+	 */
+	@Override
+	public boolean getCompressWhitespace()
+	{
+		return application.getMarkupSettings().getCompressWhitespace();
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.MarkupSettingsMBean#getDefaultMarkupEncoding()
+	 */
+	@Override
+	public String getDefaultMarkupEncoding()
+	{
+		return application.getMarkupSettings().getDefaultMarkupEncoding();
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.MarkupSettingsMBean#getStripComments()
+	 */
+	@Override
+	public boolean getStripComments()
+	{
+		return application.getMarkupSettings().getStripComments();
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.MarkupSettingsMBean#getStripWicketTags()
+	 */
+	@Override
+	public boolean getStripWicketTags()
+	{
+		return application.getMarkupSettings().getStripWicketTags();
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.MarkupSettingsMBean#setAutomaticLinking(boolean)
+	 */
+	@Override
+	public void setAutomaticLinking(final boolean automaticLinking)
+	{
+		application.getMarkupSettings().setAutomaticLinking(automaticLinking);
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.MarkupSettingsMBean#setCompressWhitespace(boolean)
+	 */
+	@Override
+	public void setCompressWhitespace(final boolean compressWhitespace)
+	{
+		application.getMarkupSettings().setCompressWhitespace(compressWhitespace);
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.MarkupSettingsMBean#setDefaultMarkupEncoding(java.lang.String)
+	 */
+	@Override
+	public void setDefaultMarkupEncoding(final String encoding)
+	{
+		application.getMarkupSettings().setDefaultMarkupEncoding(encoding);
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.MarkupSettingsMBean#setStripComments(boolean)
+	 */
+	@Override
+	public void setStripComments(final boolean stripComments)
+	{
+		application.getMarkupSettings().setStripComments(stripComments);
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.MarkupSettingsMBean#setStripWicketTags(boolean)
+	 */
+	@Override
+	public void setStripWicketTags(final boolean stripWicketTags)
+	{
+		application.getMarkupSettings().setStripWicketTags(stripWicketTags);
+	}
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/PageSettings.java
----------------------------------------------------------------------
diff --git a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/PageSettings.java b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/PageSettings.java
new file mode 100644
index 0000000..27d325d
--- /dev/null
+++ b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/PageSettings.java
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wicket.jmx.wrapper;
+
+import org.apache.wicket.Application;
+import org.apache.wicket.jmx.PageSettingsMBean;
+
+
+/**
+ * Exposes Application related functionality for JMX.
+ * 
+ * @author eelcohillenius
+ */
+public class PageSettings implements PageSettingsMBean
+{
+	private final Application application;
+
+	/**
+	 * Create.
+	 * 
+	 * @param application
+	 */
+	public PageSettings(final Application application)
+	{
+		this.application = application;
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.PageSettingsMBean#getVersionPagesByDefault()
+	 */
+	@Override
+	public boolean getVersionPagesByDefault()
+	{
+		return application.getPageSettings().getVersionPagesByDefault();
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.PageSettingsMBean#setVersionPagesByDefault(boolean)
+	 */
+	@Override
+	public void setVersionPagesByDefault(final boolean pagesVersionedByDefault)
+	{
+		application.getPageSettings().setVersionPagesByDefault(pagesVersionedByDefault);
+	}
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/RequestCycleSettings.java
----------------------------------------------------------------------
diff --git a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/RequestCycleSettings.java b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/RequestCycleSettings.java
new file mode 100644
index 0000000..8fa04f2
--- /dev/null
+++ b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/RequestCycleSettings.java
@@ -0,0 +1,127 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wicket.jmx.wrapper;
+
+import org.apache.wicket.Application;
+import org.apache.wicket.jmx.RequestCycleSettingsMBean;
+import org.apache.wicket.util.time.Duration;
+
+
+/**
+ * Exposes Application related functionality for JMX.
+ * 
+ * @author eelcohillenius
+ */
+public class RequestCycleSettings implements RequestCycleSettingsMBean
+{
+	private final Application application;
+
+	/**
+	 * Create.
+	 * 
+	 * @param application
+	 */
+	public RequestCycleSettings(final Application application)
+	{
+		this.application = application;
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.RequestCycleSettingsMBean#getBufferResponse()
+	 */
+	@Override
+	public boolean getBufferResponse()
+	{
+		return application.getRequestCycleSettings().getBufferResponse();
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.RequestCycleSettingsMBean#getGatherExtendedBrowserInfo()
+	 */
+	@Override
+	public boolean getGatherExtendedBrowserInfo()
+	{
+		return application.getRequestCycleSettings().getGatherExtendedBrowserInfo();
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.RequestCycleSettingsMBean#getResponseRequestEncoding()
+	 */
+	@Override
+	public String getResponseRequestEncoding()
+	{
+		return application.getRequestCycleSettings().getResponseRequestEncoding();
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.RequestCycleSettingsMBean#getTimeout()
+	 */
+	@Override
+	public String getTimeout()
+	{
+		return application.getRequestCycleSettings().getTimeout().toString();
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.RequestCycleSettingsMBean#setBufferResponse(boolean)
+	 */
+	@Override
+	public void setBufferResponse(final boolean bufferResponse)
+	{
+		application.getRequestCycleSettings().setBufferResponse(bufferResponse);
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.RequestCycleSettingsMBean#setGatherExtendedBrowserInfo(boolean)
+	 */
+	@Override
+	public void setGatherExtendedBrowserInfo(final boolean gatherExtendedBrowserInfo)
+	{
+		application.getRequestCycleSettings().setGatherExtendedBrowserInfo(
+			gatherExtendedBrowserInfo);
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.RequestCycleSettingsMBean#setResponseRequestEncoding(java.lang.String)
+	 */
+	@Override
+	public void setResponseRequestEncoding(final String responseRequestEncoding)
+	{
+		application.getRequestCycleSettings().setResponseRequestEncoding(responseRequestEncoding);
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.RequestCycleSettingsMBean#setTimeout(java.lang.String)
+	 */
+	@Override
+	public void setTimeout(final String timeout)
+	{
+		application.getRequestCycleSettings().setTimeout(Duration.valueOf(timeout));
+	}
+
+	@Override
+	public void setExceptionRetryCount(int retries)
+	{
+		application.getRequestCycleSettings().setExceptionRetryCount(retries);
+	}
+
+	@Override
+	public int getExceptionRetryCount()
+	{
+		return application.getRequestCycleSettings().getExceptionRetryCount();
+	}
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/RequestLogger.java
----------------------------------------------------------------------
diff --git a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/RequestLogger.java b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/RequestLogger.java
new file mode 100644
index 0000000..90e234f
--- /dev/null
+++ b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/RequestLogger.java
@@ -0,0 +1,168 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wicket.jmx.wrapper;
+
+import java.io.IOException;
+
+import org.apache.wicket.Application;
+import org.apache.wicket.jmx.RequestLoggerMBean;
+import org.apache.wicket.protocol.http.WebApplication;
+
+
+/**
+ * Exposes {@link org.apache.wicket.protocol.http.RequestLogger} for JMX.
+ * 
+ * @author eelcohillenius
+ */
+public class RequestLogger implements RequestLoggerMBean
+{
+	private final Application application;
+
+	private final WebApplication webApplication;
+
+	/**
+	 * Construct.
+	 * 
+	 * @param application
+	 *            The application
+	 */
+	public RequestLogger(final Application application)
+	{
+		this.application = application;
+
+		// do this so that we don't have to cast all the time
+		if (application instanceof WebApplication)
+		{
+			webApplication = (WebApplication)application;
+		}
+		else
+		{
+			webApplication = null;
+		}
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.RequestLoggerMBean#getNumberOfCreatedSessions()
+	 */
+	@Override
+	public Integer getNumberOfCreatedSessions() throws IOException
+	{
+		org.apache.wicket.protocol.http.IRequestLogger logger = getRequestLogger();
+		if (logger != null)
+		{
+			return logger.getTotalCreatedSessions();
+		}
+		return null;
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.RequestLoggerMBean#getNumberOfLiveSessions()
+	 */
+	@Override
+	public Integer getNumberOfLiveSessions() throws IOException
+	{
+		org.apache.wicket.protocol.http.IRequestLogger logger = getRequestLogger();
+		if (logger != null)
+		{
+			return logger.getLiveSessions().length;
+		}
+		return null;
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.RequestLoggerMBean#getPeakNumberOfSessions()
+	 */
+	@Override
+	public Integer getPeakNumberOfSessions() throws IOException
+	{
+		org.apache.wicket.protocol.http.IRequestLogger logger = getRequestLogger();
+		if (logger != null)
+		{
+			return logger.getPeakSessions();
+		}
+		return null;
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.RequestLoggerMBean#getNumberOfCurrentActiveRequests()
+	 */
+	@Override
+	public Integer getNumberOfCurrentActiveRequests() throws IOException
+	{
+		org.apache.wicket.protocol.http.IRequestLogger logger = getRequestLogger();
+		if (logger != null)
+		{
+			return Integer.valueOf(logger.getCurrentActiveRequestCount());
+		}
+		return null;
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.RequestLoggerMBean#getPeakNumberOfActiveRequests()
+	 */
+	@Override
+	public Integer getPeakNumberOfActiveRequests() throws IOException
+	{
+		org.apache.wicket.protocol.http.IRequestLogger logger = getRequestLogger();
+		if (logger != null)
+		{
+			return Integer.valueOf(logger.getPeakActiveRequestCount());
+		}
+		return null;
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.RequestLoggerMBean#restart()
+	 */
+	@Override
+	public void restart() throws IOException
+	{
+		if (webApplication != null)
+		{
+			webApplication.getRequestLoggerSettings().setRequestLoggerEnabled(false);
+			webApplication.getRequestLogger();
+			webApplication.getRequestLoggerSettings().setRequestLoggerEnabled(true);
+		}
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.RequestLoggerMBean#stop()
+	 */
+	@Override
+	public void stop() throws IOException
+	{
+		if (webApplication != null)
+		{
+			webApplication.getRequestLoggerSettings().setRequestLoggerEnabled(false);
+		}
+	}
+
+	/**
+	 * Gets the request logger for this application.
+	 * 
+	 * @return The request logger or null if no request is active, or if this is not a web
+	 *         application
+	 */
+	protected org.apache.wicket.protocol.http.IRequestLogger getRequestLogger()
+	{
+		if (application instanceof WebApplication)
+		{
+			return application.getRequestLogger();
+		}
+		return null;
+	}
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/ResourceSettings.java
----------------------------------------------------------------------
diff --git a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/ResourceSettings.java b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/ResourceSettings.java
new file mode 100644
index 0000000..b03de01
--- /dev/null
+++ b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/ResourceSettings.java
@@ -0,0 +1,165 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wicket.jmx.wrapper;
+
+import java.util.List;
+
+import org.apache.wicket.Application;
+import org.apache.wicket.jmx.ResourceSettingsMBean;
+import org.apache.wicket.resource.loader.IStringResourceLoader;
+import org.apache.wicket.util.file.IResourceFinder;
+import org.apache.wicket.util.lang.Generics;
+import org.apache.wicket.util.time.Duration;
+
+
+/**
+ * Exposes Application related functionality for JMX.
+ * 
+ * @author eelcohillenius
+ */
+public class ResourceSettings implements ResourceSettingsMBean
+{
+	private final Application application;
+
+	/**
+	 * Create.
+	 * 
+	 * @param application
+	 */
+	public ResourceSettings(final Application application)
+	{
+		this.application = application;
+	}
+
+	/**
+	 * {@inheritDoc}
+	 */
+	@Override
+	public String getLocalizer()
+	{
+		return Stringz.className(application.getResourceSettings().getLocalizer());
+	}
+
+	/**
+	 * {@inheritDoc}
+	 */
+	@Override
+	public String getPackageResourceGuard()
+	{
+		return Stringz.className(application.getResourceSettings().getPackageResourceGuard());
+	}
+
+	/**
+	 * {@inheritDoc}
+	 */
+	@Override
+	public String getPropertiesFactory()
+	{
+		return Stringz.className(application.getResourceSettings().getPropertiesFactory());
+	}
+
+	/**
+	 * {@inheritDoc}
+	 */
+	@Override
+	public String getResourceFinders()
+	{
+		StringBuilder builder = new StringBuilder();
+		for (IResourceFinder rf : application.getResourceSettings().getResourceFinders())
+		{
+			builder.append(Stringz.className(rf));
+		}
+		return builder.toString();
+	}
+
+	/**
+	 * {@inheritDoc}
+	 */
+	@Override
+	public String getResourcePollFrequency()
+	{
+		Duration duration = application.getResourceSettings().getResourcePollFrequency();
+		return (duration != null) ? duration.toString() : null;
+	}
+
+	/**
+	 * {@inheritDoc}
+	 */
+	@Override
+	public String getResourceStreamLocator()
+	{
+		return Stringz.className(application.getResourceSettings().getResourceStreamLocator());
+	}
+
+	/**
+	 * {@inheritDoc}
+	 */
+	@Override
+	public String[] getStringResourceLoaders()
+	{
+		List<IStringResourceLoader> loaders = application.getResourceSettings()
+			.getStringResourceLoaders();
+		if (loaders != null)
+		{
+			List<String> list = Generics.newArrayList();
+			for (Object loader : loaders)
+			{
+				list.add(loader.toString());
+			}
+			return list.toArray(new String[loaders.size()]);
+		}
+		return null;
+	}
+
+	/**
+	 * {@inheritDoc}
+	 */
+	@Override
+	public boolean getThrowExceptionOnMissingResource()
+	{
+		return application.getResourceSettings().getThrowExceptionOnMissingResource();
+	}
+
+	/**
+	 * {@inheritDoc}
+	 */
+	@Override
+	public boolean getUseDefaultOnMissingResource()
+	{
+		return application.getResourceSettings().getUseDefaultOnMissingResource();
+	}
+
+	/**
+	 * {@inheritDoc}
+	 */
+	@Override
+	public void setThrowExceptionOnMissingResource(final boolean throwExceptionOnMissingResource)
+	{
+		application.getResourceSettings().setThrowExceptionOnMissingResource(
+			throwExceptionOnMissingResource);
+	}
+
+	/**
+	 * {@inheritDoc}
+	 */
+	@Override
+	public void setUseDefaultOnMissingResource(final boolean useDefaultOnMissingResource)
+	{
+		application.getResourceSettings().setUseDefaultOnMissingResource(
+			useDefaultOnMissingResource);
+	}
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/SecuritySettings.java
----------------------------------------------------------------------
diff --git a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/SecuritySettings.java b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/SecuritySettings.java
new file mode 100644
index 0000000..67a8748
--- /dev/null
+++ b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/SecuritySettings.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wicket.jmx.wrapper;
+
+import org.apache.wicket.Application;
+import org.apache.wicket.jmx.SecuritySettingsMBean;
+
+/**
+ * Exposes Application related functionality for JMX.
+ * 
+ * @author eelcohillenius
+ */
+public class SecuritySettings implements SecuritySettingsMBean
+{
+	private final Application application;
+
+	/**
+	 * Create.
+	 * 
+	 * @param application
+	 */
+	public SecuritySettings(final Application application)
+	{
+		this.application = application;
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.SecuritySettingsMBean#getAuthorizationStrategy()
+	 */
+	@Override
+	public String getAuthorizationStrategy()
+	{
+		return Stringz.className(application.getSecuritySettings().getAuthorizationStrategy());
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.SecuritySettingsMBean#getCryptFactory()
+	 */
+	@Override
+	public String getCryptFactory()
+	{
+		return Stringz.className(application.getSecuritySettings().getCryptFactory());
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.SecuritySettingsMBean#getUnauthorizedComponentInstantiationListener()
+	 */
+	@Override
+	public String getUnauthorizedComponentInstantiationListener()
+	{
+		return Stringz.className(application.getSecuritySettings()
+			.getUnauthorizedComponentInstantiationListener());
+	}
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/SessionSettings.java
----------------------------------------------------------------------
diff --git a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/SessionSettings.java b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/SessionSettings.java
new file mode 100644
index 0000000..f235ab6
--- /dev/null
+++ b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/SessionSettings.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wicket.jmx.wrapper;
+
+import org.apache.wicket.Application;
+import org.apache.wicket.jmx.SessionSettingsMBean;
+
+/**
+ * Exposes Application related functionality for JMX.
+ * 
+ * @author eelcohillenius
+ */
+public class SessionSettings implements SessionSettingsMBean
+{
+	private final Application application;
+
+	/**
+	 * Create.
+	 * 
+	 * @param application
+	 */
+	public SessionSettings(final Application application)
+	{
+		this.application = application;
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.SessionSettingsMBean#getPageFactory()
+	 */
+	@Override
+	public String getPageFactory()
+	{
+		return Stringz.className(application.getPageFactory());
+	}
+
+	/**
+	 * @see org.apache.wicket.jmx.SessionSettingsMBean#getSessionStore()
+	 */
+	@Override
+	public String getSessionStore()
+	{
+		return Stringz.className(application.getSessionStore());
+	}
+}


Re: [2/3] git commit: use proxies for mbeans, so application is set on thread automatically

Posted by Martin Grigorov <mg...@apache.org>.
Thanks for migrating the 'mbeanview' WicketStuff project !

Martin Grigorov
Wicket Training and Consulting


On Mon, Mar 24, 2014 at 12:04 PM, Sven Meier <sv...@meiers.net> wrote:

> Hi Martin,
>
> I have to confess that's a little bit 'hackish' ;).
>
> Background information:
> When working on wicketstuff-jm-xpanel, I added wicket-jmx to the project's
> dependency. This way I could test it on Wicket's own Jmx beans.
> But wicket-jms was setting *and* clearing the thread bound application
> object in two of its methods. This lead to an exception when rendering
> JmxPanel, because the application was no longer attached to the thread
> after calling into some JMX beans.
>
> So I made access to the application transparent in wicket-jmx:
> Before a method of the JMX bean is called, the proxy will initialize the
> application reference and clean it up afterwards, *if* it wasn't already
> set before the call.
>
> Have fun
> Sven
>
>
> On 03/24/2014 10:46 AM, Martin Grigorov wrote:
>
>> OK. Debugging showed where I was in mistake.
>> The passed 'o' object is actually the XysSettingsMBean wrapper/impl, so it
>> implements interface XyzSettingsMBean
>>
>> All is fine.
>> Sorry for the noise.
>>
>> Martin Grigorov
>> Wicket Training and Consulting
>>
>>
>> On Mon, Mar 24, 2014 at 10:08 AM, Martin Grigorov <mgrigorov@apache.org
>> >wrote:
>>
>>  Hi Sven,
>>>
>>>
>>> On Fri, Mar 21, 2014 at 5:48 PM, <sv...@apache.org> wrote:
>>>
>>>  use proxies for mbeans, so application is set on thread automatically
>>>>
>>>> Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
>>>> Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/fea2b8e4
>>>> Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/fea2b8e4
>>>> Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/fea2b8e4
>>>>
>>>> Branch: refs/heads/master
>>>> Commit: fea2b8e4e0feb6a7374bcfe6de2da5d1a2feba20
>>>> Parents: 329b945
>>>> Author: svenmeier <sv...@meiers.net>
>>>> Authored: Fri Mar 21 16:39:29 2014 +0100
>>>> Committer: svenmeier <sv...@meiers.net>
>>>> Committed: Fri Mar 21 16:39:29 2014 +0100
>>>>
>>>> ----------------------------------------------------------------------
>>>>   wicket-jmx/pom.xml                              |   8 +
>>>>   .../java/org/apache/wicket/jmx/Application.java | 113 ------------
>>>>   .../apache/wicket/jmx/ApplicationSettings.java  | 101 -----------
>>>>   .../org/apache/wicket/jmx/DebugSettings.java    | 164
>>>> ------------------
>>>>   .../java/org/apache/wicket/jmx/Initializer.java | 111 +++++++++---
>>>>   .../org/apache/wicket/jmx/MarkupSettings.java   | 128 --------------
>>>>   .../apache/wicket/jmx/MarkupSettingsMBean.java  |   2 +
>>>>   .../org/apache/wicket/jmx/PageSettings.java     |  56 ------
>>>>   .../apache/wicket/jmx/RequestCycleSettings.java | 125 --------------
>>>>   .../org/apache/wicket/jmx/RequestLogger.java    | 166
>>>> ------------------
>>>>   .../org/apache/wicket/jmx/ResourceSettings.java | 173
>>>> -------------------
>>>>   .../org/apache/wicket/jmx/SecuritySettings.java |  65 -------
>>>>   .../org/apache/wicket/jmx/SessionSettings.java  |  55 ------
>>>>   .../org/apache/wicket/jmx/StoreSettings.java    |  68 --------
>>>>   .../java/org/apache/wicket/jmx/Stringz.java     |  25 ---
>>>>   .../apache/wicket/jmx/wrapper/Application.java  | 104 +++++++++++
>>>>   .../wicket/jmx/wrapper/ApplicationSettings.java | 103 +++++++++++
>>>>   .../wicket/jmx/wrapper/DebugSettings.java       | 167
>>>> ++++++++++++++++++
>>>>   .../wicket/jmx/wrapper/MarkupSettings.java      | 131 ++++++++++++++
>>>>   .../apache/wicket/jmx/wrapper/PageSettings.java |  59 +++++++
>>>>   .../jmx/wrapper/RequestCycleSettings.java       | 127 ++++++++++++++
>>>>   .../wicket/jmx/wrapper/RequestLogger.java       | 168
>>>> ++++++++++++++++++
>>>>   .../wicket/jmx/wrapper/ResourceSettings.java    | 165
>>>> ++++++++++++++++++
>>>>   .../wicket/jmx/wrapper/SecuritySettings.java    |  68 ++++++++
>>>>   .../wicket/jmx/wrapper/SessionSettings.java     |  58 +++++++
>>>>   .../wicket/jmx/wrapper/StoreSettings.java       |  69 ++++++++
>>>>   .../org/apache/wicket/jmx/wrapper/Stringz.java  |  25 +++
>>>>   27 files changed, 1340 insertions(+), 1264 deletions(-)
>>>> ----------------------------------------------------------------------
>>>>
>>>>
>>>>
>>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/
>>>> fea2b8e4/wicket-jmx/pom.xml
>>>> ----------------------------------------------------------------------
>>>> diff --git a/wicket-jmx/pom.xml b/wicket-jmx/pom.xml
>>>> index 9bc5a08..c58cb06 100644
>>>> --- a/wicket-jmx/pom.xml
>>>> +++ b/wicket-jmx/pom.xml
>>>> @@ -32,6 +32,14 @@
>>>>                          <groupId>org.apache.wicket</groupId>
>>>>                          <artifactId>wicket-core</artifactId>
>>>>                  </dependency>
>>>> +               <dependency>
>>>> +                       <groupId>cglib</groupId>
>>>> +                       <artifactId>cglib</artifactId>
>>>> +               </dependency>
>>>> +<!--   <dependency>
>>>> +                       <groupId>org.ow2.asm</groupId>
>>>> +                       <artifactId>asm-util</artifactId>
>>>> +               </dependency> -->
>>>>          </dependencies>
>>>>          <build>
>>>>                  <pluginManagement>
>>>>
>>>>
>>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/
>>>> fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/
>>>> Application.java
>>>> ----------------------------------------------------------------------
>>>> diff --git
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/Application.java
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/Application.java
>>>> deleted file mode 100644
>>>> index 5eaa003..0000000
>>>> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/Application.java
>>>> +++ /dev/null
>>>> @@ -1,113 +0,0 @@
>>>> -/*
>>>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>>>> - * contributor license agreements.  See the NOTICE file distributed
>>>> with
>>>> - * this work for additional information regarding copyright ownership.
>>>> - * The ASF licenses this file to You under the Apache License, Version
>>>> 2.0
>>>> - * (the "License"); you may not use this file except in compliance with
>>>> - * the License.  You may obtain a copy of the License at
>>>> - *
>>>> - *      http://www.apache.org/licenses/LICENSE-2.0
>>>> - *
>>>> - * Unless required by applicable law or agreed to in writing, software
>>>> - * distributed under the License is distributed on an "AS IS" BASIS,
>>>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>> implied.
>>>> - * See the License for the specific language governing permissions and
>>>> - * limitations under the License.
>>>> - */
>>>> -package org.apache.wicket.jmx;
>>>> -
>>>> -import java.io.IOException;
>>>> -
>>>> -import org.apache.wicket.ThreadContext;
>>>> -
>>>> -/**
>>>> - * Exposes Application related functionality for JMX.
>>>> - *
>>>> - * @author eelcohillenius
>>>> - */
>>>> -public class Application implements ApplicationMBean
>>>> -{
>>>> -       private final org.apache.wicket.Application application;
>>>> -
>>>> -       /**
>>>> -        * Create.
>>>> -        *
>>>> -        * @param application
>>>> -        */
>>>> -       public Application(final org.apache.wicket.Application
>>>> application)
>>>> -       {
>>>> -               this.application = application;
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see org.apache.wicket.jmx.ApplicationMBean#
>>>> clearMarkupCache()
>>>> -        */
>>>> -       @Override
>>>> -       public void clearMarkupCache() throws IOException
>>>> -       {
>>>> -
>>>> application.getMarkupSettings().getMarkupFactory().
>>>> getMarkupCache().clear();
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.ApplicationMBean#getApplicationClass()
>>>> -        */
>>>> -       @Override
>>>> -       public String getApplicationClass() throws IOException
>>>> -       {
>>>> -               return application.getClass().getName();
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.ApplicationMBean#getConfigurationType()
>>>> -        */
>>>> -       @Override
>>>> -       public String getConfigurationType()
>>>> -       {
>>>> -               return application.getConfigurationType().name();
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see org.apache.wicket.jmx.ApplicationMBean#
>>>> getHomePageClass()
>>>> -        */
>>>> -       @Override
>>>> -       public String getHomePageClass() throws IOException
>>>> -       {
>>>> -               return application.getHomePage().getName();
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.ApplicationMBean#getMarkupCacheSize()
>>>> -        */
>>>> -       @Override
>>>> -       public int getMarkupCacheSize() throws IOException
>>>> -       {
>>>> -               ThreadContext.setApplication(application);
>>>> -
>>>> -               try
>>>> -               {
>>>> -                       return
>>>> application.getMarkupSettings().getMarkupFactory().
>>>> getMarkupCache().size();
>>>> -               }
>>>> -               finally
>>>> -               {
>>>> -                       ThreadContext.detach();
>>>> -               }
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see org.apache.wicket.jmx.ApplicationMBean#
>>>> getWicketVersion()
>>>> -        */
>>>> -       @Override
>>>> -       public String getWicketVersion() throws IOException
>>>> -       {
>>>> -               return application.getFrameworkSettings().getVersion();
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.ApplicationMBean#clearLocalizerCache()
>>>> -        */
>>>> -       @Override
>>>> -       public void clearLocalizerCache() throws IOException
>>>> -       {
>>>> -
>>>> application.getResourceSettings().getLocalizer().clearCache();
>>>> -       }
>>>> -}
>>>>
>>>>
>>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/
>>>> fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/
>>>> ApplicationSettings.java
>>>> ----------------------------------------------------------------------
>>>> diff --git
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/
>>>> ApplicationSettings.java
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/
>>>> ApplicationSettings.java
>>>> deleted file mode 100644
>>>> index 52c8e0b..0000000
>>>> ---
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/
>>>> ApplicationSettings.java
>>>> +++ /dev/null
>>>> @@ -1,101 +0,0 @@
>>>> -/*
>>>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>>>> - * contributor license agreements.  See the NOTICE file distributed
>>>> with
>>>> - * this work for additional information regarding copyright ownership.
>>>> - * The ASF licenses this file to You under the Apache License, Version
>>>> 2.0
>>>> - * (the "License"); you may not use this file except in compliance with
>>>> - * the License.  You may obtain a copy of the License at
>>>> - *
>>>> - *      http://www.apache.org/licenses/LICENSE-2.0
>>>> - *
>>>> - * Unless required by applicable law or agreed to in writing, software
>>>> - * distributed under the License is distributed on an "AS IS" BASIS,
>>>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>> implied.
>>>> - * See the License for the specific language governing permissions and
>>>> - * limitations under the License.
>>>> - */
>>>> -package org.apache.wicket.jmx;
>>>> -
>>>> -import org.apache.wicket.util.lang.Bytes;
>>>> -import org.apache.wicket.util.lang.Classes;
>>>> -
>>>> -/**
>>>> - * Exposes Application related functionality for JMX.
>>>> - *
>>>> - * @author eelcohillenius
>>>> - */
>>>> -public class ApplicationSettings implements ApplicationSettingsMBean
>>>> -{
>>>> -       private final org.apache.wicket.Application application;
>>>> -
>>>> -       /**
>>>> -        * Create.
>>>> -        *
>>>> -        * @param application
>>>> -        */
>>>> -       public ApplicationSettings(final org.apache.wicket.Application
>>>> application)
>>>> -       {
>>>> -               this.application = application;
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.ApplicationSettingsMBean#getAccessDeniedPage()
>>>> -        */
>>>> -       @Override
>>>> -       public String getAccessDeniedPage()
>>>> -       {
>>>> -               return
>>>> Classes.name(application.getApplicationSettings().
>>>> getAccessDeniedPage());
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.ApplicationSettingsMBean#getClassResolver()
>>>> -        */
>>>> -       @Override
>>>> -       public String getClassResolver()
>>>> -       {
>>>> -               return
>>>> Stringz.className(application.getApplicationSettings().
>>>> getClassResolver());
>>>> -       }
>>>> -
>>>> -       @Override
>>>> -       public String getDefaultMaximumUploadSize()
>>>> -       {
>>>> -               return
>>>> application.getApplicationSettings().getDefaultMaximumUploadSize().
>>>> toString();
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.ApplicationSettingsMBean#getInternalErrorPage()
>>>> -        */
>>>> -       @Override
>>>> -       public String getInternalErrorPage()
>>>> -       {
>>>> -               return
>>>> Classes.name(application.getApplicationSettings().
>>>> getInternalErrorPage());
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.ApplicationSettingsMBean#
>>>> getPageExpiredErrorPage()
>>>> -        */
>>>> -       @Override
>>>> -       public String getPageExpiredErrorPage()
>>>> -       {
>>>> -               return
>>>> Classes.name(application.getApplicationSettings().
>>>> getPageExpiredErrorPage());
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.ApplicationSettingsMBean#
>>>> getUnexpectedExceptionDisplay()
>>>> -        */
>>>> -       @Override
>>>> -       public String getUnexpectedExceptionDisplay()
>>>> -       {
>>>> -               return
>>>> application.getExceptionSettings().getUnexpectedExceptionDisplay(
>>>> ).toString();
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.ApplicationSettingsMBean#
>>>> setDefaultMaximumUploadSize(java.lang.String)
>>>> -        */
>>>> -       @Override
>>>> -       public void setDefaultMaximumUploadSize(final String
>>>> defaultUploadSize)
>>>> -       {
>>>> -
>>>> application.getApplicationSettings().setDefaultMaximumUploadSize(
>>>> -                       Bytes.valueOf(defaultUploadSize));
>>>> -       }
>>>> -}
>>>>
>>>>
>>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/
>>>> fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/
>>>> DebugSettings.java
>>>> ----------------------------------------------------------------------
>>>> diff --git
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/DebugSettings.java
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/DebugSettings.java
>>>> deleted file mode 100644
>>>> index 0055dcf..0000000
>>>> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/DebugSettings.java
>>>> +++ /dev/null
>>>> @@ -1,164 +0,0 @@
>>>> -/*
>>>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>>>> - * contributor license agreements.  See the NOTICE file distributed
>>>> with
>>>> - * this work for additional information regarding copyright ownership.
>>>> - * The ASF licenses this file to You under the Apache License, Version
>>>> 2.0
>>>> - * (the "License"); you may not use this file except in compliance with
>>>> - * the License.  You may obtain a copy of the License at
>>>> - *
>>>> - *      http://www.apache.org/licenses/LICENSE-2.0
>>>> - *
>>>> - * Unless required by applicable law or agreed to in writing, software
>>>> - * distributed under the License is distributed on an "AS IS" BASIS,
>>>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>> implied.
>>>> - * See the License for the specific language governing permissions and
>>>> - * limitations under the License.
>>>> - */
>>>> -package org.apache.wicket.jmx;
>>>> -
>>>> -/**
>>>> - * Exposes Application related functionality for JMX.
>>>> - *
>>>> - * @author eelcohillenius
>>>> - */
>>>> -public class DebugSettings implements DebugSettingsMBean
>>>> -{
>>>> -       private final org.apache.wicket.Application application;
>>>> -
>>>> -       /**
>>>> -        * Create.
>>>> -        *
>>>> -        * @param application
>>>> -        */
>>>> -       public DebugSettings(final org.apache.wicket.Application
>>>> application)
>>>> -       {
>>>> -               this.application = application;
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.DebugSettingsMBean#getComponentUseCheck()
>>>> -        */
>>>> -       @Override
>>>> -       public boolean getComponentUseCheck()
>>>> -       {
>>>> -               return
>>>> application.getDebugSettings().getComponentUseCheck();
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.DebugSettingsMBean#isAjaxDebugModeEnabled()
>>>> -        */
>>>> -       @Override
>>>> -       public boolean isAjaxDebugModeEnabled()
>>>> -       {
>>>> -               return
>>>> application.getDebugSettings().isAjaxDebugModeEnabled();
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.DebugSettingsMBean#setAjaxDebugModeEnabled(
>>>> boolean)
>>>> -        */
>>>> -       @Override
>>>> -       public void setAjaxDebugModeEnabled(final boolean enable)
>>>> -       {
>>>> -
>>>> application.getDebugSettings().setAjaxDebugModeEnabled(enable);
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.DebugSettingsMBean#setComponentUseCheck(boolean)
>>>> -        */
>>>> -       @Override
>>>> -       public void setComponentUseCheck(final boolean check)
>>>> -       {
>>>> -
>>>> application.getDebugSettings().setComponentUseCheck(check);
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.DebugSettingsMBean#setOutputComponentPath(
>>>> boolean)
>>>> -        */
>>>> -       @Override
>>>> -       public void setOutputComponentPath(final boolean enabled)
>>>> -       {
>>>> -
>>>> application.getDebugSettings().setOutputComponentPath(enabled);
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.DebugSettingsMBean#isOutputComponentPath()
>>>> -        */
>>>> -       @Override
>>>> -       public boolean isOutputComponentPath()
>>>> -       {
>>>> -               return
>>>> application.getDebugSettings().isOutputComponentPath();
>>>> -       }
>>>> -
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.DebugSettingsMBean#setOutputMarkupContainerClassN
>>>> ame(boolean)
>>>> -        */
>>>> -       @Override
>>>> -       public void setOutputMarkupContainerClassName(final boolean
>>>> enable)
>>>> -       {
>>>> -
>>>> application.getDebugSettings().setOutputMarkupContainerClassN
>>>> ame(enable);
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.DebugSettingsMBean#isOutputMarkupContainerClassNa
>>>> me()
>>>> -        */
>>>> -       @Override
>>>> -       public boolean isOutputMarkupContainerClassName()
>>>> -       {
>>>> -               return
>>>> application.getDebugSettings().isOutputMarkupContainerClassName();
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.DebugSettingsMBean#isLinePreciseReportingOnAddCom
>>>> ponentEnabled()
>>>> -        */
>>>> -       @Override
>>>> -       public boolean isLinePreciseReportingOnAddComponentEnabled()
>>>> -       {
>>>> -               return
>>>> application.getDebugSettings().isLinePreciseReportingOnAddCom
>>>> ponentEnabled();
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.DebugSettingsMBean#setLinePreciseReportingOnAddCo
>>>> mponentEnabled(boolean)
>>>> -        */
>>>> -       @Override
>>>> -       public void setLinePreciseReportingOnAddComponentEnabled(final
>>>> boolean enable)
>>>> -       {
>>>> -
>>>> application.getDebugSettings().setLinePreciseReportingOnAddCo
>>>> mponentEnabled(enable);
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.DebugSettingsMBean#isLinePreciseReportingOnNewCom
>>>> ponentEnabled()
>>>> -        */
>>>> -       @Override
>>>> -       public boolean isLinePreciseReportingOnNewComponentEnabled()
>>>> -       {
>>>> -               return
>>>> application.getDebugSettings().isLinePreciseReportingOnNewCom
>>>> ponentEnabled();
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.DebugSettingsMBean#setLinePreciseReportingOnNewCo
>>>> mponentEnabled(boolean)
>>>> -        */
>>>> -       @Override
>>>> -       public void setLinePreciseReportingOnNewComponentEnabled(final
>>>> boolean enable)
>>>> -       {
>>>> -
>>>> application.getDebugSettings().setLinePreciseReportingOnNewCo
>>>> mponentEnabled(enable);
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.DebugSettingsMBean#setDevelopmentUtilitiesEnabled
>>>> (boolean)
>>>> -        */
>>>> -       @Override
>>>> -       public void setDevelopmentUtilitiesEnabled(final boolean
>>>> enable)
>>>> -       {
>>>> -
>>>> application.getDebugSettings().setDevelopmentUtilitiesEnabled(enable);
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.DebugSettingsMBean#isDevelopmentUtilitiesEnabled(
>>>> )
>>>> -        */
>>>> -       @Override
>>>> -       public boolean isDevelopmentUtilitiesEnabled()
>>>> -       {
>>>> -               return
>>>> application.getDebugSettings().isDevelopmentUtilitiesEnabled();
>>>> -       }
>>>> -}
>>>>
>>>>
>>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/
>>>> fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/
>>>> Initializer.java
>>>> ----------------------------------------------------------------------
>>>> diff --git
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/Initializer.java
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/Initializer.java
>>>> index 77aaa2d..27f4c33 100644
>>>> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/Initializer.java
>>>> +++ b/wicket-jmx/src/main/java/org/apache/wicket/jmx/Initializer.java
>>>> @@ -17,6 +17,7 @@
>>>>   package org.apache.wicket.jmx;
>>>>
>>>>   import java.lang.management.ManagementFactory;
>>>> +import java.lang.reflect.Method;
>>>>   import java.util.ArrayList;
>>>>   import java.util.List;
>>>>
>>>> @@ -29,8 +30,24 @@ import javax.management.
>>>> MalformedObjectNameException;
>>>>   import javax.management.NotCompliantMBeanException;
>>>>   import javax.management.ObjectName;
>>>>
>>>> +import net.sf.cglib.core.DefaultNamingPolicy;
>>>> +import net.sf.cglib.core.Predicate;
>>>> +import net.sf.cglib.proxy.Enhancer;
>>>> +
>>>>   import org.apache.wicket.IInitializer;
>>>> +import org.apache.wicket.ThreadContext;
>>>>   import org.apache.wicket.WicketRuntimeException;
>>>> +import org.apache.wicket.jmx.wrapper.Application;
>>>> +import org.apache.wicket.jmx.wrapper.ApplicationSettings;
>>>> +import org.apache.wicket.jmx.wrapper.DebugSettings;
>>>> +import org.apache.wicket.jmx.wrapper.MarkupSettings;
>>>> +import org.apache.wicket.jmx.wrapper.PageSettings;
>>>> +import org.apache.wicket.jmx.wrapper.RequestCycleSettings;
>>>> +import org.apache.wicket.jmx.wrapper.RequestLogger;
>>>> +import org.apache.wicket.jmx.wrapper.ResourceSettings;
>>>> +import org.apache.wicket.jmx.wrapper.SecuritySettings;
>>>> +import org.apache.wicket.jmx.wrapper.SessionSettings;
>>>> +import org.apache.wicket.jmx.wrapper.StoreSettings;
>>>>   import org.slf4j.Logger;
>>>>   import org.slf4j.LoggerFactory;
>>>>
>>>> @@ -172,30 +189,30 @@ public class Initializer implements IInitializer
>>>>                          domain = tempDomain;
>>>>
>>>>                          Application appBean = new
>>>> Application(application);
>>>> -                       register(appBean, appBeanName);
>>>> -
>>>> -                       register(new ApplicationSettings(application),
>>>> new ObjectName(domain +
>>>> -
>>>> ":type=Application,name=ApplicationSettings"));
>>>> -                       register(new DebugSettings(application), new
>>>> ObjectName(domain +
>>>> -                               ":type=Application,name=
>>>> DebugSettings"));
>>>> -                       register(new MarkupSettings(application), new
>>>> ObjectName(domain +
>>>> -                               ":type=Application,name=
>>>> MarkupSettings"));
>>>> -                       register(new ResourceSettings(application), new
>>>> ObjectName(domain +
>>>> -
>>>> ":type=Application,name=ResourceSettings"));
>>>> -                       register(new PageSettings(application), new
>>>> ObjectName(domain +
>>>> -                               ":type=Application,name=
>>>> PageSettings"));
>>>> -                       register(new RequestCycleSettings(application),
>>>> new ObjectName(domain +
>>>> -
>>>> ":type=Application,name=RequestCycleSettings"));
>>>> -                       register(new SecuritySettings(application), new
>>>> ObjectName(domain +
>>>> -
>>>> ":type=Application,name=SecuritySettings"));
>>>> -                       register(new SessionSettings(application), new
>>>> ObjectName(domain +
>>>> -
>>>> ":type=Application,name=SessionSettings"));
>>>> -                       register(new StoreSettings(application), new
>>>> ObjectName(domain +
>>>> -                               ":type=Application,name=
>>>> StoreSettings"));
>>>> +                       register(application, appBean, appBeanName);
>>>> +
>>>> +                       register(application, new
>>>> ApplicationSettings(application), new ObjectName(domain
>>>> +                               +
>>>> ":type=Application,name=ApplicationSettings"));
>>>> +                       register(application, new
>>>> DebugSettings(application), new ObjectName(domain
>>>> +                               +
>>>> ":type=Application,name=DebugSettings"));
>>>> +                       register(application, new
>>>> MarkupSettings(application), new ObjectName(domain
>>>> +                               +
>>>> ":type=Application,name=MarkupSettings"));
>>>> +                       register(application, new
>>>> ResourceSettings(application), new ObjectName(domain
>>>> +                               +
>>>> ":type=Application,name=ResourceSettings"));
>>>> +                       register(application, new
>>>> PageSettings(application), new ObjectName(domain
>>>> +                               + ":type=Application,name=
>>>> PageSettings"));
>>>> +                       register(application, new
>>>> RequestCycleSettings(application), new ObjectName(domain
>>>> +                               +
>>>> ":type=Application,name=RequestCycleSettings"));
>>>> +                       register(application, new
>>>> SecuritySettings(application), new ObjectName(domain
>>>> +                               +
>>>> ":type=Application,name=SecuritySettings"));
>>>> +                       register(application, new
>>>> SessionSettings(application), new ObjectName(domain
>>>> +                               +
>>>> ":type=Application,name=SessionSettings"));
>>>> +                       register(application, new
>>>> StoreSettings(application), new ObjectName(domain
>>>> +                               +
>>>> ":type=Application,name=StoreSettings"));
>>>>
>>>>                          RequestLogger sessionsBean = new
>>>> RequestLogger(application);
>>>>                          ObjectName sessionsBeanName = new
>>>> ObjectName(domain + ":type=RequestLogger");
>>>> -                       register(sessionsBean, sessionsBeanName);
>>>> +                       register(application, sessionsBean,
>>>> sessionsBeanName);
>>>>                  }
>>>>                  catch (MalformedObjectNameException e)
>>>>                  {
>>>> @@ -236,11 +253,55 @@ public class Initializer implements IInitializer
>>>>           * @throws MBeanRegistrationException
>>>>           * @throws InstanceAlreadyExistsException
>>>>           */
>>>> -       private void register(final Object o, final ObjectName
>>>> objectName)
>>>> -               throws InstanceAlreadyExistsException,
>>>> MBeanRegistrationException,
>>>> -               NotCompliantMBeanException
>>>> +       private void register(final org.apache.wicket.Application
>>>> application, final Object o,
>>>> +               final ObjectName objectName) throws
>>>> InstanceAlreadyExistsException,
>>>> +               MBeanRegistrationException, NotCompliantMBeanException
>>>>          {
>>>> -               mbeanServer.registerMBean(o, objectName);
>>>> +               Object proxy = createProxy(application, o);
>>>> +               mbeanServer.registerMBean(proxy, objectName);
>>>>                  registered.add(objectName);
>>>>          }
>>>> +
>>>> +       private Object createProxy(final org.apache.wicket.Application
>>>> application, final Object o)
>>>> +       {
>>>> +               Enhancer e = new Enhancer();
>>>> +               e.setInterfaces(o.getClass().getInterfaces());
>>>> +               e.setSuperclass(Object.class);
>>>>
>>>>  I'm sure you have tested it but the lines above look a bit weird.
>>> In Wicket 7.x all XyzSettings classes are Java classes and just few of
>>> them implement some interfaces.
>>> I have to test it but I think the JMX runtime won't be able to list the
>>> setters and getters of the MBean because the proxy has no knowledge of
>>> its
>>> delegate.
>>> The fix I have in mind is:  e.setSuperclass(o.getClass());
>>>
>>>
>>>  +               e.setCallback(new net.sf.cglib.proxy.
>>>> InvocationHandler()
>>>> +               {
>>>> +                       @Override
>>>> +                       public Object invoke(Object proxy, Method
>>>> method,
>>>> Object[] args) throws Throwable
>>>> +                       {
>>>> +                               boolean existed =
>>>> ThreadContext.exists();
>>>> +
>>>> +                               if (existed == false)
>>>> +                               {
>>>> +
>>>> ThreadContext.setApplication(application);
>>>> +                               }
>>>> +
>>>> +                               try
>>>> +                               {
>>>> +                                       return method.invoke(o, args);
>>>> +                               }
>>>> +                               finally
>>>> +                               {
>>>> +                                       if (existed == false)
>>>> +                                       {
>>>> +                                               ThreadContext.detach();
>>>> +                                       }
>>>> +                               }
>>>> +                       }
>>>> +               });
>>>> +               e.setNamingPolicy(new DefaultNamingPolicy()
>>>> +               {
>>>> +                       @Override
>>>> +                       public String getClassName(final String prefix,
>>>> final String source, final Object key,
>>>> +                               final Predicate names)
>>>> +                       {
>>>> +                               return
>>>> o.getClass().getName().replace(".wrapper", "");
>>>> +                       }
>>>> +               });
>>>> +
>>>> +               return e.create();
>>>> +       }
>>>>   }
>>>>
>>>>
>>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/
>>>> fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/
>>>> MarkupSettings.java
>>>> ----------------------------------------------------------------------
>>>> diff --git
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettings.java
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettings.java
>>>> deleted file mode 100644
>>>> index efa6048..0000000
>>>> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/
>>>> MarkupSettings.java
>>>> +++ /dev/null
>>>> @@ -1,128 +0,0 @@
>>>> -/*
>>>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>>>> - * contributor license agreements.  See the NOTICE file distributed
>>>> with
>>>> - * this work for additional information regarding copyright ownership.
>>>> - * The ASF licenses this file to You under the Apache License, Version
>>>> 2.0
>>>> - * (the "License"); you may not use this file except in compliance with
>>>> - * the License.  You may obtain a copy of the License at
>>>> - *
>>>> - *      http://www.apache.org/licenses/LICENSE-2.0
>>>> - *
>>>> - * Unless required by applicable law or agreed to in writing, software
>>>> - * distributed under the License is distributed on an "AS IS" BASIS,
>>>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>> implied.
>>>> - * See the License for the specific language governing permissions and
>>>> - * limitations under the License.
>>>> - */
>>>> -package org.apache.wicket.jmx;
>>>> -
>>>> -
>>>> -/**
>>>> - * Exposes Application related functionality for JMX.
>>>> - *
>>>> - * @author eelcohillenius
>>>> - */
>>>> -public class MarkupSettings implements MarkupSettingsMBean
>>>> -{
>>>> -       private final org.apache.wicket.Application application;
>>>> -
>>>> -       /**
>>>> -        * Create.
>>>> -        *
>>>> -        * @param application
>>>> -        */
>>>> -       public MarkupSettings(final org.apache.wicket.Application
>>>> application)
>>>> -       {
>>>> -               this.application = application;
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.MarkupSettingsMBean#getAutomaticLinking()
>>>> -        */
>>>> -       @Override
>>>> -       public boolean getAutomaticLinking()
>>>> -       {
>>>> -               return
>>>> application.getMarkupSettings().getAutomaticLinking();
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.MarkupSettingsMBean#getCompressWhitespace()
>>>> -        */
>>>> -       @Override
>>>> -       public boolean getCompressWhitespace()
>>>> -       {
>>>> -               return
>>>> application.getMarkupSettings().getCompressWhitespace();
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.MarkupSettingsMBean#getDefaultMarkupEncoding()
>>>> -        */
>>>> -       @Override
>>>> -       public String getDefaultMarkupEncoding()
>>>> -       {
>>>> -               return
>>>> application.getMarkupSettings().getDefaultMarkupEncoding();
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.MarkupSettingsMBean#getStripComments()
>>>> -        */
>>>> -       @Override
>>>> -       public boolean getStripComments()
>>>> -       {
>>>> -               return application.getMarkupSettings(
>>>> ).getStripComments();
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.MarkupSettingsMBean#getStripWicketTags()
>>>> -        */
>>>> -       @Override
>>>> -       public boolean getStripWicketTags()
>>>> -       {
>>>> -               return
>>>> application.getMarkupSettings().getStripWicketTags();
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.MarkupSettingsMBean#setAutomaticLinking(boolean)
>>>> -        */
>>>> -       @Override
>>>> -       public void setAutomaticLinking(final boolean automaticLinking)
>>>> -       {
>>>> -
>>>> application.getMarkupSettings().setAutomaticLinking(automaticLinking);
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.MarkupSettingsMBean#
>>>> setCompressWhitespace(boolean)
>>>> -        */
>>>> -       @Override
>>>> -       public void setCompressWhitespace(final boolean
>>>> compressWhitespace)
>>>> -       {
>>>> -
>>>> application.getMarkupSettings().setCompressWhitespace(
>>>> compressWhitespace);
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.MarkupSettingsMBean#
>>>> setDefaultMarkupEncoding(java.lang.String)
>>>> -        */
>>>> -       @Override
>>>> -       public void setDefaultMarkupEncoding(final String encoding)
>>>> -       {
>>>> -
>>>> application.getMarkupSettings().setDefaultMarkupEncoding(encoding);
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.MarkupSettingsMBean#setStripComments(boolean)
>>>> -        */
>>>> -       @Override
>>>> -       public void setStripComments(final boolean stripComments)
>>>> -       {
>>>> -
>>>> application.getMarkupSettings().setStripComments(stripComments);
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.MarkupSettingsMBean#setStripWicketTags(boolean)
>>>> -        */
>>>> -       @Override
>>>> -       public void setStripWicketTags(final boolean stripWicketTags)
>>>> -       {
>>>> -
>>>> application.getMarkupSettings().setStripWicketTags(stripWicketTags);
>>>> -       }
>>>> -}
>>>>
>>>>
>>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/
>>>> fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/
>>>> MarkupSettingsMBean.java
>>>> ----------------------------------------------------------------------
>>>> diff --git
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/
>>>> MarkupSettingsMBean.java
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/
>>>> MarkupSettingsMBean.java
>>>> index 91f2b23..df0d25d 100644
>>>> ---
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/
>>>> MarkupSettingsMBean.java
>>>> +++
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/
>>>> MarkupSettingsMBean.java
>>>> @@ -16,6 +16,8 @@
>>>>    */
>>>>   package org.apache.wicket.jmx;
>>>>
>>>> +import org.apache.wicket.jmx.wrapper.MarkupSettings;
>>>> +
>>>>   /**
>>>>    * Markup settings.
>>>>    *
>>>>
>>>>
>>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/
>>>> fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/
>>>> PageSettings.java
>>>> ----------------------------------------------------------------------
>>>> diff --git
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/PageSettings.java
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/PageSettings.java
>>>> deleted file mode 100644
>>>> index b91b1e7..0000000
>>>> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/PageSettings.java
>>>> +++ /dev/null
>>>> @@ -1,56 +0,0 @@
>>>> -/*
>>>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>>>> - * contributor license agreements.  See the NOTICE file distributed
>>>> with
>>>> - * this work for additional information regarding copyright ownership.
>>>> - * The ASF licenses this file to You under the Apache License, Version
>>>> 2.0
>>>> - * (the "License"); you may not use this file except in compliance with
>>>> - * the License.  You may obtain a copy of the License at
>>>> - *
>>>> - *      http://www.apache.org/licenses/LICENSE-2.0
>>>> - *
>>>> - * Unless required by applicable law or agreed to in writing, software
>>>> - * distributed under the License is distributed on an "AS IS" BASIS,
>>>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>> implied.
>>>> - * See the License for the specific language governing permissions and
>>>> - * limitations under the License.
>>>> - */
>>>> -package org.apache.wicket.jmx;
>>>> -
>>>> -
>>>> -/**
>>>> - * Exposes Application related functionality for JMX.
>>>> - *
>>>> - * @author eelcohillenius
>>>> - */
>>>> -public class PageSettings implements PageSettingsMBean
>>>> -{
>>>> -       private final org.apache.wicket.Application application;
>>>> -
>>>> -       /**
>>>> -        * Create.
>>>> -        *
>>>> -        * @param application
>>>> -        */
>>>> -       public PageSettings(final org.apache.wicket.Application
>>>> application)
>>>> -       {
>>>> -               this.application = application;
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.PageSettingsMBean#getVersionPagesByDefault()
>>>> -        */
>>>> -       @Override
>>>> -       public boolean getVersionPagesByDefault()
>>>> -       {
>>>> -               return
>>>> application.getPageSettings().getVersionPagesByDefault();
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.PageSettingsMBean#setVersionPagesByDefault(
>>>> boolean)
>>>> -        */
>>>> -       @Override
>>>> -       public void setVersionPagesByDefault(final boolean
>>>> pagesVersionedByDefault)
>>>> -       {
>>>> -
>>>> application.getPageSettings().setVersionPagesByDefault(
>>>> pagesVersionedByDefault);
>>>> -       }
>>>> -}
>>>>
>>>>
>>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/
>>>> fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/
>>>> RequestCycleSettings.java
>>>> ----------------------------------------------------------------------
>>>> diff --git
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/
>>>> RequestCycleSettings.java
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/
>>>> RequestCycleSettings.java
>>>> deleted file mode 100644
>>>> index 8815ee0..0000000
>>>> ---
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/
>>>> RequestCycleSettings.java
>>>> +++ /dev/null
>>>> @@ -1,125 +0,0 @@
>>>> -/*
>>>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>>>> - * contributor license agreements.  See the NOTICE file distributed
>>>> with
>>>> - * this work for additional information regarding copyright ownership.
>>>> - * The ASF licenses this file to You under the Apache License, Version
>>>> 2.0
>>>> - * (the "License"); you may not use this file except in compliance with
>>>> - * the License.  You may obtain a copy of the License at
>>>> - *
>>>> - *      http://www.apache.org/licenses/LICENSE-2.0
>>>> - *
>>>> - * Unless required by applicable law or agreed to in writing, software
>>>> - * distributed under the License is distributed on an "AS IS" BASIS,
>>>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>> implied.
>>>> - * See the License for the specific language governing permissions and
>>>> - * limitations under the License.
>>>> - */
>>>> -package org.apache.wicket.jmx;
>>>> -
>>>> -import org.apache.wicket.util.time.Duration;
>>>> -
>>>> -
>>>> -/**
>>>> - * Exposes Application related functionality for JMX.
>>>> - *
>>>> - * @author eelcohillenius
>>>> - */
>>>> -public class RequestCycleSettings implements RequestCycleSettingsMBean
>>>> -{
>>>> -       private final org.apache.wicket.Application application;
>>>> -
>>>> -       /**
>>>> -        * Create.
>>>> -        *
>>>> -        * @param application
>>>> -        */
>>>> -       public RequestCycleSettings(final org.apache.wicket.Application
>>>> application)
>>>> -       {
>>>> -               this.application = application;
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.RequestCycleSettingsMBean#getBufferResponse()
>>>> -        */
>>>> -       @Override
>>>> -       public boolean getBufferResponse()
>>>> -       {
>>>> -               return
>>>> application.getRequestCycleSettings().getBufferResponse();
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.RequestCycleSettingsMBean#
>>>> getGatherExtendedBrowserInfo()
>>>> -        */
>>>> -       @Override
>>>> -       public boolean getGatherExtendedBrowserInfo()
>>>> -       {
>>>> -               return
>>>> application.getRequestCycleSettings().getGatherExtendedBrowserInfo();
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.RequestCycleSettingsMBean#
>>>> getResponseRequestEncoding()
>>>> -        */
>>>> -       @Override
>>>> -       public String getResponseRequestEncoding()
>>>> -       {
>>>> -               return
>>>> application.getRequestCycleSettings().getResponseRequestEncoding();
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.RequestCycleSettingsMBean#getTimeout()
>>>> -        */
>>>> -       @Override
>>>> -       public String getTimeout()
>>>> -       {
>>>> -               return
>>>> application.getRequestCycleSettings().getTimeout().toString();
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.RequestCycleSettingsMBean#
>>>> setBufferResponse(boolean)
>>>> -        */
>>>> -       @Override
>>>> -       public void setBufferResponse(final boolean bufferResponse)
>>>> -       {
>>>> -
>>>> application.getRequestCycleSettings().setBufferResponse(
>>>> bufferResponse);
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.RequestCycleSettingsMBean#
>>>> setGatherExtendedBrowserInfo(boolean)
>>>> -        */
>>>> -       @Override
>>>> -       public void setGatherExtendedBrowserInfo(final boolean
>>>> gatherExtendedBrowserInfo)
>>>> -       {
>>>> -
>>>> application.getRequestCycleSettings().setGatherExtendedBrowserInfo(
>>>> -                       gatherExtendedBrowserInfo);
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.RequestCycleSettingsMBean#
>>>> setResponseRequestEncoding(java.lang.String)
>>>> -        */
>>>> -       @Override
>>>> -       public void setResponseRequestEncoding(final String
>>>> responseRequestEncoding)
>>>> -       {
>>>> -
>>>> application.getRequestCycleSettings().setResponseRequestEncoding(
>>>> responseRequestEncoding);
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.RequestCycleSettingsMBean#
>>>> setTimeout(java.lang.String)
>>>> -        */
>>>> -       @Override
>>>> -       public void setTimeout(final String timeout)
>>>> -       {
>>>> -
>>>> application.getRequestCycleSettings().setTimeout(Duration.valueOf(
>>>> timeout));
>>>> -       }
>>>> -
>>>> -       @Override
>>>> -       public void setExceptionRetryCount(int retries)
>>>> -       {
>>>> -
>>>> application.getRequestCycleSettings().setExceptionRetryCount(retries);
>>>> -       }
>>>> -
>>>> -       @Override
>>>> -       public int getExceptionRetryCount()
>>>> -       {
>>>> -               return
>>>> application.getRequestCycleSettings().getExceptionRetryCount();
>>>> -       }
>>>> -}
>>>>
>>>>
>>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/
>>>> fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/
>>>> RequestLogger.java
>>>> ----------------------------------------------------------------------
>>>> diff --git
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestLogger.java
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestLogger.java
>>>> deleted file mode 100644
>>>> index 28ec4cf..0000000
>>>> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestLogger.java
>>>> +++ /dev/null
>>>> @@ -1,166 +0,0 @@
>>>> -/*
>>>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>>>> - * contributor license agreements.  See the NOTICE file distributed
>>>> with
>>>> - * this work for additional information regarding copyright ownership.
>>>> - * The ASF licenses this file to You under the Apache License, Version
>>>> 2.0
>>>> - * (the "License"); you may not use this file except in compliance with
>>>> - * the License.  You may obtain a copy of the License at
>>>> - *
>>>> - *      http://www.apache.org/licenses/LICENSE-2.0
>>>> - *
>>>> - * Unless required by applicable law or agreed to in writing, software
>>>> - * distributed under the License is distributed on an "AS IS" BASIS,
>>>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>> implied.
>>>> - * See the License for the specific language governing permissions and
>>>> - * limitations under the License.
>>>> - */
>>>> -package org.apache.wicket.jmx;
>>>> -
>>>> -import java.io.IOException;
>>>> -
>>>> -import org.apache.wicket.protocol.http.WebApplication;
>>>> -
>>>> -
>>>> -/**
>>>> - * Exposes {@link org.apache.wicket.protocol.http.RequestLogger} for
>>>> JMX.
>>>> - *
>>>> - * @author eelcohillenius
>>>> - */
>>>> -public class RequestLogger implements RequestLoggerMBean
>>>> -{
>>>> -       private final org.apache.wicket.Application application;
>>>> -
>>>> -       private final WebApplication webApplication;
>>>> -
>>>> -       /**
>>>> -        * Construct.
>>>> -        *
>>>> -        * @param application
>>>> -        *            The application
>>>> -        */
>>>> -       public RequestLogger(final org.apache.wicket.Application
>>>> application)
>>>> -       {
>>>> -               this.application = application;
>>>> -
>>>> -               // do this so that we don't have to cast all the time
>>>> -               if (application instanceof WebApplication)
>>>> -               {
>>>> -                       webApplication = (WebApplication)application;
>>>> -               }
>>>> -               else
>>>> -               {
>>>> -                       webApplication = null;
>>>> -               }
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.RequestLoggerMBean#getNumberOfCreatedSessions()
>>>> -        */
>>>> -       @Override
>>>> -       public Integer getNumberOfCreatedSessions() throws IOException
>>>> -       {
>>>> -               org.apache.wicket.protocol.http.IRequestLogger logger =
>>>> getRequestLogger();
>>>> -               if (logger != null)
>>>> -               {
>>>> -                       return logger.getTotalCreatedSessions();
>>>> -               }
>>>> -               return null;
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.RequestLoggerMBean#getNumberOfLiveSessions()
>>>> -        */
>>>> -       @Override
>>>> -       public Integer getNumberOfLiveSessions() throws IOException
>>>> -       {
>>>> -               org.apache.wicket.protocol.http.IRequestLogger logger =
>>>> getRequestLogger();
>>>> -               if (logger != null)
>>>> -               {
>>>> -                       return logger.getLiveSessions().length;
>>>> -               }
>>>> -               return null;
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.RequestLoggerMBean#getPeakNumberOfSessions()
>>>> -        */
>>>> -       @Override
>>>> -       public Integer getPeakNumberOfSessions() throws IOException
>>>> -       {
>>>> -               org.apache.wicket.protocol.http.IRequestLogger logger =
>>>> getRequestLogger();
>>>> -               if (logger != null)
>>>> -               {
>>>> -                       return logger.getPeakSessions();
>>>> -               }
>>>> -               return null;
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.RequestLoggerMBean#getNumberOfCurrentActiveReques
>>>> ts()
>>>> -        */
>>>> -       @Override
>>>> -       public Integer getNumberOfCurrentActiveRequests() throws
>>>> IOException
>>>> -       {
>>>> -               org.apache.wicket.protocol.http.IRequestLogger logger =
>>>> getRequestLogger();
>>>> -               if (logger != null)
>>>> -               {
>>>> -                       return
>>>> Integer.valueOf(logger.getCurrentActiveRequestCount());
>>>> -               }
>>>> -               return null;
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.RequestLoggerMBean#getPeakNumberOfActiveRequests(
>>>> )
>>>> -        */
>>>> -       @Override
>>>> -       public Integer getPeakNumberOfActiveRequests() throws
>>>> IOException
>>>> -       {
>>>> -               org.apache.wicket.protocol.http.IRequestLogger logger =
>>>> getRequestLogger();
>>>> -               if (logger != null)
>>>> -               {
>>>> -                       return
>>>> Integer.valueOf(logger.getPeakActiveRequestCount());
>>>> -               }
>>>> -               return null;
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see org.apache.wicket.jmx.RequestLoggerMBean#restart()
>>>> -        */
>>>> -       @Override
>>>> -       public void restart() throws IOException
>>>> -       {
>>>> -               if (webApplication != null)
>>>> -               {
>>>> -
>>>> webApplication.getRequestLoggerSettings().
>>>> setRequestLoggerEnabled(false);
>>>> -                       webApplication.getRequestLogger();
>>>> -
>>>> webApplication.getRequestLoggerSettings().
>>>> setRequestLoggerEnabled(true);
>>>> -               }
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see org.apache.wicket.jmx.RequestLoggerMBean#stop()
>>>> -        */
>>>> -       @Override
>>>> -       public void stop() throws IOException
>>>> -       {
>>>> -               if (webApplication != null)
>>>> -               {
>>>> -
>>>> webApplication.getRequestLoggerSettings().
>>>> setRequestLoggerEnabled(false);
>>>> -               }
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * Gets the request logger for this application.
>>>> -        *
>>>> -        * @return The request logger or null if no request is active,
>>>> or
>>>> if this is not a web
>>>> -        *         application
>>>> -        */
>>>> -       protected org.apache.wicket.protocol.http.IRequestLogger
>>>> getRequestLogger()
>>>> -       {
>>>> -               if (application instanceof WebApplication)
>>>> -               {
>>>> -                       return application.getRequestLogger();
>>>> -               }
>>>> -               return null;
>>>> -       }
>>>> -}
>>>>
>>>>
>>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/
>>>> fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/
>>>> ResourceSettings.java
>>>> ----------------------------------------------------------------------
>>>> diff --git
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/ResourceSettings.java
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/ResourceSettings.java
>>>> deleted file mode 100644
>>>> index af7f60d..0000000
>>>> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/
>>>> ResourceSettings.java
>>>> +++ /dev/null
>>>> @@ -1,173 +0,0 @@
>>>> -/*
>>>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>>>> - * contributor license agreements.  See the NOTICE file distributed
>>>> with
>>>> - * this work for additional information regarding copyright ownership.
>>>> - * The ASF licenses this file to You under the Apache License, Version
>>>> 2.0
>>>> - * (the "License"); you may not use this file except in compliance with
>>>> - * the License.  You may obtain a copy of the License at
>>>> - *
>>>> - *      http://www.apache.org/licenses/LICENSE-2.0
>>>> - *
>>>> - * Unless required by applicable law or agreed to in writing, software
>>>> - * distributed under the License is distributed on an "AS IS" BASIS,
>>>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>> implied.
>>>> - * See the License for the specific language governing permissions and
>>>> - * limitations under the License.
>>>> - */
>>>> -package org.apache.wicket.jmx;
>>>> -
>>>> -import java.util.List;
>>>> -
>>>> -import org.apache.wicket.ThreadContext;
>>>> -import org.apache.wicket.resource.loader.IStringResourceLoader;
>>>> -import org.apache.wicket.util.file.IResourceFinder;
>>>> -import org.apache.wicket.util.lang.Generics;
>>>> -import org.apache.wicket.util.time.Duration;
>>>> -
>>>> -
>>>> -/**
>>>> - * Exposes Application related functionality for JMX.
>>>> - *
>>>> - * @author eelcohillenius
>>>> - */
>>>> -public class ResourceSettings implements ResourceSettingsMBean
>>>> -{
>>>> -       private final org.apache.wicket.Application application;
>>>> -
>>>> -       /**
>>>> -        * Create.
>>>> -        *
>>>> -        * @param application
>>>> -        */
>>>> -       public ResourceSettings(final org.apache.wicket.Application
>>>> application)
>>>> -       {
>>>> -               this.application = application;
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * {@inheritDoc}
>>>> -        */
>>>> -       @Override
>>>> -       public String getLocalizer()
>>>> -       {
>>>> -               return
>>>> Stringz.className(application.getResourceSettings().getLocalizer());
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * {@inheritDoc}
>>>> -        */
>>>> -       @Override
>>>> -       public String getPackageResourceGuard()
>>>> -       {
>>>> -               return
>>>> Stringz.className(application.getResourceSettings().
>>>> getPackageResourceGuard());
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * {@inheritDoc}
>>>> -        */
>>>> -       @Override
>>>> -       public String getPropertiesFactory()
>>>> -       {
>>>> -               ThreadContext.setApplication(application);
>>>> -
>>>> -               try
>>>> -               {
>>>> -                       return
>>>> Stringz.className(application.getResourceSettings().
>>>> getPropertiesFactory());
>>>> -               }
>>>> -               finally
>>>> -               {
>>>> -                       ThreadContext.detach();
>>>> -               }
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * {@inheritDoc}
>>>> -        */
>>>> -       @Override
>>>> -       public String getResourceFinders()
>>>> -       {
>>>> -               StringBuilder builder = new StringBuilder();
>>>> -               for (IResourceFinder rf :
>>>> application.getResourceSettings().getResourceFinders())
>>>> -               {
>>>> -                       builder.append(Stringz.className(rf));
>>>> -               }
>>>> -               return builder.toString();
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * {@inheritDoc}
>>>> -        */
>>>> -       @Override
>>>> -       public String getResourcePollFrequency()
>>>> -       {
>>>> -               Duration duration =
>>>> application.getResourceSettings().getResourcePollFrequency();
>>>> -               return (duration != null) ? duration.toString() : null;
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * {@inheritDoc}
>>>> -        */
>>>> -       @Override
>>>> -       public String getResourceStreamLocator()
>>>> -       {
>>>> -               return
>>>> Stringz.className(application.getResourceSettings().
>>>> getResourceStreamLocator());
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * {@inheritDoc}
>>>> -        */
>>>> -       @Override
>>>> -       public String[] getStringResourceLoaders()
>>>> -       {
>>>> -               List<IStringResourceLoader> loaders =
>>>> application.getResourceSettings()
>>>> -                       .getStringResourceLoaders();
>>>> -               if (loaders != null)
>>>> -               {
>>>> -                       List<String> list = Generics.newArrayList();
>>>> -                       for (Object loader : loaders)
>>>> -                       {
>>>> -                               list.add(loader.toString());
>>>> -                       }
>>>> -                       return list.toArray(new String[loaders.size()]);
>>>> -               }
>>>> -               return null;
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * {@inheritDoc}
>>>> -        */
>>>> -       @Override
>>>> -       public boolean getThrowExceptionOnMissingResource()
>>>> -       {
>>>> -               return
>>>> application.getResourceSettings().getThrowExceptionOnMissingResource();
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * {@inheritDoc}
>>>> -        */
>>>> -       @Override
>>>> -       public boolean getUseDefaultOnMissingResource()
>>>> -       {
>>>> -               return
>>>> application.getResourceSettings().getUseDefaultOnMissingResource();
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * {@inheritDoc}
>>>> -        */
>>>> -       @Override
>>>> -       public void setThrowExceptionOnMissingResource(final boolean
>>>> throwExceptionOnMissingResource)
>>>> -       {
>>>> -
>>>> application.getResourceSettings().setThrowExceptionOnMissingResource(
>>>> -                       throwExceptionOnMissingResource);
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * {@inheritDoc}
>>>> -        */
>>>> -       @Override
>>>> -       public void setUseDefaultOnMissingResource(final boolean
>>>> useDefaultOnMissingResource)
>>>> -       {
>>>> -
>>>> application.getResourceSettings().setUseDefaultOnMissingResource(
>>>> -                       useDefaultOnMissingResource);
>>>> -       }
>>>> -}
>>>>
>>>>
>>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/
>>>> fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/
>>>> SecuritySettings.java
>>>> ----------------------------------------------------------------------
>>>> diff --git
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/SecuritySettings.java
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/SecuritySettings.java
>>>> deleted file mode 100644
>>>> index be89017..0000000
>>>> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/
>>>> SecuritySettings.java
>>>> +++ /dev/null
>>>> @@ -1,65 +0,0 @@
>>>> -/*
>>>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>>>> - * contributor license agreements.  See the NOTICE file distributed
>>>> with
>>>> - * this work for additional information regarding copyright ownership.
>>>> - * The ASF licenses this file to You under the Apache License, Version
>>>> 2.0
>>>> - * (the "License"); you may not use this file except in compliance with
>>>> - * the License.  You may obtain a copy of the License at
>>>> - *
>>>> - *      http://www.apache.org/licenses/LICENSE-2.0
>>>> - *
>>>> - * Unless required by applicable law or agreed to in writing, software
>>>> - * distributed under the License is distributed on an "AS IS" BASIS,
>>>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>> implied.
>>>> - * See the License for the specific language governing permissions and
>>>> - * limitations under the License.
>>>> - */
>>>> -package org.apache.wicket.jmx;
>>>> -
>>>> -/**
>>>> - * Exposes Application related functionality for JMX.
>>>> - *
>>>> - * @author eelcohillenius
>>>> - */
>>>> -public class SecuritySettings implements SecuritySettingsMBean
>>>> -{
>>>> -       private final org.apache.wicket.Application application;
>>>> -
>>>> -       /**
>>>> -        * Create.
>>>> -        *
>>>> -        * @param application
>>>> -        */
>>>> -       public SecuritySettings(final org.apache.wicket.Application
>>>> application)
>>>> -       {
>>>> -               this.application = application;
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.SecuritySettingsMBean#getAuthorizationStrategy()
>>>> -        */
>>>> -       @Override
>>>> -       public String getAuthorizationStrategy()
>>>> -       {
>>>> -               return
>>>> Stringz.className(application.getSecuritySettings().
>>>> getAuthorizationStrategy());
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.SecuritySettingsMBean#getCryptFactory()
>>>> -        */
>>>> -       @Override
>>>> -       public String getCryptFactory()
>>>> -       {
>>>> -               return
>>>> Stringz.className(application.getSecuritySettings().getCryptFactory());
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.SecuritySettingsMBean#
>>>> getUnauthorizedComponentInstantiationListener()
>>>> -        */
>>>> -       @Override
>>>> -       public String getUnauthorizedComponentInstantiationListener()
>>>> -       {
>>>> -               return Stringz.className(application.
>>>> getSecuritySettings()
>>>> -                       .getUnauthorizedComponentInstan
>>>> tiationListener());
>>>> -       }
>>>> -}
>>>>
>>>>
>>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/
>>>> fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/
>>>> SessionSettings.java
>>>> ----------------------------------------------------------------------
>>>> diff --git
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/SessionSettings.java
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/SessionSettings.java
>>>> deleted file mode 100644
>>>> index 6c15ab3..0000000
>>>> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/
>>>> SessionSettings.java
>>>> +++ /dev/null
>>>> @@ -1,55 +0,0 @@
>>>> -/*
>>>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>>>> - * contributor license agreements.  See the NOTICE file distributed
>>>> with
>>>> - * this work for additional information regarding copyright ownership.
>>>> - * The ASF licenses this file to You under the Apache License, Version
>>>> 2.0
>>>> - * (the "License"); you may not use this file except in compliance with
>>>> - * the License.  You may obtain a copy of the License at
>>>> - *
>>>> - *      http://www.apache.org/licenses/LICENSE-2.0
>>>> - *
>>>> - * Unless required by applicable law or agreed to in writing, software
>>>> - * distributed under the License is distributed on an "AS IS" BASIS,
>>>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>> implied.
>>>> - * See the License for the specific language governing permissions and
>>>> - * limitations under the License.
>>>> - */
>>>> -package org.apache.wicket.jmx;
>>>> -
>>>> -/**
>>>> - * Exposes Application related functionality for JMX.
>>>> - *
>>>> - * @author eelcohillenius
>>>> - */
>>>> -public class SessionSettings implements SessionSettingsMBean
>>>> -{
>>>> -       private final org.apache.wicket.Application application;
>>>> -
>>>> -       /**
>>>> -        * Create.
>>>> -        *
>>>> -        * @param application
>>>> -        */
>>>> -       public SessionSettings(final org.apache.wicket.Application
>>>> application)
>>>> -       {
>>>> -               this.application = application;
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.SessionSettingsMBean#getPageFactory()
>>>> -        */
>>>> -       @Override
>>>> -       public String getPageFactory()
>>>> -       {
>>>> -               return Stringz.className(application.getPageFactory());
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.SessionSettingsMBean#getSessionStore()
>>>> -        */
>>>> -       @Override
>>>> -       public String getSessionStore()
>>>> -       {
>>>> -               return Stringz.className(application.
>>>> getSessionStore());
>>>> -       }
>>>> -}
>>>>
>>>>
>>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/
>>>> fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/
>>>> StoreSettings.java
>>>> ----------------------------------------------------------------------
>>>> diff --git
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/StoreSettings.java
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/StoreSettings.java
>>>> deleted file mode 100644
>>>> index 4705f3f..0000000
>>>> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/StoreSettings.java
>>>> +++ /dev/null
>>>> @@ -1,68 +0,0 @@
>>>> -/*
>>>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>>>> - * contributor license agreements.  See the NOTICE file distributed
>>>> with
>>>> - * this work for additional information regarding copyright ownership.
>>>> - * The ASF licenses this file to You under the Apache License, Version
>>>> 2.0
>>>> - * (the "License"); you may not use this file except in compliance with
>>>> - * the License.  You may obtain a copy of the License at
>>>> - *
>>>> - *      http://www.apache.org/licenses/LICENSE-2.0
>>>> - *
>>>> - * Unless required by applicable law or agreed to in writing, software
>>>> - * distributed under the License is distributed on an "AS IS" BASIS,
>>>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>> implied.
>>>> - * See the License for the specific language governing permissions and
>>>> - * limitations under the License.
>>>> - */
>>>> -package org.apache.wicket.jmx;
>>>> -
>>>> -import org.apache.wicket.Application;
>>>> -
>>>> -/**
>>>> - * Exposes Application's StoreSettings for JMX.
>>>> - */
>>>> -public class StoreSettings implements StoreSettingsMBean
>>>> -{
>>>> -       private final Application application;
>>>> -
>>>> -       /**
>>>> -        * Construct.
>>>> -        *
>>>> -        * @param application
>>>> -        */
>>>> -       public StoreSettings(final Application application)
>>>> -       {
>>>> -               this.application = application;
>>>> -       }
>>>> -
>>>> -       @Override
>>>> -       public int getInmemoryCacheSize()
>>>> -       {
>>>> -               return
>>>> application.getStoreSettings().getInmemoryCacheSize();
>>>> -       }
>>>> -
>>>> -       @Override
>>>> -       public long getMaxSizePerSession()
>>>> -       {
>>>> -               return
>>>> application.getStoreSettings().getMaxSizePerSession().bytes();
>>>> -       }
>>>> -
>>>> -       @Override
>>>> -       public String getFileStoreFolder()
>>>> -       {
>>>> -               return
>>>> application.getStoreSettings().getFileStoreFolder().getAbsolutePath();
>>>> -       }
>>>> -
>>>> -       @Override
>>>> -       public int getAsynchronousQueueCapacity()
>>>> -       {
>>>> -               return
>>>> application.getStoreSettings().getAsynchronousQueueCapacity();
>>>> -       }
>>>> -
>>>> -       @Override
>>>> -       public boolean isAsynchronous()
>>>> -       {
>>>> -               return application.getStoreSettings().isAsynchronous();
>>>> -       }
>>>> -
>>>> -}
>>>>
>>>>
>>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/
>>>> fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/Stringz.java
>>>> ----------------------------------------------------------------------
>>>> diff --git a/wicket-jmx/src/main/java/org/apache/wicket/jmx/Stringz.
>>>> java
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/Stringz.java
>>>> deleted file mode 100644
>>>> index f9f6381..0000000
>>>> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/Stringz.java
>>>> +++ /dev/null
>>>> @@ -1,25 +0,0 @@
>>>> -/*
>>>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>>>> - * contributor license agreements.  See the NOTICE file distributed
>>>> with
>>>> - * this work for additional information regarding copyright ownership.
>>>> - * The ASF licenses this file to You under the Apache License, Version
>>>> 2.0
>>>> - * (the "License"); you may not use this file except in compliance with
>>>> - * the License.  You may obtain a copy of the License at
>>>> - *
>>>> - *      http://www.apache.org/licenses/LICENSE-2.0
>>>> - *
>>>> - * Unless required by applicable law or agreed to in writing, software
>>>> - * distributed under the License is distributed on an "AS IS" BASIS,
>>>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>> implied.
>>>> - * See the License for the specific language governing permissions and
>>>> - * limitations under the License.
>>>> - */
>>>> -package org.apache.wicket.jmx;
>>>> -
>>>> -class Stringz
>>>> -{
>>>> -       static String className(final Object o)
>>>> -       {
>>>> -               return (o != null) ? o.getClass().getName() : null;
>>>> -       }
>>>> -}
>>>>
>>>>
>>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/
>>>> fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/
>>>> wrapper/Application.java
>>>> ----------------------------------------------------------------------
>>>> diff --git
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/
>>>> Application.java
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/
>>>> Application.java
>>>> new file mode 100644
>>>> index 0000000..56e0eff
>>>> --- /dev/null
>>>> +++
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/
>>>> Application.java
>>>> @@ -0,0 +1,104 @@
>>>> +/*
>>>> + * Licensed to the Apache Software Foundation (ASF) under one or more
>>>> + * contributor license agreements.  See the NOTICE file distributed
>>>> with
>>>> + * this work for additional information regarding copyright ownership.
>>>> + * The ASF licenses this file to You under the Apache License, Version
>>>
>>>

Re: [2/3] git commit: use proxies for mbeans, so application is set on thread automatically

Posted by Sven Meier <sv...@meiers.net>.
s/wicketstuff-jm-xpanel/wicketstuff-mbeanview/g

Sven


On 03/24/2014 11:04 AM, Sven Meier wrote:
> Hi Martin,
>
> I have to confess that's a little bit 'hackish' ;).
>
> Background information:
> When working on wicketstuff-jm-xpanel, I added wicket-jmx to the 
> project's dependency. This way I could test it on Wicket's own Jmx beans.
> But wicket-jms was setting *and* clearing the thread bound application 
> object in two of its methods. This lead to an exception when rendering 
> JmxPanel, because the application was no longer attached to the thread 
> after calling into some JMX beans.
>
> So I made access to the application transparent in wicket-jmx:
> Before a method of the JMX bean is called, the proxy will initialize 
> the application reference and clean it up afterwards, *if* it wasn't 
> already set before the call.
>
> Have fun
> Sven
>
>
> On 03/24/2014 10:46 AM, Martin Grigorov wrote:
>> OK. Debugging showed where I was in mistake.
>> The passed 'o' object is actually the XysSettingsMBean wrapper/impl, 
>> so it
>> implements interface XyzSettingsMBean
>>
>> All is fine.
>> Sorry for the noise.
>>
>> Martin Grigorov
>> Wicket Training and Consulting
>>
>>
>> On Mon, Mar 24, 2014 at 10:08 AM, Martin Grigorov 
>> <mg...@apache.org>wrote:
>>
>>> Hi Sven,
>>>
>>>
>>> On Fri, Mar 21, 2014 at 5:48 PM, <sv...@apache.org> wrote:
>>>
>>>> use proxies for mbeans, so application is set on thread automatically
>>>>
>>>> Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
>>>> Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/fea2b8e4
>>>> Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/fea2b8e4
>>>> Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/fea2b8e4
>>>>
>>>> Branch: refs/heads/master
>>>> Commit: fea2b8e4e0feb6a7374bcfe6de2da5d1a2feba20
>>>> Parents: 329b945
>>>> Author: svenmeier <sv...@meiers.net>
>>>> Authored: Fri Mar 21 16:39:29 2014 +0100
>>>> Committer: svenmeier <sv...@meiers.net>
>>>> Committed: Fri Mar 21 16:39:29 2014 +0100
>>>>
>>>> ----------------------------------------------------------------------
>>>>   wicket-jmx/pom.xml                              |   8 +
>>>>   .../java/org/apache/wicket/jmx/Application.java | 113 ------------
>>>>   .../apache/wicket/jmx/ApplicationSettings.java  | 101 -----------
>>>>   .../org/apache/wicket/jmx/DebugSettings.java    | 164 
>>>> ------------------
>>>>   .../java/org/apache/wicket/jmx/Initializer.java | 111 +++++++++---
>>>>   .../org/apache/wicket/jmx/MarkupSettings.java   | 128 --------------
>>>>   .../apache/wicket/jmx/MarkupSettingsMBean.java  |   2 +
>>>>   .../org/apache/wicket/jmx/PageSettings.java     |  56 ------
>>>>   .../apache/wicket/jmx/RequestCycleSettings.java | 125 --------------
>>>>   .../org/apache/wicket/jmx/RequestLogger.java    | 166 
>>>> ------------------
>>>>   .../org/apache/wicket/jmx/ResourceSettings.java | 173 
>>>> -------------------
>>>>   .../org/apache/wicket/jmx/SecuritySettings.java |  65 -------
>>>>   .../org/apache/wicket/jmx/SessionSettings.java  |  55 ------
>>>>   .../org/apache/wicket/jmx/StoreSettings.java    |  68 --------
>>>>   .../java/org/apache/wicket/jmx/Stringz.java     |  25 ---
>>>>   .../apache/wicket/jmx/wrapper/Application.java  | 104 +++++++++++
>>>>   .../wicket/jmx/wrapper/ApplicationSettings.java | 103 +++++++++++
>>>>   .../wicket/jmx/wrapper/DebugSettings.java       | 167 
>>>> ++++++++++++++++++
>>>>   .../wicket/jmx/wrapper/MarkupSettings.java      | 131 ++++++++++++++
>>>>   .../apache/wicket/jmx/wrapper/PageSettings.java |  59 +++++++
>>>>   .../jmx/wrapper/RequestCycleSettings.java       | 127 ++++++++++++++
>>>>   .../wicket/jmx/wrapper/RequestLogger.java       | 168 
>>>> ++++++++++++++++++
>>>>   .../wicket/jmx/wrapper/ResourceSettings.java    | 165 
>>>> ++++++++++++++++++
>>>>   .../wicket/jmx/wrapper/SecuritySettings.java    |  68 ++++++++
>>>>   .../wicket/jmx/wrapper/SessionSettings.java     |  58 +++++++
>>>>   .../wicket/jmx/wrapper/StoreSettings.java       |  69 ++++++++
>>>>   .../org/apache/wicket/jmx/wrapper/Stringz.java  |  25 +++
>>>>   27 files changed, 1340 insertions(+), 1264 deletions(-)
>>>> ----------------------------------------------------------------------
>>>>
>>>>
>>>>
>>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/pom.xml 
>>>>
>>>> ----------------------------------------------------------------------
>>>> diff --git a/wicket-jmx/pom.xml b/wicket-jmx/pom.xml
>>>> index 9bc5a08..c58cb06 100644
>>>> --- a/wicket-jmx/pom.xml
>>>> +++ b/wicket-jmx/pom.xml
>>>> @@ -32,6 +32,14 @@
>>>> <groupId>org.apache.wicket</groupId>
>>>> <artifactId>wicket-core</artifactId>
>>>>                  </dependency>
>>>> +               <dependency>
>>>> +                       <groupId>cglib</groupId>
>>>> + <artifactId>cglib</artifactId>
>>>> +               </dependency>
>>>> +<!--   <dependency>
>>>> + <groupId>org.ow2.asm</groupId>
>>>> + <artifactId>asm-util</artifactId>
>>>> +               </dependency> -->
>>>>          </dependencies>
>>>>          <build>
>>>>                  <pluginManagement>
>>>>
>>>>
>>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/Application.java 
>>>>
>>>> ----------------------------------------------------------------------
>>>> diff --git
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/Application.java
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/Application.java
>>>> deleted file mode 100644
>>>> index 5eaa003..0000000
>>>> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/Application.java
>>>> +++ /dev/null
>>>> @@ -1,113 +0,0 @@
>>>> -/*
>>>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>>>> - * contributor license agreements.  See the NOTICE file 
>>>> distributed with
>>>> - * this work for additional information regarding copyright 
>>>> ownership.
>>>> - * The ASF licenses this file to You under the Apache License, 
>>>> Version
>>>> 2.0
>>>> - * (the "License"); you may not use this file except in compliance 
>>>> with
>>>> - * the License.  You may obtain a copy of the License at
>>>> - *
>>>> - *      http://www.apache.org/licenses/LICENSE-2.0
>>>> - *
>>>> - * Unless required by applicable law or agreed to in writing, 
>>>> software
>>>> - * distributed under the License is distributed on an "AS IS" BASIS,
>>>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>> implied.
>>>> - * See the License for the specific language governing permissions 
>>>> and
>>>> - * limitations under the License.
>>>> - */
>>>> -package org.apache.wicket.jmx;
>>>> -
>>>> -import java.io.IOException;
>>>> -
>>>> -import org.apache.wicket.ThreadContext;
>>>> -
>>>> -/**
>>>> - * Exposes Application related functionality for JMX.
>>>> - *
>>>> - * @author eelcohillenius
>>>> - */
>>>> -public class Application implements ApplicationMBean
>>>> -{
>>>> -       private final org.apache.wicket.Application application;
>>>> -
>>>> -       /**
>>>> -        * Create.
>>>> -        *
>>>> -        * @param application
>>>> -        */
>>>> -       public Application(final org.apache.wicket.Application
>>>> application)
>>>> -       {
>>>> -               this.application = application;
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see 
>>>> org.apache.wicket.jmx.ApplicationMBean#clearMarkupCache()
>>>> -        */
>>>> -       @Override
>>>> -       public void clearMarkupCache() throws IOException
>>>> -       {
>>>> -
>>>> application.getMarkupSettings().getMarkupFactory().getMarkupCache().clear(); 
>>>>
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.ApplicationMBean#getApplicationClass()
>>>> -        */
>>>> -       @Override
>>>> -       public String getApplicationClass() throws IOException
>>>> -       {
>>>> -               return application.getClass().getName();
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.ApplicationMBean#getConfigurationType()
>>>> -        */
>>>> -       @Override
>>>> -       public String getConfigurationType()
>>>> -       {
>>>> -               return application.getConfigurationType().name();
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see 
>>>> org.apache.wicket.jmx.ApplicationMBean#getHomePageClass()
>>>> -        */
>>>> -       @Override
>>>> -       public String getHomePageClass() throws IOException
>>>> -       {
>>>> -               return application.getHomePage().getName();
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.ApplicationMBean#getMarkupCacheSize()
>>>> -        */
>>>> -       @Override
>>>> -       public int getMarkupCacheSize() throws IOException
>>>> -       {
>>>> -               ThreadContext.setApplication(application);
>>>> -
>>>> -               try
>>>> -               {
>>>> -                       return
>>>> application.getMarkupSettings().getMarkupFactory().getMarkupCache().size(); 
>>>>
>>>> -               }
>>>> -               finally
>>>> -               {
>>>> -                       ThreadContext.detach();
>>>> -               }
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see 
>>>> org.apache.wicket.jmx.ApplicationMBean#getWicketVersion()
>>>> -        */
>>>> -       @Override
>>>> -       public String getWicketVersion() throws IOException
>>>> -       {
>>>> -               return 
>>>> application.getFrameworkSettings().getVersion();
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.ApplicationMBean#clearLocalizerCache()
>>>> -        */
>>>> -       @Override
>>>> -       public void clearLocalizerCache() throws IOException
>>>> -       {
>>>> -
>>>> application.getResourceSettings().getLocalizer().clearCache();
>>>> -       }
>>>> -}
>>>>
>>>>
>>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/ApplicationSettings.java 
>>>>
>>>> ----------------------------------------------------------------------
>>>> diff --git
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/ApplicationSettings.java 
>>>>
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/ApplicationSettings.java 
>>>>
>>>> deleted file mode 100644
>>>> index 52c8e0b..0000000
>>>> ---
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/ApplicationSettings.java 
>>>>
>>>> +++ /dev/null
>>>> @@ -1,101 +0,0 @@
>>>> -/*
>>>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>>>> - * contributor license agreements.  See the NOTICE file 
>>>> distributed with
>>>> - * this work for additional information regarding copyright 
>>>> ownership.
>>>> - * The ASF licenses this file to You under the Apache License, 
>>>> Version
>>>> 2.0
>>>> - * (the "License"); you may not use this file except in compliance 
>>>> with
>>>> - * the License.  You may obtain a copy of the License at
>>>> - *
>>>> - *      http://www.apache.org/licenses/LICENSE-2.0
>>>> - *
>>>> - * Unless required by applicable law or agreed to in writing, 
>>>> software
>>>> - * distributed under the License is distributed on an "AS IS" BASIS,
>>>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>> implied.
>>>> - * See the License for the specific language governing permissions 
>>>> and
>>>> - * limitations under the License.
>>>> - */
>>>> -package org.apache.wicket.jmx;
>>>> -
>>>> -import org.apache.wicket.util.lang.Bytes;
>>>> -import org.apache.wicket.util.lang.Classes;
>>>> -
>>>> -/**
>>>> - * Exposes Application related functionality for JMX.
>>>> - *
>>>> - * @author eelcohillenius
>>>> - */
>>>> -public class ApplicationSettings implements ApplicationSettingsMBean
>>>> -{
>>>> -       private final org.apache.wicket.Application application;
>>>> -
>>>> -       /**
>>>> -        * Create.
>>>> -        *
>>>> -        * @param application
>>>> -        */
>>>> -       public ApplicationSettings(final org.apache.wicket.Application
>>>> application)
>>>> -       {
>>>> -               this.application = application;
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.ApplicationSettingsMBean#getAccessDeniedPage()
>>>> -        */
>>>> -       @Override
>>>> -       public String getAccessDeniedPage()
>>>> -       {
>>>> -               return
>>>> Classes.name(application.getApplicationSettings().getAccessDeniedPage()); 
>>>>
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.ApplicationSettingsMBean#getClassResolver()
>>>> -        */
>>>> -       @Override
>>>> -       public String getClassResolver()
>>>> -       {
>>>> -               return
>>>> Stringz.className(application.getApplicationSettings().getClassResolver()); 
>>>>
>>>> -       }
>>>> -
>>>> -       @Override
>>>> -       public String getDefaultMaximumUploadSize()
>>>> -       {
>>>> -               return
>>>> application.getApplicationSettings().getDefaultMaximumUploadSize().toString(); 
>>>>
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.ApplicationSettingsMBean#getInternalErrorPage()
>>>> -        */
>>>> -       @Override
>>>> -       public String getInternalErrorPage()
>>>> -       {
>>>> -               return
>>>> Classes.name(application.getApplicationSettings().getInternalErrorPage()); 
>>>>
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.ApplicationSettingsMBean#getPageExpiredErrorPage() 
>>>>
>>>> -        */
>>>> -       @Override
>>>> -       public String getPageExpiredErrorPage()
>>>> -       {
>>>> -               return
>>>> Classes.name(application.getApplicationSettings().getPageExpiredErrorPage()); 
>>>>
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.ApplicationSettingsMBean#getUnexpectedExceptionDisplay() 
>>>>
>>>> -        */
>>>> -       @Override
>>>> -       public String getUnexpectedExceptionDisplay()
>>>> -       {
>>>> -               return
>>>> application.getExceptionSettings().getUnexpectedExceptionDisplay().toString(); 
>>>>
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.ApplicationSettingsMBean#setDefaultMaximumUploadSize(java.lang.String) 
>>>>
>>>> -        */
>>>> -       @Override
>>>> -       public void setDefaultMaximumUploadSize(final String
>>>> defaultUploadSize)
>>>> -       {
>>>> -
>>>> application.getApplicationSettings().setDefaultMaximumUploadSize(
>>>> -                       Bytes.valueOf(defaultUploadSize));
>>>> -       }
>>>> -}
>>>>
>>>>
>>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/DebugSettings.java 
>>>>
>>>> ----------------------------------------------------------------------
>>>> diff --git
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/DebugSettings.java
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/DebugSettings.java
>>>> deleted file mode 100644
>>>> index 0055dcf..0000000
>>>> --- 
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/DebugSettings.java
>>>> +++ /dev/null
>>>> @@ -1,164 +0,0 @@
>>>> -/*
>>>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>>>> - * contributor license agreements.  See the NOTICE file 
>>>> distributed with
>>>> - * this work for additional information regarding copyright 
>>>> ownership.
>>>> - * The ASF licenses this file to You under the Apache License, 
>>>> Version
>>>> 2.0
>>>> - * (the "License"); you may not use this file except in compliance 
>>>> with
>>>> - * the License.  You may obtain a copy of the License at
>>>> - *
>>>> - *      http://www.apache.org/licenses/LICENSE-2.0
>>>> - *
>>>> - * Unless required by applicable law or agreed to in writing, 
>>>> software
>>>> - * distributed under the License is distributed on an "AS IS" BASIS,
>>>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>> implied.
>>>> - * See the License for the specific language governing permissions 
>>>> and
>>>> - * limitations under the License.
>>>> - */
>>>> -package org.apache.wicket.jmx;
>>>> -
>>>> -/**
>>>> - * Exposes Application related functionality for JMX.
>>>> - *
>>>> - * @author eelcohillenius
>>>> - */
>>>> -public class DebugSettings implements DebugSettingsMBean
>>>> -{
>>>> -       private final org.apache.wicket.Application application;
>>>> -
>>>> -       /**
>>>> -        * Create.
>>>> -        *
>>>> -        * @param application
>>>> -        */
>>>> -       public DebugSettings(final org.apache.wicket.Application
>>>> application)
>>>> -       {
>>>> -               this.application = application;
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.DebugSettingsMBean#getComponentUseCheck()
>>>> -        */
>>>> -       @Override
>>>> -       public boolean getComponentUseCheck()
>>>> -       {
>>>> -               return
>>>> application.getDebugSettings().getComponentUseCheck();
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.DebugSettingsMBean#isAjaxDebugModeEnabled()
>>>> -        */
>>>> -       @Override
>>>> -       public boolean isAjaxDebugModeEnabled()
>>>> -       {
>>>> -               return
>>>> application.getDebugSettings().isAjaxDebugModeEnabled();
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.DebugSettingsMBean#setAjaxDebugModeEnabled(boolean) 
>>>>
>>>> -        */
>>>> -       @Override
>>>> -       public void setAjaxDebugModeEnabled(final boolean enable)
>>>> -       {
>>>> -
>>>> application.getDebugSettings().setAjaxDebugModeEnabled(enable);
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.DebugSettingsMBean#setComponentUseCheck(boolean)
>>>> -        */
>>>> -       @Override
>>>> -       public void setComponentUseCheck(final boolean check)
>>>> -       {
>>>> -
>>>> application.getDebugSettings().setComponentUseCheck(check);
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.DebugSettingsMBean#setOutputComponentPath(boolean) 
>>>>
>>>> -        */
>>>> -       @Override
>>>> -       public void setOutputComponentPath(final boolean enabled)
>>>> -       {
>>>> -
>>>> application.getDebugSettings().setOutputComponentPath(enabled);
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.DebugSettingsMBean#isOutputComponentPath()
>>>> -        */
>>>> -       @Override
>>>> -       public boolean isOutputComponentPath()
>>>> -       {
>>>> -               return
>>>> application.getDebugSettings().isOutputComponentPath();
>>>> -       }
>>>> -
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.DebugSettingsMBean#setOutputMarkupContainerClassName(boolean) 
>>>>
>>>> -        */
>>>> -       @Override
>>>> -       public void setOutputMarkupContainerClassName(final boolean
>>>> enable)
>>>> -       {
>>>> -
>>>> application.getDebugSettings().setOutputMarkupContainerClassName(enable); 
>>>>
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.DebugSettingsMBean#isOutputMarkupContainerClassName() 
>>>>
>>>> -        */
>>>> -       @Override
>>>> -       public boolean isOutputMarkupContainerClassName()
>>>> -       {
>>>> -               return
>>>> application.getDebugSettings().isOutputMarkupContainerClassName();
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.DebugSettingsMBean#isLinePreciseReportingOnAddComponentEnabled() 
>>>>
>>>> -        */
>>>> -       @Override
>>>> -       public boolean isLinePreciseReportingOnAddComponentEnabled()
>>>> -       {
>>>> -               return
>>>> application.getDebugSettings().isLinePreciseReportingOnAddComponentEnabled(); 
>>>>
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.DebugSettingsMBean#setLinePreciseReportingOnAddComponentEnabled(boolean) 
>>>>
>>>> -        */
>>>> -       @Override
>>>> -       public void setLinePreciseReportingOnAddComponentEnabled(final
>>>> boolean enable)
>>>> -       {
>>>> -
>>>> application.getDebugSettings().setLinePreciseReportingOnAddComponentEnabled(enable); 
>>>>
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.DebugSettingsMBean#isLinePreciseReportingOnNewComponentEnabled() 
>>>>
>>>> -        */
>>>> -       @Override
>>>> -       public boolean isLinePreciseReportingOnNewComponentEnabled()
>>>> -       {
>>>> -               return
>>>> application.getDebugSettings().isLinePreciseReportingOnNewComponentEnabled(); 
>>>>
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.DebugSettingsMBean#setLinePreciseReportingOnNewComponentEnabled(boolean) 
>>>>
>>>> -        */
>>>> -       @Override
>>>> -       public void setLinePreciseReportingOnNewComponentEnabled(final
>>>> boolean enable)
>>>> -       {
>>>> -
>>>> application.getDebugSettings().setLinePreciseReportingOnNewComponentEnabled(enable); 
>>>>
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.DebugSettingsMBean#setDevelopmentUtilitiesEnabled(boolean) 
>>>>
>>>> -        */
>>>> -       @Override
>>>> -       public void setDevelopmentUtilitiesEnabled(final boolean 
>>>> enable)
>>>> -       {
>>>> -
>>>> application.getDebugSettings().setDevelopmentUtilitiesEnabled(enable);
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.DebugSettingsMBean#isDevelopmentUtilitiesEnabled() 
>>>>
>>>> -        */
>>>> -       @Override
>>>> -       public boolean isDevelopmentUtilitiesEnabled()
>>>> -       {
>>>> -               return
>>>> application.getDebugSettings().isDevelopmentUtilitiesEnabled();
>>>> -       }
>>>> -}
>>>>
>>>>
>>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/Initializer.java 
>>>>
>>>> ----------------------------------------------------------------------
>>>> diff --git
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/Initializer.java
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/Initializer.java
>>>> index 77aaa2d..27f4c33 100644
>>>> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/Initializer.java
>>>> +++ b/wicket-jmx/src/main/java/org/apache/wicket/jmx/Initializer.java
>>>> @@ -17,6 +17,7 @@
>>>>   package org.apache.wicket.jmx;
>>>>
>>>>   import java.lang.management.ManagementFactory;
>>>> +import java.lang.reflect.Method;
>>>>   import java.util.ArrayList;
>>>>   import java.util.List;
>>>>
>>>> @@ -29,8 +30,24 @@ import 
>>>> javax.management.MalformedObjectNameException;
>>>>   import javax.management.NotCompliantMBeanException;
>>>>   import javax.management.ObjectName;
>>>>
>>>> +import net.sf.cglib.core.DefaultNamingPolicy;
>>>> +import net.sf.cglib.core.Predicate;
>>>> +import net.sf.cglib.proxy.Enhancer;
>>>> +
>>>>   import org.apache.wicket.IInitializer;
>>>> +import org.apache.wicket.ThreadContext;
>>>>   import org.apache.wicket.WicketRuntimeException;
>>>> +import org.apache.wicket.jmx.wrapper.Application;
>>>> +import org.apache.wicket.jmx.wrapper.ApplicationSettings;
>>>> +import org.apache.wicket.jmx.wrapper.DebugSettings;
>>>> +import org.apache.wicket.jmx.wrapper.MarkupSettings;
>>>> +import org.apache.wicket.jmx.wrapper.PageSettings;
>>>> +import org.apache.wicket.jmx.wrapper.RequestCycleSettings;
>>>> +import org.apache.wicket.jmx.wrapper.RequestLogger;
>>>> +import org.apache.wicket.jmx.wrapper.ResourceSettings;
>>>> +import org.apache.wicket.jmx.wrapper.SecuritySettings;
>>>> +import org.apache.wicket.jmx.wrapper.SessionSettings;
>>>> +import org.apache.wicket.jmx.wrapper.StoreSettings;
>>>>   import org.slf4j.Logger;
>>>>   import org.slf4j.LoggerFactory;
>>>>
>>>> @@ -172,30 +189,30 @@ public class Initializer implements IInitializer
>>>>                          domain = tempDomain;
>>>>
>>>>                          Application appBean = new
>>>> Application(application);
>>>> -                       register(appBean, appBeanName);
>>>> -
>>>> -                       register(new ApplicationSettings(application),
>>>> new ObjectName(domain +
>>>> -
>>>> ":type=Application,name=ApplicationSettings"));
>>>> -                       register(new DebugSettings(application), new
>>>> ObjectName(domain +
>>>> - ":type=Application,name=DebugSettings"));
>>>> -                       register(new MarkupSettings(application), new
>>>> ObjectName(domain +
>>>> - ":type=Application,name=MarkupSettings"));
>>>> -                       register(new ResourceSettings(application), 
>>>> new
>>>> ObjectName(domain +
>>>> -
>>>> ":type=Application,name=ResourceSettings"));
>>>> -                       register(new PageSettings(application), new
>>>> ObjectName(domain +
>>>> - ":type=Application,name=PageSettings"));
>>>> -                       register(new 
>>>> RequestCycleSettings(application),
>>>> new ObjectName(domain +
>>>> -
>>>> ":type=Application,name=RequestCycleSettings"));
>>>> -                       register(new SecuritySettings(application), 
>>>> new
>>>> ObjectName(domain +
>>>> -
>>>> ":type=Application,name=SecuritySettings"));
>>>> -                       register(new SessionSettings(application), new
>>>> ObjectName(domain +
>>>> -
>>>> ":type=Application,name=SessionSettings"));
>>>> -                       register(new StoreSettings(application), new
>>>> ObjectName(domain +
>>>> - ":type=Application,name=StoreSettings"));
>>>> +                       register(application, appBean, appBeanName);
>>>> +
>>>> +                       register(application, new
>>>> ApplicationSettings(application), new ObjectName(domain
>>>> +                               +
>>>> ":type=Application,name=ApplicationSettings"));
>>>> +                       register(application, new
>>>> DebugSettings(application), new ObjectName(domain
>>>> +                               +
>>>> ":type=Application,name=DebugSettings"));
>>>> +                       register(application, new
>>>> MarkupSettings(application), new ObjectName(domain
>>>> +                               +
>>>> ":type=Application,name=MarkupSettings"));
>>>> +                       register(application, new
>>>> ResourceSettings(application), new ObjectName(domain
>>>> +                               +
>>>> ":type=Application,name=ResourceSettings"));
>>>> +                       register(application, new
>>>> PageSettings(application), new ObjectName(domain
>>>> +                               + 
>>>> ":type=Application,name=PageSettings"));
>>>> +                       register(application, new
>>>> RequestCycleSettings(application), new ObjectName(domain
>>>> +                               +
>>>> ":type=Application,name=RequestCycleSettings"));
>>>> +                       register(application, new
>>>> SecuritySettings(application), new ObjectName(domain
>>>> +                               +
>>>> ":type=Application,name=SecuritySettings"));
>>>> +                       register(application, new
>>>> SessionSettings(application), new ObjectName(domain
>>>> +                               +
>>>> ":type=Application,name=SessionSettings"));
>>>> +                       register(application, new
>>>> StoreSettings(application), new ObjectName(domain
>>>> +                               +
>>>> ":type=Application,name=StoreSettings"));
>>>>
>>>>                          RequestLogger sessionsBean = new
>>>> RequestLogger(application);
>>>>                          ObjectName sessionsBeanName = new
>>>> ObjectName(domain + ":type=RequestLogger");
>>>> -                       register(sessionsBean, sessionsBeanName);
>>>> +                       register(application, sessionsBean,
>>>> sessionsBeanName);
>>>>                  }
>>>>                  catch (MalformedObjectNameException e)
>>>>                  {
>>>> @@ -236,11 +253,55 @@ public class Initializer implements IInitializer
>>>>           * @throws MBeanRegistrationException
>>>>           * @throws InstanceAlreadyExistsException
>>>>           */
>>>> -       private void register(final Object o, final ObjectName 
>>>> objectName)
>>>> -               throws InstanceAlreadyExistsException,
>>>> MBeanRegistrationException,
>>>> -               NotCompliantMBeanException
>>>> +       private void register(final org.apache.wicket.Application
>>>> application, final Object o,
>>>> +               final ObjectName objectName) throws
>>>> InstanceAlreadyExistsException,
>>>> +               MBeanRegistrationException, NotCompliantMBeanException
>>>>          {
>>>> -               mbeanServer.registerMBean(o, objectName);
>>>> +               Object proxy = createProxy(application, o);
>>>> +               mbeanServer.registerMBean(proxy, objectName);
>>>>                  registered.add(objectName);
>>>>          }
>>>> +
>>>> +       private Object createProxy(final org.apache.wicket.Application
>>>> application, final Object o)
>>>> +       {
>>>> +               Enhancer e = new Enhancer();
>>>> + e.setInterfaces(o.getClass().getInterfaces());
>>>> +               e.setSuperclass(Object.class);
>>>>
>>> I'm sure you have tested it but the lines above look a bit weird.
>>> In Wicket 7.x all XyzSettings classes are Java classes and just few of
>>> them implement some interfaces.
>>> I have to test it but I think the JMX runtime won't be able to list the
>>> setters and getters of the MBean because the proxy has no knowledge 
>>> of its
>>> delegate.
>>> The fix I have in mind is:  e.setSuperclass(o.getClass());
>>>
>>>
>>>> +               e.setCallback(new 
>>>> net.sf.cglib.proxy.InvocationHandler()
>>>> +               {
>>>> +                       @Override
>>>> +                       public Object invoke(Object proxy, Method 
>>>> method,
>>>> Object[] args) throws Throwable
>>>> +                       {
>>>> +                               boolean existed = 
>>>> ThreadContext.exists();
>>>> +
>>>> +                               if (existed == false)
>>>> +                               {
>>>> +
>>>> ThreadContext.setApplication(application);
>>>> +                               }
>>>> +
>>>> +                               try
>>>> +                               {
>>>> +                                       return method.invoke(o, args);
>>>> +                               }
>>>> +                               finally
>>>> +                               {
>>>> +                                       if (existed == false)
>>>> +                                       {
>>>> + ThreadContext.detach();
>>>> +                                       }
>>>> +                               }
>>>> +                       }
>>>> +               });
>>>> +               e.setNamingPolicy(new DefaultNamingPolicy()
>>>> +               {
>>>> +                       @Override
>>>> +                       public String getClassName(final String 
>>>> prefix,
>>>> final String source, final Object key,
>>>> +                               final Predicate names)
>>>> +                       {
>>>> +                               return
>>>> o.getClass().getName().replace(".wrapper", "");
>>>> +                       }
>>>> +               });
>>>> +
>>>> +               return e.create();
>>>> +       }
>>>>   }
>>>>
>>>>
>>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettings.java 
>>>>
>>>> ----------------------------------------------------------------------
>>>> diff --git
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettings.java
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettings.java
>>>> deleted file mode 100644
>>>> index efa6048..0000000
>>>> --- 
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettings.java
>>>> +++ /dev/null
>>>> @@ -1,128 +0,0 @@
>>>> -/*
>>>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>>>> - * contributor license agreements.  See the NOTICE file 
>>>> distributed with
>>>> - * this work for additional information regarding copyright 
>>>> ownership.
>>>> - * The ASF licenses this file to You under the Apache License, 
>>>> Version
>>>> 2.0
>>>> - * (the "License"); you may not use this file except in compliance 
>>>> with
>>>> - * the License.  You may obtain a copy of the License at
>>>> - *
>>>> - *      http://www.apache.org/licenses/LICENSE-2.0
>>>> - *
>>>> - * Unless required by applicable law or agreed to in writing, 
>>>> software
>>>> - * distributed under the License is distributed on an "AS IS" BASIS,
>>>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>> implied.
>>>> - * See the License for the specific language governing permissions 
>>>> and
>>>> - * limitations under the License.
>>>> - */
>>>> -package org.apache.wicket.jmx;
>>>> -
>>>> -
>>>> -/**
>>>> - * Exposes Application related functionality for JMX.
>>>> - *
>>>> - * @author eelcohillenius
>>>> - */
>>>> -public class MarkupSettings implements MarkupSettingsMBean
>>>> -{
>>>> -       private final org.apache.wicket.Application application;
>>>> -
>>>> -       /**
>>>> -        * Create.
>>>> -        *
>>>> -        * @param application
>>>> -        */
>>>> -       public MarkupSettings(final org.apache.wicket.Application
>>>> application)
>>>> -       {
>>>> -               this.application = application;
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.MarkupSettingsMBean#getAutomaticLinking()
>>>> -        */
>>>> -       @Override
>>>> -       public boolean getAutomaticLinking()
>>>> -       {
>>>> -               return
>>>> application.getMarkupSettings().getAutomaticLinking();
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.MarkupSettingsMBean#getCompressWhitespace()
>>>> -        */
>>>> -       @Override
>>>> -       public boolean getCompressWhitespace()
>>>> -       {
>>>> -               return
>>>> application.getMarkupSettings().getCompressWhitespace();
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.MarkupSettingsMBean#getDefaultMarkupEncoding()
>>>> -        */
>>>> -       @Override
>>>> -       public String getDefaultMarkupEncoding()
>>>> -       {
>>>> -               return
>>>> application.getMarkupSettings().getDefaultMarkupEncoding();
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.MarkupSettingsMBean#getStripComments()
>>>> -        */
>>>> -       @Override
>>>> -       public boolean getStripComments()
>>>> -       {
>>>> -               return 
>>>> application.getMarkupSettings().getStripComments();
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.MarkupSettingsMBean#getStripWicketTags()
>>>> -        */
>>>> -       @Override
>>>> -       public boolean getStripWicketTags()
>>>> -       {
>>>> -               return
>>>> application.getMarkupSettings().getStripWicketTags();
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.MarkupSettingsMBean#setAutomaticLinking(boolean)
>>>> -        */
>>>> -       @Override
>>>> -       public void setAutomaticLinking(final boolean 
>>>> automaticLinking)
>>>> -       {
>>>> -
>>>> application.getMarkupSettings().setAutomaticLinking(automaticLinking);
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.MarkupSettingsMBean#setCompressWhitespace(boolean) 
>>>>
>>>> -        */
>>>> -       @Override
>>>> -       public void setCompressWhitespace(final boolean
>>>> compressWhitespace)
>>>> -       {
>>>> -
>>>> application.getMarkupSettings().setCompressWhitespace(compressWhitespace); 
>>>>
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.MarkupSettingsMBean#setDefaultMarkupEncoding(java.lang.String) 
>>>>
>>>> -        */
>>>> -       @Override
>>>> -       public void setDefaultMarkupEncoding(final String encoding)
>>>> -       {
>>>> -
>>>> application.getMarkupSettings().setDefaultMarkupEncoding(encoding);
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.MarkupSettingsMBean#setStripComments(boolean)
>>>> -        */
>>>> -       @Override
>>>> -       public void setStripComments(final boolean stripComments)
>>>> -       {
>>>> -
>>>> application.getMarkupSettings().setStripComments(stripComments);
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.MarkupSettingsMBean#setStripWicketTags(boolean)
>>>> -        */
>>>> -       @Override
>>>> -       public void setStripWicketTags(final boolean stripWicketTags)
>>>> -       {
>>>> -
>>>> application.getMarkupSettings().setStripWicketTags(stripWicketTags);
>>>> -       }
>>>> -}
>>>>
>>>>
>>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettingsMBean.java 
>>>>
>>>> ----------------------------------------------------------------------
>>>> diff --git
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettingsMBean.java 
>>>>
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettingsMBean.java 
>>>>
>>>> index 91f2b23..df0d25d 100644
>>>> ---
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettingsMBean.java 
>>>>
>>>> +++
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettingsMBean.java 
>>>>
>>>> @@ -16,6 +16,8 @@
>>>>    */
>>>>   package org.apache.wicket.jmx;
>>>>
>>>> +import org.apache.wicket.jmx.wrapper.MarkupSettings;
>>>> +
>>>>   /**
>>>>    * Markup settings.
>>>>    *
>>>>
>>>>
>>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/PageSettings.java 
>>>>
>>>> ----------------------------------------------------------------------
>>>> diff --git
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/PageSettings.java
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/PageSettings.java
>>>> deleted file mode 100644
>>>> index b91b1e7..0000000
>>>> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/PageSettings.java
>>>> +++ /dev/null
>>>> @@ -1,56 +0,0 @@
>>>> -/*
>>>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>>>> - * contributor license agreements.  See the NOTICE file 
>>>> distributed with
>>>> - * this work for additional information regarding copyright 
>>>> ownership.
>>>> - * The ASF licenses this file to You under the Apache License, 
>>>> Version
>>>> 2.0
>>>> - * (the "License"); you may not use this file except in compliance 
>>>> with
>>>> - * the License.  You may obtain a copy of the License at
>>>> - *
>>>> - *      http://www.apache.org/licenses/LICENSE-2.0
>>>> - *
>>>> - * Unless required by applicable law or agreed to in writing, 
>>>> software
>>>> - * distributed under the License is distributed on an "AS IS" BASIS,
>>>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>> implied.
>>>> - * See the License for the specific language governing permissions 
>>>> and
>>>> - * limitations under the License.
>>>> - */
>>>> -package org.apache.wicket.jmx;
>>>> -
>>>> -
>>>> -/**
>>>> - * Exposes Application related functionality for JMX.
>>>> - *
>>>> - * @author eelcohillenius
>>>> - */
>>>> -public class PageSettings implements PageSettingsMBean
>>>> -{
>>>> -       private final org.apache.wicket.Application application;
>>>> -
>>>> -       /**
>>>> -        * Create.
>>>> -        *
>>>> -        * @param application
>>>> -        */
>>>> -       public PageSettings(final org.apache.wicket.Application
>>>> application)
>>>> -       {
>>>> -               this.application = application;
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.PageSettingsMBean#getVersionPagesByDefault()
>>>> -        */
>>>> -       @Override
>>>> -       public boolean getVersionPagesByDefault()
>>>> -       {
>>>> -               return
>>>> application.getPageSettings().getVersionPagesByDefault();
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.PageSettingsMBean#setVersionPagesByDefault(boolean) 
>>>>
>>>> -        */
>>>> -       @Override
>>>> -       public void setVersionPagesByDefault(final boolean
>>>> pagesVersionedByDefault)
>>>> -       {
>>>> -
>>>> application.getPageSettings().setVersionPagesByDefault(pagesVersionedByDefault); 
>>>>
>>>> -       }
>>>> -}
>>>>
>>>>
>>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestCycleSettings.java 
>>>>
>>>> ----------------------------------------------------------------------
>>>> diff --git
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestCycleSettings.java 
>>>>
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestCycleSettings.java 
>>>>
>>>> deleted file mode 100644
>>>> index 8815ee0..0000000
>>>> ---
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestCycleSettings.java 
>>>>
>>>> +++ /dev/null
>>>> @@ -1,125 +0,0 @@
>>>> -/*
>>>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>>>> - * contributor license agreements.  See the NOTICE file 
>>>> distributed with
>>>> - * this work for additional information regarding copyright 
>>>> ownership.
>>>> - * The ASF licenses this file to You under the Apache License, 
>>>> Version
>>>> 2.0
>>>> - * (the "License"); you may not use this file except in compliance 
>>>> with
>>>> - * the License.  You may obtain a copy of the License at
>>>> - *
>>>> - *      http://www.apache.org/licenses/LICENSE-2.0
>>>> - *
>>>> - * Unless required by applicable law or agreed to in writing, 
>>>> software
>>>> - * distributed under the License is distributed on an "AS IS" BASIS,
>>>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>> implied.
>>>> - * See the License for the specific language governing permissions 
>>>> and
>>>> - * limitations under the License.
>>>> - */
>>>> -package org.apache.wicket.jmx;
>>>> -
>>>> -import org.apache.wicket.util.time.Duration;
>>>> -
>>>> -
>>>> -/**
>>>> - * Exposes Application related functionality for JMX.
>>>> - *
>>>> - * @author eelcohillenius
>>>> - */
>>>> -public class RequestCycleSettings implements 
>>>> RequestCycleSettingsMBean
>>>> -{
>>>> -       private final org.apache.wicket.Application application;
>>>> -
>>>> -       /**
>>>> -        * Create.
>>>> -        *
>>>> -        * @param application
>>>> -        */
>>>> -       public RequestCycleSettings(final 
>>>> org.apache.wicket.Application
>>>> application)
>>>> -       {
>>>> -               this.application = application;
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.RequestCycleSettingsMBean#getBufferResponse()
>>>> -        */
>>>> -       @Override
>>>> -       public boolean getBufferResponse()
>>>> -       {
>>>> -               return
>>>> application.getRequestCycleSettings().getBufferResponse();
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.RequestCycleSettingsMBean#getGatherExtendedBrowserInfo() 
>>>>
>>>> -        */
>>>> -       @Override
>>>> -       public boolean getGatherExtendedBrowserInfo()
>>>> -       {
>>>> -               return
>>>> application.getRequestCycleSettings().getGatherExtendedBrowserInfo();
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.RequestCycleSettingsMBean#getResponseRequestEncoding() 
>>>>
>>>> -        */
>>>> -       @Override
>>>> -       public String getResponseRequestEncoding()
>>>> -       {
>>>> -               return
>>>> application.getRequestCycleSettings().getResponseRequestEncoding();
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.RequestCycleSettingsMBean#getTimeout()
>>>> -        */
>>>> -       @Override
>>>> -       public String getTimeout()
>>>> -       {
>>>> -               return
>>>> application.getRequestCycleSettings().getTimeout().toString();
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.RequestCycleSettingsMBean#setBufferResponse(boolean) 
>>>>
>>>> -        */
>>>> -       @Override
>>>> -       public void setBufferResponse(final boolean bufferResponse)
>>>> -       {
>>>> -
>>>> application.getRequestCycleSettings().setBufferResponse(bufferResponse); 
>>>>
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.RequestCycleSettingsMBean#setGatherExtendedBrowserInfo(boolean) 
>>>>
>>>> -        */
>>>> -       @Override
>>>> -       public void setGatherExtendedBrowserInfo(final boolean
>>>> gatherExtendedBrowserInfo)
>>>> -       {
>>>> -
>>>> application.getRequestCycleSettings().setGatherExtendedBrowserInfo(
>>>> -                       gatherExtendedBrowserInfo);
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.RequestCycleSettingsMBean#setResponseRequestEncoding(java.lang.String) 
>>>>
>>>> -        */
>>>> -       @Override
>>>> -       public void setResponseRequestEncoding(final String
>>>> responseRequestEncoding)
>>>> -       {
>>>> -
>>>> application.getRequestCycleSettings().setResponseRequestEncoding(responseRequestEncoding); 
>>>>
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.RequestCycleSettingsMBean#setTimeout(java.lang.String) 
>>>>
>>>> -        */
>>>> -       @Override
>>>> -       public void setTimeout(final String timeout)
>>>> -       {
>>>> -
>>>> application.getRequestCycleSettings().setTimeout(Duration.valueOf(timeout)); 
>>>>
>>>> -       }
>>>> -
>>>> -       @Override
>>>> -       public void setExceptionRetryCount(int retries)
>>>> -       {
>>>> -
>>>> application.getRequestCycleSettings().setExceptionRetryCount(retries);
>>>> -       }
>>>> -
>>>> -       @Override
>>>> -       public int getExceptionRetryCount()
>>>> -       {
>>>> -               return
>>>> application.getRequestCycleSettings().getExceptionRetryCount();
>>>> -       }
>>>> -}
>>>>
>>>>
>>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestLogger.java 
>>>>
>>>> ----------------------------------------------------------------------
>>>> diff --git
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestLogger.java
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestLogger.java
>>>> deleted file mode 100644
>>>> index 28ec4cf..0000000
>>>> --- 
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestLogger.java
>>>> +++ /dev/null
>>>> @@ -1,166 +0,0 @@
>>>> -/*
>>>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>>>> - * contributor license agreements.  See the NOTICE file 
>>>> distributed with
>>>> - * this work for additional information regarding copyright 
>>>> ownership.
>>>> - * The ASF licenses this file to You under the Apache License, 
>>>> Version
>>>> 2.0
>>>> - * (the "License"); you may not use this file except in compliance 
>>>> with
>>>> - * the License.  You may obtain a copy of the License at
>>>> - *
>>>> - *      http://www.apache.org/licenses/LICENSE-2.0
>>>> - *
>>>> - * Unless required by applicable law or agreed to in writing, 
>>>> software
>>>> - * distributed under the License is distributed on an "AS IS" BASIS,
>>>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>> implied.
>>>> - * See the License for the specific language governing permissions 
>>>> and
>>>> - * limitations under the License.
>>>> - */
>>>> -package org.apache.wicket.jmx;
>>>> -
>>>> -import java.io.IOException;
>>>> -
>>>> -import org.apache.wicket.protocol.http.WebApplication;
>>>> -
>>>> -
>>>> -/**
>>>> - * Exposes {@link org.apache.wicket.protocol.http.RequestLogger} 
>>>> for JMX.
>>>> - *
>>>> - * @author eelcohillenius
>>>> - */
>>>> -public class RequestLogger implements RequestLoggerMBean
>>>> -{
>>>> -       private final org.apache.wicket.Application application;
>>>> -
>>>> -       private final WebApplication webApplication;
>>>> -
>>>> -       /**
>>>> -        * Construct.
>>>> -        *
>>>> -        * @param application
>>>> -        *            The application
>>>> -        */
>>>> -       public RequestLogger(final org.apache.wicket.Application
>>>> application)
>>>> -       {
>>>> -               this.application = application;
>>>> -
>>>> -               // do this so that we don't have to cast all the time
>>>> -               if (application instanceof WebApplication)
>>>> -               {
>>>> -                       webApplication = (WebApplication)application;
>>>> -               }
>>>> -               else
>>>> -               {
>>>> -                       webApplication = null;
>>>> -               }
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.RequestLoggerMBean#getNumberOfCreatedSessions()
>>>> -        */
>>>> -       @Override
>>>> -       public Integer getNumberOfCreatedSessions() throws IOException
>>>> -       {
>>>> - org.apache.wicket.protocol.http.IRequestLogger logger =
>>>> getRequestLogger();
>>>> -               if (logger != null)
>>>> -               {
>>>> -                       return logger.getTotalCreatedSessions();
>>>> -               }
>>>> -               return null;
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.RequestLoggerMBean#getNumberOfLiveSessions()
>>>> -        */
>>>> -       @Override
>>>> -       public Integer getNumberOfLiveSessions() throws IOException
>>>> -       {
>>>> - org.apache.wicket.protocol.http.IRequestLogger logger =
>>>> getRequestLogger();
>>>> -               if (logger != null)
>>>> -               {
>>>> -                       return logger.getLiveSessions().length;
>>>> -               }
>>>> -               return null;
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.RequestLoggerMBean#getPeakNumberOfSessions()
>>>> -        */
>>>> -       @Override
>>>> -       public Integer getPeakNumberOfSessions() throws IOException
>>>> -       {
>>>> - org.apache.wicket.protocol.http.IRequestLogger logger =
>>>> getRequestLogger();
>>>> -               if (logger != null)
>>>> -               {
>>>> -                       return logger.getPeakSessions();
>>>> -               }
>>>> -               return null;
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.RequestLoggerMBean#getNumberOfCurrentActiveRequests() 
>>>>
>>>> -        */
>>>> -       @Override
>>>> -       public Integer getNumberOfCurrentActiveRequests() throws
>>>> IOException
>>>> -       {
>>>> - org.apache.wicket.protocol.http.IRequestLogger logger =
>>>> getRequestLogger();
>>>> -               if (logger != null)
>>>> -               {
>>>> -                       return
>>>> Integer.valueOf(logger.getCurrentActiveRequestCount());
>>>> -               }
>>>> -               return null;
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.RequestLoggerMBean#getPeakNumberOfActiveRequests() 
>>>>
>>>> -        */
>>>> -       @Override
>>>> -       public Integer getPeakNumberOfActiveRequests() throws 
>>>> IOException
>>>> -       {
>>>> - org.apache.wicket.protocol.http.IRequestLogger logger =
>>>> getRequestLogger();
>>>> -               if (logger != null)
>>>> -               {
>>>> -                       return
>>>> Integer.valueOf(logger.getPeakActiveRequestCount());
>>>> -               }
>>>> -               return null;
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see org.apache.wicket.jmx.RequestLoggerMBean#restart()
>>>> -        */
>>>> -       @Override
>>>> -       public void restart() throws IOException
>>>> -       {
>>>> -               if (webApplication != null)
>>>> -               {
>>>> -
>>>> webApplication.getRequestLoggerSettings().setRequestLoggerEnabled(false); 
>>>>
>>>> -                       webApplication.getRequestLogger();
>>>> -
>>>> webApplication.getRequestLoggerSettings().setRequestLoggerEnabled(true); 
>>>>
>>>> -               }
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see org.apache.wicket.jmx.RequestLoggerMBean#stop()
>>>> -        */
>>>> -       @Override
>>>> -       public void stop() throws IOException
>>>> -       {
>>>> -               if (webApplication != null)
>>>> -               {
>>>> -
>>>> webApplication.getRequestLoggerSettings().setRequestLoggerEnabled(false); 
>>>>
>>>> -               }
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * Gets the request logger for this application.
>>>> -        *
>>>> -        * @return The request logger or null if no request is 
>>>> active, or
>>>> if this is not a web
>>>> -        *         application
>>>> -        */
>>>> -       protected org.apache.wicket.protocol.http.IRequestLogger
>>>> getRequestLogger()
>>>> -       {
>>>> -               if (application instanceof WebApplication)
>>>> -               {
>>>> -                       return application.getRequestLogger();
>>>> -               }
>>>> -               return null;
>>>> -       }
>>>> -}
>>>>
>>>>
>>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/ResourceSettings.java 
>>>>
>>>> ----------------------------------------------------------------------
>>>> diff --git
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/ResourceSettings.java
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/ResourceSettings.java
>>>> deleted file mode 100644
>>>> index af7f60d..0000000
>>>> --- 
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/ResourceSettings.java
>>>> +++ /dev/null
>>>> @@ -1,173 +0,0 @@
>>>> -/*
>>>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>>>> - * contributor license agreements.  See the NOTICE file 
>>>> distributed with
>>>> - * this work for additional information regarding copyright 
>>>> ownership.
>>>> - * The ASF licenses this file to You under the Apache License, 
>>>> Version
>>>> 2.0
>>>> - * (the "License"); you may not use this file except in compliance 
>>>> with
>>>> - * the License.  You may obtain a copy of the License at
>>>> - *
>>>> - *      http://www.apache.org/licenses/LICENSE-2.0
>>>> - *
>>>> - * Unless required by applicable law or agreed to in writing, 
>>>> software
>>>> - * distributed under the License is distributed on an "AS IS" BASIS,
>>>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>> implied.
>>>> - * See the License for the specific language governing permissions 
>>>> and
>>>> - * limitations under the License.
>>>> - */
>>>> -package org.apache.wicket.jmx;
>>>> -
>>>> -import java.util.List;
>>>> -
>>>> -import org.apache.wicket.ThreadContext;
>>>> -import org.apache.wicket.resource.loader.IStringResourceLoader;
>>>> -import org.apache.wicket.util.file.IResourceFinder;
>>>> -import org.apache.wicket.util.lang.Generics;
>>>> -import org.apache.wicket.util.time.Duration;
>>>> -
>>>> -
>>>> -/**
>>>> - * Exposes Application related functionality for JMX.
>>>> - *
>>>> - * @author eelcohillenius
>>>> - */
>>>> -public class ResourceSettings implements ResourceSettingsMBean
>>>> -{
>>>> -       private final org.apache.wicket.Application application;
>>>> -
>>>> -       /**
>>>> -        * Create.
>>>> -        *
>>>> -        * @param application
>>>> -        */
>>>> -       public ResourceSettings(final org.apache.wicket.Application
>>>> application)
>>>> -       {
>>>> -               this.application = application;
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * {@inheritDoc}
>>>> -        */
>>>> -       @Override
>>>> -       public String getLocalizer()
>>>> -       {
>>>> -               return
>>>> Stringz.className(application.getResourceSettings().getLocalizer());
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * {@inheritDoc}
>>>> -        */
>>>> -       @Override
>>>> -       public String getPackageResourceGuard()
>>>> -       {
>>>> -               return
>>>> Stringz.className(application.getResourceSettings().getPackageResourceGuard()); 
>>>>
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * {@inheritDoc}
>>>> -        */
>>>> -       @Override
>>>> -       public String getPropertiesFactory()
>>>> -       {
>>>> -               ThreadContext.setApplication(application);
>>>> -
>>>> -               try
>>>> -               {
>>>> -                       return
>>>> Stringz.className(application.getResourceSettings().getPropertiesFactory()); 
>>>>
>>>> -               }
>>>> -               finally
>>>> -               {
>>>> -                       ThreadContext.detach();
>>>> -               }
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * {@inheritDoc}
>>>> -        */
>>>> -       @Override
>>>> -       public String getResourceFinders()
>>>> -       {
>>>> -               StringBuilder builder = new StringBuilder();
>>>> -               for (IResourceFinder rf :
>>>> application.getResourceSettings().getResourceFinders())
>>>> -               {
>>>> - builder.append(Stringz.className(rf));
>>>> -               }
>>>> -               return builder.toString();
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * {@inheritDoc}
>>>> -        */
>>>> -       @Override
>>>> -       public String getResourcePollFrequency()
>>>> -       {
>>>> -               Duration duration =
>>>> application.getResourceSettings().getResourcePollFrequency();
>>>> -               return (duration != null) ? duration.toString() : 
>>>> null;
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * {@inheritDoc}
>>>> -        */
>>>> -       @Override
>>>> -       public String getResourceStreamLocator()
>>>> -       {
>>>> -               return
>>>> Stringz.className(application.getResourceSettings().getResourceStreamLocator()); 
>>>>
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * {@inheritDoc}
>>>> -        */
>>>> -       @Override
>>>> -       public String[] getStringResourceLoaders()
>>>> -       {
>>>> -               List<IStringResourceLoader> loaders =
>>>> application.getResourceSettings()
>>>> -                       .getStringResourceLoaders();
>>>> -               if (loaders != null)
>>>> -               {
>>>> -                       List<String> list = Generics.newArrayList();
>>>> -                       for (Object loader : loaders)
>>>> -                       {
>>>> -                               list.add(loader.toString());
>>>> -                       }
>>>> -                       return list.toArray(new 
>>>> String[loaders.size()]);
>>>> -               }
>>>> -               return null;
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * {@inheritDoc}
>>>> -        */
>>>> -       @Override
>>>> -       public boolean getThrowExceptionOnMissingResource()
>>>> -       {
>>>> -               return
>>>> application.getResourceSettings().getThrowExceptionOnMissingResource(); 
>>>>
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * {@inheritDoc}
>>>> -        */
>>>> -       @Override
>>>> -       public boolean getUseDefaultOnMissingResource()
>>>> -       {
>>>> -               return
>>>> application.getResourceSettings().getUseDefaultOnMissingResource();
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * {@inheritDoc}
>>>> -        */
>>>> -       @Override
>>>> -       public void setThrowExceptionOnMissingResource(final boolean
>>>> throwExceptionOnMissingResource)
>>>> -       {
>>>> -
>>>> application.getResourceSettings().setThrowExceptionOnMissingResource(
>>>> -                       throwExceptionOnMissingResource);
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * {@inheritDoc}
>>>> -        */
>>>> -       @Override
>>>> -       public void setUseDefaultOnMissingResource(final boolean
>>>> useDefaultOnMissingResource)
>>>> -       {
>>>> -
>>>> application.getResourceSettings().setUseDefaultOnMissingResource(
>>>> -                       useDefaultOnMissingResource);
>>>> -       }
>>>> -}
>>>>
>>>>
>>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/SecuritySettings.java 
>>>>
>>>> ----------------------------------------------------------------------
>>>> diff --git
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/SecuritySettings.java
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/SecuritySettings.java
>>>> deleted file mode 100644
>>>> index be89017..0000000
>>>> --- 
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/SecuritySettings.java
>>>> +++ /dev/null
>>>> @@ -1,65 +0,0 @@
>>>> -/*
>>>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>>>> - * contributor license agreements.  See the NOTICE file 
>>>> distributed with
>>>> - * this work for additional information regarding copyright 
>>>> ownership.
>>>> - * The ASF licenses this file to You under the Apache License, 
>>>> Version
>>>> 2.0
>>>> - * (the "License"); you may not use this file except in compliance 
>>>> with
>>>> - * the License.  You may obtain a copy of the License at
>>>> - *
>>>> - *      http://www.apache.org/licenses/LICENSE-2.0
>>>> - *
>>>> - * Unless required by applicable law or agreed to in writing, 
>>>> software
>>>> - * distributed under the License is distributed on an "AS IS" BASIS,
>>>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>> implied.
>>>> - * See the License for the specific language governing permissions 
>>>> and
>>>> - * limitations under the License.
>>>> - */
>>>> -package org.apache.wicket.jmx;
>>>> -
>>>> -/**
>>>> - * Exposes Application related functionality for JMX.
>>>> - *
>>>> - * @author eelcohillenius
>>>> - */
>>>> -public class SecuritySettings implements SecuritySettingsMBean
>>>> -{
>>>> -       private final org.apache.wicket.Application application;
>>>> -
>>>> -       /**
>>>> -        * Create.
>>>> -        *
>>>> -        * @param application
>>>> -        */
>>>> -       public SecuritySettings(final org.apache.wicket.Application
>>>> application)
>>>> -       {
>>>> -               this.application = application;
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.SecuritySettingsMBean#getAuthorizationStrategy()
>>>> -        */
>>>> -       @Override
>>>> -       public String getAuthorizationStrategy()
>>>> -       {
>>>> -               return
>>>> Stringz.className(application.getSecuritySettings().getAuthorizationStrategy()); 
>>>>
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.SecuritySettingsMBean#getCryptFactory()
>>>> -        */
>>>> -       @Override
>>>> -       public String getCryptFactory()
>>>> -       {
>>>> -               return
>>>> Stringz.className(application.getSecuritySettings().getCryptFactory()); 
>>>>
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.SecuritySettingsMBean#getUnauthorizedComponentInstantiationListener() 
>>>>
>>>> -        */
>>>> -       @Override
>>>> -       public String getUnauthorizedComponentInstantiationListener()
>>>> -       {
>>>> -               return 
>>>> Stringz.className(application.getSecuritySettings()
>>>> - .getUnauthorizedComponentInstantiationListener());
>>>> -       }
>>>> -}
>>>>
>>>>
>>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/SessionSettings.java 
>>>>
>>>> ----------------------------------------------------------------------
>>>> diff --git
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/SessionSettings.java
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/SessionSettings.java
>>>> deleted file mode 100644
>>>> index 6c15ab3..0000000
>>>> --- 
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/SessionSettings.java
>>>> +++ /dev/null
>>>> @@ -1,55 +0,0 @@
>>>> -/*
>>>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>>>> - * contributor license agreements.  See the NOTICE file 
>>>> distributed with
>>>> - * this work for additional information regarding copyright 
>>>> ownership.
>>>> - * The ASF licenses this file to You under the Apache License, 
>>>> Version
>>>> 2.0
>>>> - * (the "License"); you may not use this file except in compliance 
>>>> with
>>>> - * the License.  You may obtain a copy of the License at
>>>> - *
>>>> - *      http://www.apache.org/licenses/LICENSE-2.0
>>>> - *
>>>> - * Unless required by applicable law or agreed to in writing, 
>>>> software
>>>> - * distributed under the License is distributed on an "AS IS" BASIS,
>>>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>> implied.
>>>> - * See the License for the specific language governing permissions 
>>>> and
>>>> - * limitations under the License.
>>>> - */
>>>> -package org.apache.wicket.jmx;
>>>> -
>>>> -/**
>>>> - * Exposes Application related functionality for JMX.
>>>> - *
>>>> - * @author eelcohillenius
>>>> - */
>>>> -public class SessionSettings implements SessionSettingsMBean
>>>> -{
>>>> -       private final org.apache.wicket.Application application;
>>>> -
>>>> -       /**
>>>> -        * Create.
>>>> -        *
>>>> -        * @param application
>>>> -        */
>>>> -       public SessionSettings(final org.apache.wicket.Application
>>>> application)
>>>> -       {
>>>> -               this.application = application;
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.SessionSettingsMBean#getPageFactory()
>>>> -        */
>>>> -       @Override
>>>> -       public String getPageFactory()
>>>> -       {
>>>> -               return 
>>>> Stringz.className(application.getPageFactory());
>>>> -       }
>>>> -
>>>> -       /**
>>>> -        * @see
>>>> org.apache.wicket.jmx.SessionSettingsMBean#getSessionStore()
>>>> -        */
>>>> -       @Override
>>>> -       public String getSessionStore()
>>>> -       {
>>>> -               return 
>>>> Stringz.className(application.getSessionStore());
>>>> -       }
>>>> -}
>>>>
>>>>
>>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/StoreSettings.java 
>>>>
>>>> ----------------------------------------------------------------------
>>>> diff --git
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/StoreSettings.java
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/StoreSettings.java
>>>> deleted file mode 100644
>>>> index 4705f3f..0000000
>>>> --- 
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/StoreSettings.java
>>>> +++ /dev/null
>>>> @@ -1,68 +0,0 @@
>>>> -/*
>>>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>>>> - * contributor license agreements.  See the NOTICE file 
>>>> distributed with
>>>> - * this work for additional information regarding copyright 
>>>> ownership.
>>>> - * The ASF licenses this file to You under the Apache License, 
>>>> Version
>>>> 2.0
>>>> - * (the "License"); you may not use this file except in compliance 
>>>> with
>>>> - * the License.  You may obtain a copy of the License at
>>>> - *
>>>> - *      http://www.apache.org/licenses/LICENSE-2.0
>>>> - *
>>>> - * Unless required by applicable law or agreed to in writing, 
>>>> software
>>>> - * distributed under the License is distributed on an "AS IS" BASIS,
>>>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>> implied.
>>>> - * See the License for the specific language governing permissions 
>>>> and
>>>> - * limitations under the License.
>>>> - */
>>>> -package org.apache.wicket.jmx;
>>>> -
>>>> -import org.apache.wicket.Application;
>>>> -
>>>> -/**
>>>> - * Exposes Application's StoreSettings for JMX.
>>>> - */
>>>> -public class StoreSettings implements StoreSettingsMBean
>>>> -{
>>>> -       private final Application application;
>>>> -
>>>> -       /**
>>>> -        * Construct.
>>>> -        *
>>>> -        * @param application
>>>> -        */
>>>> -       public StoreSettings(final Application application)
>>>> -       {
>>>> -               this.application = application;
>>>> -       }
>>>> -
>>>> -       @Override
>>>> -       public int getInmemoryCacheSize()
>>>> -       {
>>>> -               return
>>>> application.getStoreSettings().getInmemoryCacheSize();
>>>> -       }
>>>> -
>>>> -       @Override
>>>> -       public long getMaxSizePerSession()
>>>> -       {
>>>> -               return
>>>> application.getStoreSettings().getMaxSizePerSession().bytes();
>>>> -       }
>>>> -
>>>> -       @Override
>>>> -       public String getFileStoreFolder()
>>>> -       {
>>>> -               return
>>>> application.getStoreSettings().getFileStoreFolder().getAbsolutePath();
>>>> -       }
>>>> -
>>>> -       @Override
>>>> -       public int getAsynchronousQueueCapacity()
>>>> -       {
>>>> -               return
>>>> application.getStoreSettings().getAsynchronousQueueCapacity();
>>>> -       }
>>>> -
>>>> -       @Override
>>>> -       public boolean isAsynchronous()
>>>> -       {
>>>> -               return 
>>>> application.getStoreSettings().isAsynchronous();
>>>> -       }
>>>> -
>>>> -}
>>>>
>>>>
>>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/Stringz.java 
>>>>
>>>> ----------------------------------------------------------------------
>>>> diff --git 
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/Stringz.java
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/Stringz.java
>>>> deleted file mode 100644
>>>> index f9f6381..0000000
>>>> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/Stringz.java
>>>> +++ /dev/null
>>>> @@ -1,25 +0,0 @@
>>>> -/*
>>>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>>>> - * contributor license agreements.  See the NOTICE file 
>>>> distributed with
>>>> - * this work for additional information regarding copyright 
>>>> ownership.
>>>> - * The ASF licenses this file to You under the Apache License, 
>>>> Version
>>>> 2.0
>>>> - * (the "License"); you may not use this file except in compliance 
>>>> with
>>>> - * the License.  You may obtain a copy of the License at
>>>> - *
>>>> - *      http://www.apache.org/licenses/LICENSE-2.0
>>>> - *
>>>> - * Unless required by applicable law or agreed to in writing, 
>>>> software
>>>> - * distributed under the License is distributed on an "AS IS" BASIS,
>>>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>> implied.
>>>> - * See the License for the specific language governing permissions 
>>>> and
>>>> - * limitations under the License.
>>>> - */
>>>> -package org.apache.wicket.jmx;
>>>> -
>>>> -class Stringz
>>>> -{
>>>> -       static String className(final Object o)
>>>> -       {
>>>> -               return (o != null) ? o.getClass().getName() : null;
>>>> -       }
>>>> -}
>>>>
>>>>
>>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/Application.java 
>>>>
>>>> ----------------------------------------------------------------------
>>>> diff --git
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/Application.java 
>>>>
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/Application.java 
>>>>
>>>> new file mode 100644
>>>> index 0000000..56e0eff
>>>> --- /dev/null
>>>> +++
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/Application.java 
>>>>
>>>> @@ -0,0 +1,104 @@
>>>> +/*
>>>> + * Licensed to the Apache Software Foundation (ASF) under one or more
>>>> + * contributor license agreements.  See the NOTICE file 
>>>> distributed with
>>>> + * this work for additional information regarding copyright 
>>>> ownership.
>>>> + * The ASF licenses this file to You under the Apache License, 
>>>> Version
>>>> 2.0
>>>> + * (the "License"); you may not use this file except in compliance 
>>>> with
>>>> + * the License.  You may obtain a copy of the License at
>>>> + *
>>>> + *      http://www.apache.org/licenses/LICENSE-2.0
>>>> + *
>>>> + * Unless required by applicable law or agreed to in writing, 
>>>> software
>>>> + * distributed under the License is distributed on an "AS IS" BASIS,
>>>> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>> implied.
>>>> + * See the License for the specific language governing permissions 
>>>> and
>>>> + * limitations under the License.
>>>> + */
>>>> +package org.apache.wicket.jmx.wrapper;
>>>> +
>>>> +import java.io.IOException;
>>>> +
>>>> +import org.apache.wicket.jmx.ApplicationMBean;
>>>> +
>>>> +/**
>>>> + * Exposes Application related functionality for JMX.
>>>> + *
>>>> + * @author eelcohillenius
>>>> + */
>>>> +public class Application implements ApplicationMBean
>>>> +{
>>>> +       private final org.apache.wicket.Application application;
>>>> +
>>>> +       /**
>>>> +        * Create.
>>>> +        *
>>>> +        * @param application
>>>> +        */
>>>> +       public Application(final org.apache.wicket.Application
>>>> application)
>>>> +       {
>>>> +               this.application = application;
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see 
>>>> org.apache.wicket.jmx.ApplicationMBean#clearMarkupCache()
>>>> +        */
>>>> +       @Override
>>>> +       public void clearMarkupCache() throws IOException
>>>> +       {
>>>> +
>>>> application.getMarkupSettings().getMarkupFactory().getMarkupCache().clear(); 
>>>>
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.ApplicationMBean#getApplicationClass()
>>>> +        */
>>>> +       @Override
>>>> +       public String getApplicationClass() throws IOException
>>>> +       {
>>>> +               return application.getClass().getName();
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.ApplicationMBean#getConfigurationType()
>>>> +        */
>>>> +       @Override
>>>> +       public String getConfigurationType()
>>>> +       {
>>>> +               return application.getConfigurationType().name();
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see 
>>>> org.apache.wicket.jmx.ApplicationMBean#getHomePageClass()
>>>> +        */
>>>> +       @Override
>>>> +       public String getHomePageClass() throws IOException
>>>> +       {
>>>> +               return application.getHomePage().getName();
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.ApplicationMBean#getMarkupCacheSize()
>>>> +        */
>>>> +       @Override
>>>> +       public int getMarkupCacheSize() throws IOException
>>>> +       {
>>>> +               return
>>>> application.getMarkupSettings().getMarkupFactory().getMarkupCache().size(); 
>>>>
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see 
>>>> org.apache.wicket.jmx.ApplicationMBean#getWicketVersion()
>>>> +        */
>>>> +       @Override
>>>> +       public String getWicketVersion() throws IOException
>>>> +       {
>>>> +               return 
>>>> application.getFrameworkSettings().getVersion();
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.ApplicationMBean#clearLocalizerCache()
>>>> +        */
>>>> +       @Override
>>>> +       public void clearLocalizerCache() throws IOException
>>>> +       {
>>>> +
>>>> application.getResourceSettings().getLocalizer().clearCache();
>>>> +       }
>>>> +}
>>>>
>>>>
>>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/ApplicationSettings.java 
>>>>
>>>> ----------------------------------------------------------------------
>>>> diff --git
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/ApplicationSettings.java 
>>>>
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/ApplicationSettings.java 
>>>>
>>>> new file mode 100644
>>>> index 0000000..a6a0d4c
>>>> --- /dev/null
>>>> +++
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/ApplicationSettings.java 
>>>>
>>>> @@ -0,0 +1,103 @@
>>>> +/*
>>>> + * Licensed to the Apache Software Foundation (ASF) under one or more
>>>> + * contributor license agreements.  See the NOTICE file 
>>>> distributed with
>>>> + * this work for additional information regarding copyright 
>>>> ownership.
>>>> + * The ASF licenses this file to You under the Apache License, 
>>>> Version
>>>> 2.0
>>>> + * (the "License"); you may not use this file except in compliance 
>>>> with
>>>> + * the License.  You may obtain a copy of the License at
>>>> + *
>>>> + *      http://www.apache.org/licenses/LICENSE-2.0
>>>> + *
>>>> + * Unless required by applicable law or agreed to in writing, 
>>>> software
>>>> + * distributed under the License is distributed on an "AS IS" BASIS,
>>>> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>> implied.
>>>> + * See the License for the specific language governing permissions 
>>>> and
>>>> + * limitations under the License.
>>>> + */
>>>> +package org.apache.wicket.jmx.wrapper;
>>>> +
>>>> +import org.apache.wicket.Application;
>>>> +import org.apache.wicket.jmx.ApplicationSettingsMBean;
>>>> +import org.apache.wicket.util.lang.Bytes;
>>>> +import org.apache.wicket.util.lang.Classes;
>>>> +
>>>> +/**
>>>> + * Exposes Application related functionality for JMX.
>>>> + *
>>>> + * @author eelcohillenius
>>>> + */
>>>> +public class ApplicationSettings implements ApplicationSettingsMBean
>>>> +{
>>>> +       private final Application application;
>>>> +
>>>> +       /**
>>>> +        * Create.
>>>> +        *
>>>> +        * @param application
>>>> +        */
>>>> +       public ApplicationSettings(final Application application)
>>>> +       {
>>>> +               this.application = application;
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.ApplicationSettingsMBean#getAccessDeniedPage()
>>>> +        */
>>>> +       @Override
>>>> +       public String getAccessDeniedPage()
>>>> +       {
>>>> +               return
>>>> Classes.name(application.getApplicationSettings().getAccessDeniedPage()); 
>>>>
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.ApplicationSettingsMBean#getClassResolver()
>>>> +        */
>>>> +       @Override
>>>> +       public String getClassResolver()
>>>> +       {
>>>> +               return
>>>> Stringz.className(application.getApplicationSettings().getClassResolver()); 
>>>>
>>>> +       }
>>>> +
>>>> +       @Override
>>>> +       public String getDefaultMaximumUploadSize()
>>>> +       {
>>>> +               return
>>>> application.getApplicationSettings().getDefaultMaximumUploadSize().toString(); 
>>>>
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.ApplicationSettingsMBean#getInternalErrorPage()
>>>> +        */
>>>> +       @Override
>>>> +       public String getInternalErrorPage()
>>>> +       {
>>>> +               return
>>>> Classes.name(application.getApplicationSettings().getInternalErrorPage()); 
>>>>
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.ApplicationSettingsMBean#getPageExpiredErrorPage() 
>>>>
>>>> +        */
>>>> +       @Override
>>>> +       public String getPageExpiredErrorPage()
>>>> +       {
>>>> +               return
>>>> Classes.name(application.getApplicationSettings().getPageExpiredErrorPage()); 
>>>>
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.ApplicationSettingsMBean#getUnexpectedExceptionDisplay() 
>>>>
>>>> +        */
>>>> +       @Override
>>>> +       public String getUnexpectedExceptionDisplay()
>>>> +       {
>>>> +               return
>>>> application.getExceptionSettings().getUnexpectedExceptionDisplay().toString(); 
>>>>
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.ApplicationSettingsMBean#setDefaultMaximumUploadSize(java.lang.String) 
>>>>
>>>> +        */
>>>> +       @Override
>>>> +       public void setDefaultMaximumUploadSize(final String
>>>> defaultUploadSize)
>>>> +       {
>>>> +
>>>> application.getApplicationSettings().setDefaultMaximumUploadSize(
>>>> +                       Bytes.valueOf(defaultUploadSize));
>>>> +       }
>>>> +}
>>>>
>>>>
>>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/DebugSettings.java 
>>>>
>>>> ----------------------------------------------------------------------
>>>> diff --git
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/DebugSettings.java 
>>>>
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/DebugSettings.java 
>>>>
>>>> new file mode 100644
>>>> index 0000000..fcd073a
>>>> --- /dev/null
>>>> +++
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/DebugSettings.java 
>>>>
>>>> @@ -0,0 +1,167 @@
>>>> +/*
>>>> + * Licensed to the Apache Software Foundation (ASF) under one or more
>>>> + * contributor license agreements.  See the NOTICE file 
>>>> distributed with
>>>> + * this work for additional information regarding copyright 
>>>> ownership.
>>>> + * The ASF licenses this file to You under the Apache License, 
>>>> Version
>>>> 2.0
>>>> + * (the "License"); you may not use this file except in compliance 
>>>> with
>>>> + * the License.  You may obtain a copy of the License at
>>>> + *
>>>> + *      http://www.apache.org/licenses/LICENSE-2.0
>>>> + *
>>>> + * Unless required by applicable law or agreed to in writing, 
>>>> software
>>>> + * distributed under the License is distributed on an "AS IS" BASIS,
>>>> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>> implied.
>>>> + * See the License for the specific language governing permissions 
>>>> and
>>>> + * limitations under the License.
>>>> + */
>>>> +package org.apache.wicket.jmx.wrapper;
>>>> +
>>>> +import org.apache.wicket.Application;
>>>> +import org.apache.wicket.jmx.DebugSettingsMBean;
>>>> +
>>>> +/**
>>>> + * Exposes Application related functionality for JMX.
>>>> + *
>>>> + * @author eelcohillenius
>>>> + */
>>>> +public class DebugSettings implements DebugSettingsMBean
>>>> +{
>>>> +       private final Application application;
>>>> +
>>>> +       /**
>>>> +        * Create.
>>>> +        *
>>>> +        * @param application
>>>> +        */
>>>> +       public DebugSettings(final Application application)
>>>> +       {
>>>> +               this.application = application;
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.DebugSettingsMBean#getComponentUseCheck()
>>>> +        */
>>>> +       @Override
>>>> +       public boolean getComponentUseCheck()
>>>> +       {
>>>> +               return
>>>> application.getDebugSettings().getComponentUseCheck();
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.DebugSettingsMBean#isAjaxDebugModeEnabled()
>>>> +        */
>>>> +       @Override
>>>> +       public boolean isAjaxDebugModeEnabled()
>>>> +       {
>>>> +               return
>>>> application.getDebugSettings().isAjaxDebugModeEnabled();
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.DebugSettingsMBean#setAjaxDebugModeEnabled(boolean) 
>>>>
>>>> +        */
>>>> +       @Override
>>>> +       public void setAjaxDebugModeEnabled(final boolean enable)
>>>> +       {
>>>> +
>>>> application.getDebugSettings().setAjaxDebugModeEnabled(enable);
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.DebugSettingsMBean#setComponentUseCheck(boolean)
>>>> +        */
>>>> +       @Override
>>>> +       public void setComponentUseCheck(final boolean check)
>>>> +       {
>>>> +
>>>> application.getDebugSettings().setComponentUseCheck(check);
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.DebugSettingsMBean#setOutputComponentPath(boolean) 
>>>>
>>>> +        */
>>>> +       @Override
>>>> +       public void setOutputComponentPath(final boolean enabled)
>>>> +       {
>>>> +
>>>> application.getDebugSettings().setOutputComponentPath(enabled);
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.DebugSettingsMBean#isOutputComponentPath()
>>>> +        */
>>>> +       @Override
>>>> +       public boolean isOutputComponentPath()
>>>> +       {
>>>> +               return
>>>> application.getDebugSettings().isOutputComponentPath();
>>>> +       }
>>>> +
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.DebugSettingsMBean#setOutputMarkupContainerClassName(boolean) 
>>>>
>>>> +        */
>>>> +       @Override
>>>> +       public void setOutputMarkupContainerClassName(final boolean
>>>> enable)
>>>> +       {
>>>> +
>>>> application.getDebugSettings().setOutputMarkupContainerClassName(enable); 
>>>>
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.DebugSettingsMBean#isOutputMarkupContainerClassName() 
>>>>
>>>> +        */
>>>> +       @Override
>>>> +       public boolean isOutputMarkupContainerClassName()
>>>> +       {
>>>> +               return
>>>> application.getDebugSettings().isOutputMarkupContainerClassName();
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.DebugSettingsMBean#isLinePreciseReportingOnAddComponentEnabled() 
>>>>
>>>> +        */
>>>> +       @Override
>>>> +       public boolean isLinePreciseReportingOnAddComponentEnabled()
>>>> +       {
>>>> +               return
>>>> application.getDebugSettings().isLinePreciseReportingOnAddComponentEnabled(); 
>>>>
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.DebugSettingsMBean#setLinePreciseReportingOnAddComponentEnabled(boolean) 
>>>>
>>>> +        */
>>>> +       @Override
>>>> +       public void setLinePreciseReportingOnAddComponentEnabled(final
>>>> boolean enable)
>>>> +       {
>>>> +
>>>> application.getDebugSettings().setLinePreciseReportingOnAddComponentEnabled(enable); 
>>>>
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.DebugSettingsMBean#isLinePreciseReportingOnNewComponentEnabled() 
>>>>
>>>> +        */
>>>> +       @Override
>>>> +       public boolean isLinePreciseReportingOnNewComponentEnabled()
>>>> +       {
>>>> +               return
>>>> application.getDebugSettings().isLinePreciseReportingOnNewComponentEnabled(); 
>>>>
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.DebugSettingsMBean#setLinePreciseReportingOnNewComponentEnabled(boolean) 
>>>>
>>>> +        */
>>>> +       @Override
>>>> +       public void setLinePreciseReportingOnNewComponentEnabled(final
>>>> boolean enable)
>>>> +       {
>>>> +
>>>> application.getDebugSettings().setLinePreciseReportingOnNewComponentEnabled(enable); 
>>>>
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.DebugSettingsMBean#setDevelopmentUtilitiesEnabled(boolean) 
>>>>
>>>> +        */
>>>> +       @Override
>>>> +       public void setDevelopmentUtilitiesEnabled(final boolean 
>>>> enable)
>>>> +       {
>>>> +
>>>> application.getDebugSettings().setDevelopmentUtilitiesEnabled(enable);
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.DebugSettingsMBean#isDevelopmentUtilitiesEnabled() 
>>>>
>>>> +        */
>>>> +       @Override
>>>> +       public boolean isDevelopmentUtilitiesEnabled()
>>>> +       {
>>>> +               return
>>>> application.getDebugSettings().isDevelopmentUtilitiesEnabled();
>>>> +       }
>>>> +}
>>>>
>>>>
>>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/MarkupSettings.java 
>>>>
>>>> ----------------------------------------------------------------------
>>>> diff --git
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/MarkupSettings.java 
>>>>
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/MarkupSettings.java 
>>>>
>>>> new file mode 100644
>>>> index 0000000..387b2ba
>>>> --- /dev/null
>>>> +++
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/MarkupSettings.java 
>>>>
>>>> @@ -0,0 +1,131 @@
>>>> +/*
>>>> + * Licensed to the Apache Software Foundation (ASF) under one or more
>>>> + * contributor license agreements.  See the NOTICE file 
>>>> distributed with
>>>> + * this work for additional information regarding copyright 
>>>> ownership.
>>>> + * The ASF licenses this file to You under the Apache License, 
>>>> Version
>>>> 2.0
>>>> + * (the "License"); you may not use this file except in compliance 
>>>> with
>>>> + * the License.  You may obtain a copy of the License at
>>>> + *
>>>> + *      http://www.apache.org/licenses/LICENSE-2.0
>>>> + *
>>>> + * Unless required by applicable law or agreed to in writing, 
>>>> software
>>>> + * distributed under the License is distributed on an "AS IS" BASIS,
>>>> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>> implied.
>>>> + * See the License for the specific language governing permissions 
>>>> and
>>>> + * limitations under the License.
>>>> + */
>>>> +package org.apache.wicket.jmx.wrapper;
>>>> +
>>>> +import org.apache.wicket.Application;
>>>> +import org.apache.wicket.jmx.MarkupSettingsMBean;
>>>> +
>>>> +
>>>> +/**
>>>> + * Exposes Application related functionality for JMX.
>>>> + *
>>>> + * @author eelcohillenius
>>>> + */
>>>> +public class MarkupSettings implements MarkupSettingsMBean
>>>> +{
>>>> +       private final Application application;
>>>> +
>>>> +       /**
>>>> +        * Create.
>>>> +        *
>>>> +        * @param application
>>>> +        */
>>>> +       public MarkupSettings(final Application application)
>>>> +       {
>>>> +               this.application = application;
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.MarkupSettingsMBean#getAutomaticLinking()
>>>> +        */
>>>> +       @Override
>>>> +       public boolean getAutomaticLinking()
>>>> +       {
>>>> +               return
>>>> application.getMarkupSettings().getAutomaticLinking();
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.MarkupSettingsMBean#getCompressWhitespace()
>>>> +        */
>>>> +       @Override
>>>> +       public boolean getCompressWhitespace()
>>>> +       {
>>>> +               return
>>>> application.getMarkupSettings().getCompressWhitespace();
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.MarkupSettingsMBean#getDefaultMarkupEncoding()
>>>> +        */
>>>> +       @Override
>>>> +       public String getDefaultMarkupEncoding()
>>>> +       {
>>>> +               return
>>>> application.getMarkupSettings().getDefaultMarkupEncoding();
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.MarkupSettingsMBean#getStripComments()
>>>> +        */
>>>> +       @Override
>>>> +       public boolean getStripComments()
>>>> +       {
>>>> +               return 
>>>> application.getMarkupSettings().getStripComments();
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.MarkupSettingsMBean#getStripWicketTags()
>>>> +        */
>>>> +       @Override
>>>> +       public boolean getStripWicketTags()
>>>> +       {
>>>> +               return
>>>> application.getMarkupSettings().getStripWicketTags();
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.MarkupSettingsMBean#setAutomaticLinking(boolean)
>>>> +        */
>>>> +       @Override
>>>> +       public void setAutomaticLinking(final boolean 
>>>> automaticLinking)
>>>> +       {
>>>> +
>>>> application.getMarkupSettings().setAutomaticLinking(automaticLinking);
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.MarkupSettingsMBean#setCompressWhitespace(boolean) 
>>>>
>>>> +        */
>>>> +       @Override
>>>> +       public void setCompressWhitespace(final boolean
>>>> compressWhitespace)
>>>> +       {
>>>> +
>>>> application.getMarkupSettings().setCompressWhitespace(compressWhitespace); 
>>>>
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.MarkupSettingsMBean#setDefaultMarkupEncoding(java.lang.String) 
>>>>
>>>> +        */
>>>> +       @Override
>>>> +       public void setDefaultMarkupEncoding(final String encoding)
>>>> +       {
>>>> +
>>>> application.getMarkupSettings().setDefaultMarkupEncoding(encoding);
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.MarkupSettingsMBean#setStripComments(boolean)
>>>> +        */
>>>> +       @Override
>>>> +       public void setStripComments(final boolean stripComments)
>>>> +       {
>>>> +
>>>> application.getMarkupSettings().setStripComments(stripComments);
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.MarkupSettingsMBean#setStripWicketTags(boolean)
>>>> +        */
>>>> +       @Override
>>>> +       public void setStripWicketTags(final boolean stripWicketTags)
>>>> +       {
>>>> +
>>>> application.getMarkupSettings().setStripWicketTags(stripWicketTags);
>>>> +       }
>>>> +}
>>>>
>>>>
>>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/PageSettings.java 
>>>>
>>>> ----------------------------------------------------------------------
>>>> diff --git
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/PageSettings.java 
>>>>
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/PageSettings.java 
>>>>
>>>> new file mode 100644
>>>> index 0000000..27d325d
>>>> --- /dev/null
>>>> +++
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/PageSettings.java 
>>>>
>>>> @@ -0,0 +1,59 @@
>>>> +/*
>>>> + * Licensed to the Apache Software Foundation (ASF) under one or more
>>>> + * contributor license agreements.  See the NOTICE file 
>>>> distributed with
>>>> + * this work for additional information regarding copyright 
>>>> ownership.
>>>> + * The ASF licenses this file to You under the Apache License, 
>>>> Version
>>>> 2.0
>>>> + * (the "License"); you may not use this file except in compliance 
>>>> with
>>>> + * the License.  You may obtain a copy of the License at
>>>> + *
>>>> + *      http://www.apache.org/licenses/LICENSE-2.0
>>>> + *
>>>> + * Unless required by applicable law or agreed to in writing, 
>>>> software
>>>> + * distributed under the License is distributed on an "AS IS" BASIS,
>>>> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>> implied.
>>>> + * See the License for the specific language governing permissions 
>>>> and
>>>> + * limitations under the License.
>>>> + */
>>>> +package org.apache.wicket.jmx.wrapper;
>>>> +
>>>> +import org.apache.wicket.Application;
>>>> +import org.apache.wicket.jmx.PageSettingsMBean;
>>>> +
>>>> +
>>>> +/**
>>>> + * Exposes Application related functionality for JMX.
>>>> + *
>>>> + * @author eelcohillenius
>>>> + */
>>>> +public class PageSettings implements PageSettingsMBean
>>>> +{
>>>> +       private final Application application;
>>>> +
>>>> +       /**
>>>> +        * Create.
>>>> +        *
>>>> +        * @param application
>>>> +        */
>>>> +       public PageSettings(final Application application)
>>>> +       {
>>>> +               this.application = application;
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.PageSettingsMBean#getVersionPagesByDefault()
>>>> +        */
>>>> +       @Override
>>>> +       public boolean getVersionPagesByDefault()
>>>> +       {
>>>> +               return
>>>> application.getPageSettings().getVersionPagesByDefault();
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.PageSettingsMBean#setVersionPagesByDefault(boolean) 
>>>>
>>>> +        */
>>>> +       @Override
>>>> +       public void setVersionPagesByDefault(final boolean
>>>> pagesVersionedByDefault)
>>>> +       {
>>>> +
>>>> application.getPageSettings().setVersionPagesByDefault(pagesVersionedByDefault); 
>>>>
>>>> +       }
>>>> +}
>>>>
>>>>
>>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/RequestCycleSettings.java 
>>>>
>>>> ----------------------------------------------------------------------
>>>> diff --git
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/RequestCycleSettings.java 
>>>>
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/RequestCycleSettings.java 
>>>>
>>>> new file mode 100644
>>>> index 0000000..8fa04f2
>>>> --- /dev/null
>>>> +++
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/RequestCycleSettings.java 
>>>>
>>>> @@ -0,0 +1,127 @@
>>>> +/*
>>>> + * Licensed to the Apache Software Foundation (ASF) under one or more
>>>> + * contributor license agreements.  See the NOTICE file 
>>>> distributed with
>>>> + * this work for additional information regarding copyright 
>>>> ownership.
>>>> + * The ASF licenses this file to You under the Apache License, 
>>>> Version
>>>> 2.0
>>>> + * (the "License"); you may not use this file except in compliance 
>>>> with
>>>> + * the License.  You may obtain a copy of the License at
>>>> + *
>>>> + *      http://www.apache.org/licenses/LICENSE-2.0
>>>> + *
>>>> + * Unless required by applicable law or agreed to in writing, 
>>>> software
>>>> + * distributed under the License is distributed on an "AS IS" BASIS,
>>>> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>> implied.
>>>> + * See the License for the specific language governing permissions 
>>>> and
>>>> + * limitations under the License.
>>>> + */
>>>> +package org.apache.wicket.jmx.wrapper;
>>>> +
>>>> +import org.apache.wicket.Application;
>>>> +import org.apache.wicket.jmx.RequestCycleSettingsMBean;
>>>> +import org.apache.wicket.util.time.Duration;
>>>> +
>>>> +
>>>> +/**
>>>> + * Exposes Application related functionality for JMX.
>>>> + *
>>>> + * @author eelcohillenius
>>>> + */
>>>> +public class RequestCycleSettings implements 
>>>> RequestCycleSettingsMBean
>>>> +{
>>>> +       private final Application application;
>>>> +
>>>> +       /**
>>>> +        * Create.
>>>> +        *
>>>> +        * @param application
>>>> +        */
>>>> +       public RequestCycleSettings(final Application application)
>>>> +       {
>>>> +               this.application = application;
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.RequestCycleSettingsMBean#getBufferResponse()
>>>> +        */
>>>> +       @Override
>>>> +       public boolean getBufferResponse()
>>>> +       {
>>>> +               return
>>>> application.getRequestCycleSettings().getBufferResponse();
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.RequestCycleSettingsMBean#getGatherExtendedBrowserInfo() 
>>>>
>>>> +        */
>>>> +       @Override
>>>> +       public boolean getGatherExtendedBrowserInfo()
>>>> +       {
>>>> +               return
>>>> application.getRequestCycleSettings().getGatherExtendedBrowserInfo();
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.RequestCycleSettingsMBean#getResponseRequestEncoding() 
>>>>
>>>> +        */
>>>> +       @Override
>>>> +       public String getResponseRequestEncoding()
>>>> +       {
>>>> +               return
>>>> application.getRequestCycleSettings().getResponseRequestEncoding();
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.RequestCycleSettingsMBean#getTimeout()
>>>> +        */
>>>> +       @Override
>>>> +       public String getTimeout()
>>>> +       {
>>>> +               return
>>>> application.getRequestCycleSettings().getTimeout().toString();
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.RequestCycleSettingsMBean#setBufferResponse(boolean) 
>>>>
>>>> +        */
>>>> +       @Override
>>>> +       public void setBufferResponse(final boolean bufferResponse)
>>>> +       {
>>>> +
>>>> application.getRequestCycleSettings().setBufferResponse(bufferResponse); 
>>>>
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.RequestCycleSettingsMBean#setGatherExtendedBrowserInfo(boolean) 
>>>>
>>>> +        */
>>>> +       @Override
>>>> +       public void setGatherExtendedBrowserInfo(final boolean
>>>> gatherExtendedBrowserInfo)
>>>> +       {
>>>> +
>>>> application.getRequestCycleSettings().setGatherExtendedBrowserInfo(
>>>> +                       gatherExtendedBrowserInfo);
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.RequestCycleSettingsMBean#setResponseRequestEncoding(java.lang.String) 
>>>>
>>>> +        */
>>>> +       @Override
>>>> +       public void setResponseRequestEncoding(final String
>>>> responseRequestEncoding)
>>>> +       {
>>>> +
>>>> application.getRequestCycleSettings().setResponseRequestEncoding(responseRequestEncoding); 
>>>>
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.RequestCycleSettingsMBean#setTimeout(java.lang.String) 
>>>>
>>>> +        */
>>>> +       @Override
>>>> +       public void setTimeout(final String timeout)
>>>> +       {
>>>> +
>>>> application.getRequestCycleSettings().setTimeout(Duration.valueOf(timeout)); 
>>>>
>>>> +       }
>>>> +
>>>> +       @Override
>>>> +       public void setExceptionRetryCount(int retries)
>>>> +       {
>>>> +
>>>> application.getRequestCycleSettings().setExceptionRetryCount(retries);
>>>> +       }
>>>> +
>>>> +       @Override
>>>> +       public int getExceptionRetryCount()
>>>> +       {
>>>> +               return
>>>> application.getRequestCycleSettings().getExceptionRetryCount();
>>>> +       }
>>>> +}
>>>>
>>>>
>>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/RequestLogger.java 
>>>>
>>>> ----------------------------------------------------------------------
>>>> diff --git
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/RequestLogger.java 
>>>>
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/RequestLogger.java 
>>>>
>>>> new file mode 100644
>>>> index 0000000..90e234f
>>>> --- /dev/null
>>>> +++
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/RequestLogger.java 
>>>>
>>>> @@ -0,0 +1,168 @@
>>>> +/*
>>>> + * Licensed to the Apache Software Foundation (ASF) under one or more
>>>> + * contributor license agreements.  See the NOTICE file 
>>>> distributed with
>>>> + * this work for additional information regarding copyright 
>>>> ownership.
>>>> + * The ASF licenses this file to You under the Apache License, 
>>>> Version
>>>> 2.0
>>>> + * (the "License"); you may not use this file except in compliance 
>>>> with
>>>> + * the License.  You may obtain a copy of the License at
>>>> + *
>>>> + *      http://www.apache.org/licenses/LICENSE-2.0
>>>> + *
>>>> + * Unless required by applicable law or agreed to in writing, 
>>>> software
>>>> + * distributed under the License is distributed on an "AS IS" BASIS,
>>>> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>> implied.
>>>> + * See the License for the specific language governing permissions 
>>>> and
>>>> + * limitations under the License.
>>>> + */
>>>> +package org.apache.wicket.jmx.wrapper;
>>>> +
>>>> +import java.io.IOException;
>>>> +
>>>> +import org.apache.wicket.Application;
>>>> +import org.apache.wicket.jmx.RequestLoggerMBean;
>>>> +import org.apache.wicket.protocol.http.WebApplication;
>>>> +
>>>> +
>>>> +/**
>>>> + * Exposes {@link org.apache.wicket.protocol.http.RequestLogger} 
>>>> for JMX.
>>>> + *
>>>> + * @author eelcohillenius
>>>> + */
>>>> +public class RequestLogger implements RequestLoggerMBean
>>>> +{
>>>> +       private final Application application;
>>>> +
>>>> +       private final WebApplication webApplication;
>>>> +
>>>> +       /**
>>>> +        * Construct.
>>>> +        *
>>>> +        * @param application
>>>> +        *            The application
>>>> +        */
>>>> +       public RequestLogger(final Application application)
>>>> +       {
>>>> +               this.application = application;
>>>> +
>>>> +               // do this so that we don't have to cast all the time
>>>> +               if (application instanceof WebApplication)
>>>> +               {
>>>> +                       webApplication = (WebApplication)application;
>>>> +               }
>>>> +               else
>>>> +               {
>>>> +                       webApplication = null;
>>>> +               }
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.RequestLoggerMBean#getNumberOfCreatedSessions()
>>>> +        */
>>>> +       @Override
>>>> +       public Integer getNumberOfCreatedSessions() throws IOException
>>>> +       {
>>>> + org.apache.wicket.protocol.http.IRequestLogger logger =
>>>> getRequestLogger();
>>>> +               if (logger != null)
>>>> +               {
>>>> +                       return logger.getTotalCreatedSessions();
>>>> +               }
>>>> +               return null;
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.RequestLoggerMBean#getNumberOfLiveSessions()
>>>> +        */
>>>> +       @Override
>>>> +       public Integer getNumberOfLiveSessions() throws IOException
>>>> +       {
>>>> + org.apache.wicket.protocol.http.IRequestLogger logger =
>>>> getRequestLogger();
>>>> +               if (logger != null)
>>>> +               {
>>>> +                       return logger.getLiveSessions().length;
>>>> +               }
>>>> +               return null;
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.RequestLoggerMBean#getPeakNumberOfSessions()
>>>> +        */
>>>> +       @Override
>>>> +       public Integer getPeakNumberOfSessions() throws IOException
>>>> +       {
>>>> + org.apache.wicket.protocol.http.IRequestLogger logger =
>>>> getRequestLogger();
>>>> +               if (logger != null)
>>>> +               {
>>>> +                       return logger.getPeakSessions();
>>>> +               }
>>>> +               return null;
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.RequestLoggerMBean#getNumberOfCurrentActiveRequests() 
>>>>
>>>> +        */
>>>> +       @Override
>>>> +       public Integer getNumberOfCurrentActiveRequests() throws
>>>> IOException
>>>> +       {
>>>> + org.apache.wicket.protocol.http.IRequestLogger logger =
>>>> getRequestLogger();
>>>> +               if (logger != null)
>>>> +               {
>>>> +                       return
>>>> Integer.valueOf(logger.getCurrentActiveRequestCount());
>>>> +               }
>>>> +               return null;
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.RequestLoggerMBean#getPeakNumberOfActiveRequests() 
>>>>
>>>> +        */
>>>> +       @Override
>>>> +       public Integer getPeakNumberOfActiveRequests() throws 
>>>> IOException
>>>> +       {
>>>> + org.apache.wicket.protocol.http.IRequestLogger logger =
>>>> getRequestLogger();
>>>> +               if (logger != null)
>>>> +               {
>>>> +                       return
>>>> Integer.valueOf(logger.getPeakActiveRequestCount());
>>>> +               }
>>>> +               return null;
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see org.apache.wicket.jmx.RequestLoggerMBean#restart()
>>>> +        */
>>>> +       @Override
>>>> +       public void restart() throws IOException
>>>> +       {
>>>> +               if (webApplication != null)
>>>> +               {
>>>> +
>>>> webApplication.getRequestLoggerSettings().setRequestLoggerEnabled(false); 
>>>>
>>>> +                       webApplication.getRequestLogger();
>>>> +
>>>> webApplication.getRequestLoggerSettings().setRequestLoggerEnabled(true); 
>>>>
>>>> +               }
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see org.apache.wicket.jmx.RequestLoggerMBean#stop()
>>>> +        */
>>>> +       @Override
>>>> +       public void stop() throws IOException
>>>> +       {
>>>> +               if (webApplication != null)
>>>> +               {
>>>> +
>>>> webApplication.getRequestLoggerSettings().setRequestLoggerEnabled(false); 
>>>>
>>>> +               }
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * Gets the request logger for this application.
>>>> +        *
>>>> +        * @return The request logger or null if no request is 
>>>> active, or
>>>> if this is not a web
>>>> +        *         application
>>>> +        */
>>>> +       protected org.apache.wicket.protocol.http.IRequestLogger
>>>> getRequestLogger()
>>>> +       {
>>>> +               if (application instanceof WebApplication)
>>>> +               {
>>>> +                       return application.getRequestLogger();
>>>> +               }
>>>> +               return null;
>>>> +       }
>>>> +}
>>>>
>>>>
>>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/ResourceSettings.java 
>>>>
>>>> ----------------------------------------------------------------------
>>>> diff --git
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/ResourceSettings.java 
>>>>
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/ResourceSettings.java 
>>>>
>>>> new file mode 100644
>>>> index 0000000..b03de01
>>>> --- /dev/null
>>>> +++
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/ResourceSettings.java 
>>>>
>>>> @@ -0,0 +1,165 @@
>>>> +/*
>>>> + * Licensed to the Apache Software Foundation (ASF) under one or more
>>>> + * contributor license agreements.  See the NOTICE file 
>>>> distributed with
>>>> + * this work for additional information regarding copyright 
>>>> ownership.
>>>> + * The ASF licenses this file to You under the Apache License, 
>>>> Version
>>>> 2.0
>>>> + * (the "License"); you may not use this file except in compliance 
>>>> with
>>>> + * the License.  You may obtain a copy of the License at
>>>> + *
>>>> + *      http://www.apache.org/licenses/LICENSE-2.0
>>>> + *
>>>> + * Unless required by applicable law or agreed to in writing, 
>>>> software
>>>> + * distributed under the License is distributed on an "AS IS" BASIS,
>>>> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>> implied.
>>>> + * See the License for the specific language governing permissions 
>>>> and
>>>> + * limitations under the License.
>>>> + */
>>>> +package org.apache.wicket.jmx.wrapper;
>>>> +
>>>> +import java.util.List;
>>>> +
>>>> +import org.apache.wicket.Application;
>>>> +import org.apache.wicket.jmx.ResourceSettingsMBean;
>>>> +import org.apache.wicket.resource.loader.IStringResourceLoader;
>>>> +import org.apache.wicket.util.file.IResourceFinder;
>>>> +import org.apache.wicket.util.lang.Generics;
>>>> +import org.apache.wicket.util.time.Duration;
>>>> +
>>>> +
>>>> +/**
>>>> + * Exposes Application related functionality for JMX.
>>>> + *
>>>> + * @author eelcohillenius
>>>> + */
>>>> +public class ResourceSettings implements ResourceSettingsMBean
>>>> +{
>>>> +       private final Application application;
>>>> +
>>>> +       /**
>>>> +        * Create.
>>>> +        *
>>>> +        * @param application
>>>> +        */
>>>> +       public ResourceSettings(final Application application)
>>>> +       {
>>>> +               this.application = application;
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * {@inheritDoc}
>>>> +        */
>>>> +       @Override
>>>> +       public String getLocalizer()
>>>> +       {
>>>> +               return
>>>> Stringz.className(application.getResourceSettings().getLocalizer());
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * {@inheritDoc}
>>>> +        */
>>>> +       @Override
>>>> +       public String getPackageResourceGuard()
>>>> +       {
>>>> +               return
>>>> Stringz.className(application.getResourceSettings().getPackageResourceGuard()); 
>>>>
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * {@inheritDoc}
>>>> +        */
>>>> +       @Override
>>>> +       public String getPropertiesFactory()
>>>> +       {
>>>> +               return
>>>> Stringz.className(application.getResourceSettings().getPropertiesFactory()); 
>>>>
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * {@inheritDoc}
>>>> +        */
>>>> +       @Override
>>>> +       public String getResourceFinders()
>>>> +       {
>>>> +               StringBuilder builder = new StringBuilder();
>>>> +               for (IResourceFinder rf :
>>>> application.getResourceSettings().getResourceFinders())
>>>> +               {
>>>> + builder.append(Stringz.className(rf));
>>>> +               }
>>>> +               return builder.toString();
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * {@inheritDoc}
>>>> +        */
>>>> +       @Override
>>>> +       public String getResourcePollFrequency()
>>>> +       {
>>>> +               Duration duration =
>>>> application.getResourceSettings().getResourcePollFrequency();
>>>> +               return (duration != null) ? duration.toString() : 
>>>> null;
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * {@inheritDoc}
>>>> +        */
>>>> +       @Override
>>>> +       public String getResourceStreamLocator()
>>>> +       {
>>>> +               return
>>>> Stringz.className(application.getResourceSettings().getResourceStreamLocator()); 
>>>>
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * {@inheritDoc}
>>>> +        */
>>>> +       @Override
>>>> +       public String[] getStringResourceLoaders()
>>>> +       {
>>>> +               List<IStringResourceLoader> loaders =
>>>> application.getResourceSettings()
>>>> +                       .getStringResourceLoaders();
>>>> +               if (loaders != null)
>>>> +               {
>>>> +                       List<String> list = Generics.newArrayList();
>>>> +                       for (Object loader : loaders)
>>>> +                       {
>>>> +                               list.add(loader.toString());
>>>> +                       }
>>>> +                       return list.toArray(new 
>>>> String[loaders.size()]);
>>>> +               }
>>>> +               return null;
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * {@inheritDoc}
>>>> +        */
>>>> +       @Override
>>>> +       public boolean getThrowExceptionOnMissingResource()
>>>> +       {
>>>> +               return
>>>> application.getResourceSettings().getThrowExceptionOnMissingResource(); 
>>>>
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * {@inheritDoc}
>>>> +        */
>>>> +       @Override
>>>> +       public boolean getUseDefaultOnMissingResource()
>>>> +       {
>>>> +               return
>>>> application.getResourceSettings().getUseDefaultOnMissingResource();
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * {@inheritDoc}
>>>> +        */
>>>> +       @Override
>>>> +       public void setThrowExceptionOnMissingResource(final boolean
>>>> throwExceptionOnMissingResource)
>>>> +       {
>>>> +
>>>> application.getResourceSettings().setThrowExceptionOnMissingResource(
>>>> +                       throwExceptionOnMissingResource);
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * {@inheritDoc}
>>>> +        */
>>>> +       @Override
>>>> +       public void setUseDefaultOnMissingResource(final boolean
>>>> useDefaultOnMissingResource)
>>>> +       {
>>>> +
>>>> application.getResourceSettings().setUseDefaultOnMissingResource(
>>>> +                       useDefaultOnMissingResource);
>>>> +       }
>>>> +}
>>>>
>>>>
>>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/SecuritySettings.java 
>>>>
>>>> ----------------------------------------------------------------------
>>>> diff --git
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/SecuritySettings.java 
>>>>
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/SecuritySettings.java 
>>>>
>>>> new file mode 100644
>>>> index 0000000..67a8748
>>>> --- /dev/null
>>>> +++
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/SecuritySettings.java 
>>>>
>>>> @@ -0,0 +1,68 @@
>>>> +/*
>>>> + * Licensed to the Apache Software Foundation (ASF) under one or more
>>>> + * contributor license agreements.  See the NOTICE file 
>>>> distributed with
>>>> + * this work for additional information regarding copyright 
>>>> ownership.
>>>> + * The ASF licenses this file to You under the Apache License, 
>>>> Version
>>>> 2.0
>>>> + * (the "License"); you may not use this file except in compliance 
>>>> with
>>>> + * the License.  You may obtain a copy of the License at
>>>> + *
>>>> + *      http://www.apache.org/licenses/LICENSE-2.0
>>>> + *
>>>> + * Unless required by applicable law or agreed to in writing, 
>>>> software
>>>> + * distributed under the License is distributed on an "AS IS" BASIS,
>>>> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>> implied.
>>>> + * See the License for the specific language governing permissions 
>>>> and
>>>> + * limitations under the License.
>>>> + */
>>>> +package org.apache.wicket.jmx.wrapper;
>>>> +
>>>> +import org.apache.wicket.Application;
>>>> +import org.apache.wicket.jmx.SecuritySettingsMBean;
>>>> +
>>>> +/**
>>>> + * Exposes Application related functionality for JMX.
>>>> + *
>>>> + * @author eelcohillenius
>>>> + */
>>>> +public class SecuritySettings implements SecuritySettingsMBean
>>>> +{
>>>> +       private final Application application;
>>>> +
>>>> +       /**
>>>> +        * Create.
>>>> +        *
>>>> +        * @param application
>>>> +        */
>>>> +       public SecuritySettings(final Application application)
>>>> +       {
>>>> +               this.application = application;
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.SecuritySettingsMBean#getAuthorizationStrategy()
>>>> +        */
>>>> +       @Override
>>>> +       public String getAuthorizationStrategy()
>>>> +       {
>>>> +               return
>>>> Stringz.className(application.getSecuritySettings().getAuthorizationStrategy()); 
>>>>
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.SecuritySettingsMBean#getCryptFactory()
>>>> +        */
>>>> +       @Override
>>>> +       public String getCryptFactory()
>>>> +       {
>>>> +               return
>>>> Stringz.className(application.getSecuritySettings().getCryptFactory()); 
>>>>
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.SecuritySettingsMBean#getUnauthorizedComponentInstantiationListener() 
>>>>
>>>> +        */
>>>> +       @Override
>>>> +       public String getUnauthorizedComponentInstantiationListener()
>>>> +       {
>>>> +               return 
>>>> Stringz.className(application.getSecuritySettings()
>>>> + .getUnauthorizedComponentInstantiationListener());
>>>> +       }
>>>> +}
>>>>
>>>>
>>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/SessionSettings.java 
>>>>
>>>> ----------------------------------------------------------------------
>>>> diff --git
>>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/SessionSettings.java 
>>>>
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/SessionSettings.java 
>>>>
>>>> new file mode 100644
>>>> index 0000000..f235ab6
>>>> --- /dev/null
>>>> +++
>>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/SessionSettings.java 
>>>>
>>>> @@ -0,0 +1,58 @@
>>>> +/*
>>>> + * Licensed to the Apache Software Foundation (ASF) under one or more
>>>> + * contributor license agreements.  See the NOTICE file 
>>>> distributed with
>>>> + * this work for additional information regarding copyright 
>>>> ownership.
>>>> + * The ASF licenses this file to You under the Apache License, 
>>>> Version
>>>> 2.0
>>>> + * (the "License"); you may not use this file except in compliance 
>>>> with
>>>> + * the License.  You may obtain a copy of the License at
>>>> + *
>>>> + *      http://www.apache.org/licenses/LICENSE-2.0
>>>> + *
>>>> + * Unless required by applicable law or agreed to in writing, 
>>>> software
>>>> + * distributed under the License is distributed on an "AS IS" BASIS,
>>>> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>>> implied.
>>>> + * See the License for the specific language governing permissions 
>>>> and
>>>> + * limitations under the License.
>>>> + */
>>>> +package org.apache.wicket.jmx.wrapper;
>>>> +
>>>> +import org.apache.wicket.Application;
>>>> +import org.apache.wicket.jmx.SessionSettingsMBean;
>>>> +
>>>> +/**
>>>> + * Exposes Application related functionality for JMX.
>>>> + *
>>>> + * @author eelcohillenius
>>>> + */
>>>> +public class SessionSettings implements SessionSettingsMBean
>>>> +{
>>>> +       private final Application application;
>>>> +
>>>> +       /**
>>>> +        * Create.
>>>> +        *
>>>> +        * @param application
>>>> +        */
>>>> +       public SessionSettings(final Application application)
>>>> +       {
>>>> +               this.application = application;
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.SessionSettingsMBean#getPageFactory()
>>>> +        */
>>>> +       @Override
>>>> +       public String getPageFactory()
>>>> +       {
>>>> +               return 
>>>> Stringz.className(application.getPageFactory());
>>>> +       }
>>>> +
>>>> +       /**
>>>> +        * @see
>>>> org.apache.wicket.jmx.SessionSettingsMBean#getSessionStore()
>>>> +        */
>>>> +       @Override
>>>> +       public String getSessionStore()
>>>> +       {
>>>> +               return 
>>>> Stringz.className(application.getSessionStore());
>>>> +       }
>>>> +}
>>>>
>>>>
>


Re: [2/3] git commit: use proxies for mbeans, so application is set on thread automatically

Posted by Sven Meier <sv...@meiers.net>.
Hi Martin,

I have to confess that's a little bit 'hackish' ;).

Background information:
When working on wicketstuff-jm-xpanel, I added wicket-jmx to the 
project's dependency. This way I could test it on Wicket's own Jmx beans.
But wicket-jms was setting *and* clearing the thread bound application 
object in two of its methods. This lead to an exception when rendering 
JmxPanel, because the application was no longer attached to the thread 
after calling into some JMX beans.

So I made access to the application transparent in wicket-jmx:
Before a method of the JMX bean is called, the proxy will initialize the 
application reference and clean it up afterwards, *if* it wasn't already 
set before the call.

Have fun
Sven


On 03/24/2014 10:46 AM, Martin Grigorov wrote:
> OK. Debugging showed where I was in mistake.
> The passed 'o' object is actually the XysSettingsMBean wrapper/impl, so it
> implements interface XyzSettingsMBean
>
> All is fine.
> Sorry for the noise.
>
> Martin Grigorov
> Wicket Training and Consulting
>
>
> On Mon, Mar 24, 2014 at 10:08 AM, Martin Grigorov <mg...@apache.org>wrote:
>
>> Hi Sven,
>>
>>
>> On Fri, Mar 21, 2014 at 5:48 PM, <sv...@apache.org> wrote:
>>
>>> use proxies for mbeans, so application is set on thread automatically
>>>
>>> Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
>>> Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/fea2b8e4
>>> Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/fea2b8e4
>>> Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/fea2b8e4
>>>
>>> Branch: refs/heads/master
>>> Commit: fea2b8e4e0feb6a7374bcfe6de2da5d1a2feba20
>>> Parents: 329b945
>>> Author: svenmeier <sv...@meiers.net>
>>> Authored: Fri Mar 21 16:39:29 2014 +0100
>>> Committer: svenmeier <sv...@meiers.net>
>>> Committed: Fri Mar 21 16:39:29 2014 +0100
>>>
>>> ----------------------------------------------------------------------
>>>   wicket-jmx/pom.xml                              |   8 +
>>>   .../java/org/apache/wicket/jmx/Application.java | 113 ------------
>>>   .../apache/wicket/jmx/ApplicationSettings.java  | 101 -----------
>>>   .../org/apache/wicket/jmx/DebugSettings.java    | 164 ------------------
>>>   .../java/org/apache/wicket/jmx/Initializer.java | 111 +++++++++---
>>>   .../org/apache/wicket/jmx/MarkupSettings.java   | 128 --------------
>>>   .../apache/wicket/jmx/MarkupSettingsMBean.java  |   2 +
>>>   .../org/apache/wicket/jmx/PageSettings.java     |  56 ------
>>>   .../apache/wicket/jmx/RequestCycleSettings.java | 125 --------------
>>>   .../org/apache/wicket/jmx/RequestLogger.java    | 166 ------------------
>>>   .../org/apache/wicket/jmx/ResourceSettings.java | 173 -------------------
>>>   .../org/apache/wicket/jmx/SecuritySettings.java |  65 -------
>>>   .../org/apache/wicket/jmx/SessionSettings.java  |  55 ------
>>>   .../org/apache/wicket/jmx/StoreSettings.java    |  68 --------
>>>   .../java/org/apache/wicket/jmx/Stringz.java     |  25 ---
>>>   .../apache/wicket/jmx/wrapper/Application.java  | 104 +++++++++++
>>>   .../wicket/jmx/wrapper/ApplicationSettings.java | 103 +++++++++++
>>>   .../wicket/jmx/wrapper/DebugSettings.java       | 167 ++++++++++++++++++
>>>   .../wicket/jmx/wrapper/MarkupSettings.java      | 131 ++++++++++++++
>>>   .../apache/wicket/jmx/wrapper/PageSettings.java |  59 +++++++
>>>   .../jmx/wrapper/RequestCycleSettings.java       | 127 ++++++++++++++
>>>   .../wicket/jmx/wrapper/RequestLogger.java       | 168 ++++++++++++++++++
>>>   .../wicket/jmx/wrapper/ResourceSettings.java    | 165 ++++++++++++++++++
>>>   .../wicket/jmx/wrapper/SecuritySettings.java    |  68 ++++++++
>>>   .../wicket/jmx/wrapper/SessionSettings.java     |  58 +++++++
>>>   .../wicket/jmx/wrapper/StoreSettings.java       |  69 ++++++++
>>>   .../org/apache/wicket/jmx/wrapper/Stringz.java  |  25 +++
>>>   27 files changed, 1340 insertions(+), 1264 deletions(-)
>>> ----------------------------------------------------------------------
>>>
>>>
>>>
>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/pom.xml
>>> ----------------------------------------------------------------------
>>> diff --git a/wicket-jmx/pom.xml b/wicket-jmx/pom.xml
>>> index 9bc5a08..c58cb06 100644
>>> --- a/wicket-jmx/pom.xml
>>> +++ b/wicket-jmx/pom.xml
>>> @@ -32,6 +32,14 @@
>>>                          <groupId>org.apache.wicket</groupId>
>>>                          <artifactId>wicket-core</artifactId>
>>>                  </dependency>
>>> +               <dependency>
>>> +                       <groupId>cglib</groupId>
>>> +                       <artifactId>cglib</artifactId>
>>> +               </dependency>
>>> +<!--   <dependency>
>>> +                       <groupId>org.ow2.asm</groupId>
>>> +                       <artifactId>asm-util</artifactId>
>>> +               </dependency> -->
>>>          </dependencies>
>>>          <build>
>>>                  <pluginManagement>
>>>
>>>
>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/Application.java
>>> ----------------------------------------------------------------------
>>> diff --git
>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/Application.java
>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/Application.java
>>> deleted file mode 100644
>>> index 5eaa003..0000000
>>> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/Application.java
>>> +++ /dev/null
>>> @@ -1,113 +0,0 @@
>>> -/*
>>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>>> - * contributor license agreements.  See the NOTICE file distributed with
>>> - * this work for additional information regarding copyright ownership.
>>> - * The ASF licenses this file to You under the Apache License, Version
>>> 2.0
>>> - * (the "License"); you may not use this file except in compliance with
>>> - * the License.  You may obtain a copy of the License at
>>> - *
>>> - *      http://www.apache.org/licenses/LICENSE-2.0
>>> - *
>>> - * Unless required by applicable law or agreed to in writing, software
>>> - * distributed under the License is distributed on an "AS IS" BASIS,
>>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>> implied.
>>> - * See the License for the specific language governing permissions and
>>> - * limitations under the License.
>>> - */
>>> -package org.apache.wicket.jmx;
>>> -
>>> -import java.io.IOException;
>>> -
>>> -import org.apache.wicket.ThreadContext;
>>> -
>>> -/**
>>> - * Exposes Application related functionality for JMX.
>>> - *
>>> - * @author eelcohillenius
>>> - */
>>> -public class Application implements ApplicationMBean
>>> -{
>>> -       private final org.apache.wicket.Application application;
>>> -
>>> -       /**
>>> -        * Create.
>>> -        *
>>> -        * @param application
>>> -        */
>>> -       public Application(final org.apache.wicket.Application
>>> application)
>>> -       {
>>> -               this.application = application;
>>> -       }
>>> -
>>> -       /**
>>> -        * @see org.apache.wicket.jmx.ApplicationMBean#clearMarkupCache()
>>> -        */
>>> -       @Override
>>> -       public void clearMarkupCache() throws IOException
>>> -       {
>>> -
>>> application.getMarkupSettings().getMarkupFactory().getMarkupCache().clear();
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.ApplicationMBean#getApplicationClass()
>>> -        */
>>> -       @Override
>>> -       public String getApplicationClass() throws IOException
>>> -       {
>>> -               return application.getClass().getName();
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.ApplicationMBean#getConfigurationType()
>>> -        */
>>> -       @Override
>>> -       public String getConfigurationType()
>>> -       {
>>> -               return application.getConfigurationType().name();
>>> -       }
>>> -
>>> -       /**
>>> -        * @see org.apache.wicket.jmx.ApplicationMBean#getHomePageClass()
>>> -        */
>>> -       @Override
>>> -       public String getHomePageClass() throws IOException
>>> -       {
>>> -               return application.getHomePage().getName();
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.ApplicationMBean#getMarkupCacheSize()
>>> -        */
>>> -       @Override
>>> -       public int getMarkupCacheSize() throws IOException
>>> -       {
>>> -               ThreadContext.setApplication(application);
>>> -
>>> -               try
>>> -               {
>>> -                       return
>>> application.getMarkupSettings().getMarkupFactory().getMarkupCache().size();
>>> -               }
>>> -               finally
>>> -               {
>>> -                       ThreadContext.detach();
>>> -               }
>>> -       }
>>> -
>>> -       /**
>>> -        * @see org.apache.wicket.jmx.ApplicationMBean#getWicketVersion()
>>> -        */
>>> -       @Override
>>> -       public String getWicketVersion() throws IOException
>>> -       {
>>> -               return application.getFrameworkSettings().getVersion();
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.ApplicationMBean#clearLocalizerCache()
>>> -        */
>>> -       @Override
>>> -       public void clearLocalizerCache() throws IOException
>>> -       {
>>> -
>>> application.getResourceSettings().getLocalizer().clearCache();
>>> -       }
>>> -}
>>>
>>>
>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/ApplicationSettings.java
>>> ----------------------------------------------------------------------
>>> diff --git
>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/ApplicationSettings.java
>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/ApplicationSettings.java
>>> deleted file mode 100644
>>> index 52c8e0b..0000000
>>> ---
>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/ApplicationSettings.java
>>> +++ /dev/null
>>> @@ -1,101 +0,0 @@
>>> -/*
>>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>>> - * contributor license agreements.  See the NOTICE file distributed with
>>> - * this work for additional information regarding copyright ownership.
>>> - * The ASF licenses this file to You under the Apache License, Version
>>> 2.0
>>> - * (the "License"); you may not use this file except in compliance with
>>> - * the License.  You may obtain a copy of the License at
>>> - *
>>> - *      http://www.apache.org/licenses/LICENSE-2.0
>>> - *
>>> - * Unless required by applicable law or agreed to in writing, software
>>> - * distributed under the License is distributed on an "AS IS" BASIS,
>>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>> implied.
>>> - * See the License for the specific language governing permissions and
>>> - * limitations under the License.
>>> - */
>>> -package org.apache.wicket.jmx;
>>> -
>>> -import org.apache.wicket.util.lang.Bytes;
>>> -import org.apache.wicket.util.lang.Classes;
>>> -
>>> -/**
>>> - * Exposes Application related functionality for JMX.
>>> - *
>>> - * @author eelcohillenius
>>> - */
>>> -public class ApplicationSettings implements ApplicationSettingsMBean
>>> -{
>>> -       private final org.apache.wicket.Application application;
>>> -
>>> -       /**
>>> -        * Create.
>>> -        *
>>> -        * @param application
>>> -        */
>>> -       public ApplicationSettings(final org.apache.wicket.Application
>>> application)
>>> -       {
>>> -               this.application = application;
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.ApplicationSettingsMBean#getAccessDeniedPage()
>>> -        */
>>> -       @Override
>>> -       public String getAccessDeniedPage()
>>> -       {
>>> -               return
>>> Classes.name(application.getApplicationSettings().getAccessDeniedPage());
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.ApplicationSettingsMBean#getClassResolver()
>>> -        */
>>> -       @Override
>>> -       public String getClassResolver()
>>> -       {
>>> -               return
>>> Stringz.className(application.getApplicationSettings().getClassResolver());
>>> -       }
>>> -
>>> -       @Override
>>> -       public String getDefaultMaximumUploadSize()
>>> -       {
>>> -               return
>>> application.getApplicationSettings().getDefaultMaximumUploadSize().toString();
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.ApplicationSettingsMBean#getInternalErrorPage()
>>> -        */
>>> -       @Override
>>> -       public String getInternalErrorPage()
>>> -       {
>>> -               return
>>> Classes.name(application.getApplicationSettings().getInternalErrorPage());
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.ApplicationSettingsMBean#getPageExpiredErrorPage()
>>> -        */
>>> -       @Override
>>> -       public String getPageExpiredErrorPage()
>>> -       {
>>> -               return
>>> Classes.name(application.getApplicationSettings().getPageExpiredErrorPage());
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.ApplicationSettingsMBean#getUnexpectedExceptionDisplay()
>>> -        */
>>> -       @Override
>>> -       public String getUnexpectedExceptionDisplay()
>>> -       {
>>> -               return
>>> application.getExceptionSettings().getUnexpectedExceptionDisplay().toString();
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.ApplicationSettingsMBean#setDefaultMaximumUploadSize(java.lang.String)
>>> -        */
>>> -       @Override
>>> -       public void setDefaultMaximumUploadSize(final String
>>> defaultUploadSize)
>>> -       {
>>> -
>>> application.getApplicationSettings().setDefaultMaximumUploadSize(
>>> -                       Bytes.valueOf(defaultUploadSize));
>>> -       }
>>> -}
>>>
>>>
>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/DebugSettings.java
>>> ----------------------------------------------------------------------
>>> diff --git
>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/DebugSettings.java
>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/DebugSettings.java
>>> deleted file mode 100644
>>> index 0055dcf..0000000
>>> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/DebugSettings.java
>>> +++ /dev/null
>>> @@ -1,164 +0,0 @@
>>> -/*
>>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>>> - * contributor license agreements.  See the NOTICE file distributed with
>>> - * this work for additional information regarding copyright ownership.
>>> - * The ASF licenses this file to You under the Apache License, Version
>>> 2.0
>>> - * (the "License"); you may not use this file except in compliance with
>>> - * the License.  You may obtain a copy of the License at
>>> - *
>>> - *      http://www.apache.org/licenses/LICENSE-2.0
>>> - *
>>> - * Unless required by applicable law or agreed to in writing, software
>>> - * distributed under the License is distributed on an "AS IS" BASIS,
>>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>> implied.
>>> - * See the License for the specific language governing permissions and
>>> - * limitations under the License.
>>> - */
>>> -package org.apache.wicket.jmx;
>>> -
>>> -/**
>>> - * Exposes Application related functionality for JMX.
>>> - *
>>> - * @author eelcohillenius
>>> - */
>>> -public class DebugSettings implements DebugSettingsMBean
>>> -{
>>> -       private final org.apache.wicket.Application application;
>>> -
>>> -       /**
>>> -        * Create.
>>> -        *
>>> -        * @param application
>>> -        */
>>> -       public DebugSettings(final org.apache.wicket.Application
>>> application)
>>> -       {
>>> -               this.application = application;
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.DebugSettingsMBean#getComponentUseCheck()
>>> -        */
>>> -       @Override
>>> -       public boolean getComponentUseCheck()
>>> -       {
>>> -               return
>>> application.getDebugSettings().getComponentUseCheck();
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.DebugSettingsMBean#isAjaxDebugModeEnabled()
>>> -        */
>>> -       @Override
>>> -       public boolean isAjaxDebugModeEnabled()
>>> -       {
>>> -               return
>>> application.getDebugSettings().isAjaxDebugModeEnabled();
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.DebugSettingsMBean#setAjaxDebugModeEnabled(boolean)
>>> -        */
>>> -       @Override
>>> -       public void setAjaxDebugModeEnabled(final boolean enable)
>>> -       {
>>> -
>>> application.getDebugSettings().setAjaxDebugModeEnabled(enable);
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.DebugSettingsMBean#setComponentUseCheck(boolean)
>>> -        */
>>> -       @Override
>>> -       public void setComponentUseCheck(final boolean check)
>>> -       {
>>> -
>>> application.getDebugSettings().setComponentUseCheck(check);
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.DebugSettingsMBean#setOutputComponentPath(boolean)
>>> -        */
>>> -       @Override
>>> -       public void setOutputComponentPath(final boolean enabled)
>>> -       {
>>> -
>>> application.getDebugSettings().setOutputComponentPath(enabled);
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.DebugSettingsMBean#isOutputComponentPath()
>>> -        */
>>> -       @Override
>>> -       public boolean isOutputComponentPath()
>>> -       {
>>> -               return
>>> application.getDebugSettings().isOutputComponentPath();
>>> -       }
>>> -
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.DebugSettingsMBean#setOutputMarkupContainerClassName(boolean)
>>> -        */
>>> -       @Override
>>> -       public void setOutputMarkupContainerClassName(final boolean
>>> enable)
>>> -       {
>>> -
>>> application.getDebugSettings().setOutputMarkupContainerClassName(enable);
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.DebugSettingsMBean#isOutputMarkupContainerClassName()
>>> -        */
>>> -       @Override
>>> -       public boolean isOutputMarkupContainerClassName()
>>> -       {
>>> -               return
>>> application.getDebugSettings().isOutputMarkupContainerClassName();
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.DebugSettingsMBean#isLinePreciseReportingOnAddComponentEnabled()
>>> -        */
>>> -       @Override
>>> -       public boolean isLinePreciseReportingOnAddComponentEnabled()
>>> -       {
>>> -               return
>>> application.getDebugSettings().isLinePreciseReportingOnAddComponentEnabled();
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.DebugSettingsMBean#setLinePreciseReportingOnAddComponentEnabled(boolean)
>>> -        */
>>> -       @Override
>>> -       public void setLinePreciseReportingOnAddComponentEnabled(final
>>> boolean enable)
>>> -       {
>>> -
>>> application.getDebugSettings().setLinePreciseReportingOnAddComponentEnabled(enable);
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.DebugSettingsMBean#isLinePreciseReportingOnNewComponentEnabled()
>>> -        */
>>> -       @Override
>>> -       public boolean isLinePreciseReportingOnNewComponentEnabled()
>>> -       {
>>> -               return
>>> application.getDebugSettings().isLinePreciseReportingOnNewComponentEnabled();
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.DebugSettingsMBean#setLinePreciseReportingOnNewComponentEnabled(boolean)
>>> -        */
>>> -       @Override
>>> -       public void setLinePreciseReportingOnNewComponentEnabled(final
>>> boolean enable)
>>> -       {
>>> -
>>> application.getDebugSettings().setLinePreciseReportingOnNewComponentEnabled(enable);
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.DebugSettingsMBean#setDevelopmentUtilitiesEnabled(boolean)
>>> -        */
>>> -       @Override
>>> -       public void setDevelopmentUtilitiesEnabled(final boolean enable)
>>> -       {
>>> -
>>> application.getDebugSettings().setDevelopmentUtilitiesEnabled(enable);
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.DebugSettingsMBean#isDevelopmentUtilitiesEnabled()
>>> -        */
>>> -       @Override
>>> -       public boolean isDevelopmentUtilitiesEnabled()
>>> -       {
>>> -               return
>>> application.getDebugSettings().isDevelopmentUtilitiesEnabled();
>>> -       }
>>> -}
>>>
>>>
>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/Initializer.java
>>> ----------------------------------------------------------------------
>>> diff --git
>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/Initializer.java
>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/Initializer.java
>>> index 77aaa2d..27f4c33 100644
>>> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/Initializer.java
>>> +++ b/wicket-jmx/src/main/java/org/apache/wicket/jmx/Initializer.java
>>> @@ -17,6 +17,7 @@
>>>   package org.apache.wicket.jmx;
>>>
>>>   import java.lang.management.ManagementFactory;
>>> +import java.lang.reflect.Method;
>>>   import java.util.ArrayList;
>>>   import java.util.List;
>>>
>>> @@ -29,8 +30,24 @@ import javax.management.MalformedObjectNameException;
>>>   import javax.management.NotCompliantMBeanException;
>>>   import javax.management.ObjectName;
>>>
>>> +import net.sf.cglib.core.DefaultNamingPolicy;
>>> +import net.sf.cglib.core.Predicate;
>>> +import net.sf.cglib.proxy.Enhancer;
>>> +
>>>   import org.apache.wicket.IInitializer;
>>> +import org.apache.wicket.ThreadContext;
>>>   import org.apache.wicket.WicketRuntimeException;
>>> +import org.apache.wicket.jmx.wrapper.Application;
>>> +import org.apache.wicket.jmx.wrapper.ApplicationSettings;
>>> +import org.apache.wicket.jmx.wrapper.DebugSettings;
>>> +import org.apache.wicket.jmx.wrapper.MarkupSettings;
>>> +import org.apache.wicket.jmx.wrapper.PageSettings;
>>> +import org.apache.wicket.jmx.wrapper.RequestCycleSettings;
>>> +import org.apache.wicket.jmx.wrapper.RequestLogger;
>>> +import org.apache.wicket.jmx.wrapper.ResourceSettings;
>>> +import org.apache.wicket.jmx.wrapper.SecuritySettings;
>>> +import org.apache.wicket.jmx.wrapper.SessionSettings;
>>> +import org.apache.wicket.jmx.wrapper.StoreSettings;
>>>   import org.slf4j.Logger;
>>>   import org.slf4j.LoggerFactory;
>>>
>>> @@ -172,30 +189,30 @@ public class Initializer implements IInitializer
>>>                          domain = tempDomain;
>>>
>>>                          Application appBean = new
>>> Application(application);
>>> -                       register(appBean, appBeanName);
>>> -
>>> -                       register(new ApplicationSettings(application),
>>> new ObjectName(domain +
>>> -
>>> ":type=Application,name=ApplicationSettings"));
>>> -                       register(new DebugSettings(application), new
>>> ObjectName(domain +
>>> -                               ":type=Application,name=DebugSettings"));
>>> -                       register(new MarkupSettings(application), new
>>> ObjectName(domain +
>>> -                               ":type=Application,name=MarkupSettings"));
>>> -                       register(new ResourceSettings(application), new
>>> ObjectName(domain +
>>> -
>>> ":type=Application,name=ResourceSettings"));
>>> -                       register(new PageSettings(application), new
>>> ObjectName(domain +
>>> -                               ":type=Application,name=PageSettings"));
>>> -                       register(new RequestCycleSettings(application),
>>> new ObjectName(domain +
>>> -
>>> ":type=Application,name=RequestCycleSettings"));
>>> -                       register(new SecuritySettings(application), new
>>> ObjectName(domain +
>>> -
>>> ":type=Application,name=SecuritySettings"));
>>> -                       register(new SessionSettings(application), new
>>> ObjectName(domain +
>>> -
>>> ":type=Application,name=SessionSettings"));
>>> -                       register(new StoreSettings(application), new
>>> ObjectName(domain +
>>> -                               ":type=Application,name=StoreSettings"));
>>> +                       register(application, appBean, appBeanName);
>>> +
>>> +                       register(application, new
>>> ApplicationSettings(application), new ObjectName(domain
>>> +                               +
>>> ":type=Application,name=ApplicationSettings"));
>>> +                       register(application, new
>>> DebugSettings(application), new ObjectName(domain
>>> +                               +
>>> ":type=Application,name=DebugSettings"));
>>> +                       register(application, new
>>> MarkupSettings(application), new ObjectName(domain
>>> +                               +
>>> ":type=Application,name=MarkupSettings"));
>>> +                       register(application, new
>>> ResourceSettings(application), new ObjectName(domain
>>> +                               +
>>> ":type=Application,name=ResourceSettings"));
>>> +                       register(application, new
>>> PageSettings(application), new ObjectName(domain
>>> +                               + ":type=Application,name=PageSettings"));
>>> +                       register(application, new
>>> RequestCycleSettings(application), new ObjectName(domain
>>> +                               +
>>> ":type=Application,name=RequestCycleSettings"));
>>> +                       register(application, new
>>> SecuritySettings(application), new ObjectName(domain
>>> +                               +
>>> ":type=Application,name=SecuritySettings"));
>>> +                       register(application, new
>>> SessionSettings(application), new ObjectName(domain
>>> +                               +
>>> ":type=Application,name=SessionSettings"));
>>> +                       register(application, new
>>> StoreSettings(application), new ObjectName(domain
>>> +                               +
>>> ":type=Application,name=StoreSettings"));
>>>
>>>                          RequestLogger sessionsBean = new
>>> RequestLogger(application);
>>>                          ObjectName sessionsBeanName = new
>>> ObjectName(domain + ":type=RequestLogger");
>>> -                       register(sessionsBean, sessionsBeanName);
>>> +                       register(application, sessionsBean,
>>> sessionsBeanName);
>>>                  }
>>>                  catch (MalformedObjectNameException e)
>>>                  {
>>> @@ -236,11 +253,55 @@ public class Initializer implements IInitializer
>>>           * @throws MBeanRegistrationException
>>>           * @throws InstanceAlreadyExistsException
>>>           */
>>> -       private void register(final Object o, final ObjectName objectName)
>>> -               throws InstanceAlreadyExistsException,
>>> MBeanRegistrationException,
>>> -               NotCompliantMBeanException
>>> +       private void register(final org.apache.wicket.Application
>>> application, final Object o,
>>> +               final ObjectName objectName) throws
>>> InstanceAlreadyExistsException,
>>> +               MBeanRegistrationException, NotCompliantMBeanException
>>>          {
>>> -               mbeanServer.registerMBean(o, objectName);
>>> +               Object proxy = createProxy(application, o);
>>> +               mbeanServer.registerMBean(proxy, objectName);
>>>                  registered.add(objectName);
>>>          }
>>> +
>>> +       private Object createProxy(final org.apache.wicket.Application
>>> application, final Object o)
>>> +       {
>>> +               Enhancer e = new Enhancer();
>>> +               e.setInterfaces(o.getClass().getInterfaces());
>>> +               e.setSuperclass(Object.class);
>>>
>> I'm sure you have tested it but the lines above look a bit weird.
>> In Wicket 7.x all XyzSettings classes are Java classes and just few of
>> them implement some interfaces.
>> I have to test it but I think the JMX runtime won't be able to list the
>> setters and getters of the MBean because the proxy has no knowledge of its
>> delegate.
>> The fix I have in mind is:  e.setSuperclass(o.getClass());
>>
>>
>>> +               e.setCallback(new net.sf.cglib.proxy.InvocationHandler()
>>> +               {
>>> +                       @Override
>>> +                       public Object invoke(Object proxy, Method method,
>>> Object[] args) throws Throwable
>>> +                       {
>>> +                               boolean existed = ThreadContext.exists();
>>> +
>>> +                               if (existed == false)
>>> +                               {
>>> +
>>> ThreadContext.setApplication(application);
>>> +                               }
>>> +
>>> +                               try
>>> +                               {
>>> +                                       return method.invoke(o, args);
>>> +                               }
>>> +                               finally
>>> +                               {
>>> +                                       if (existed == false)
>>> +                                       {
>>> +                                               ThreadContext.detach();
>>> +                                       }
>>> +                               }
>>> +                       }
>>> +               });
>>> +               e.setNamingPolicy(new DefaultNamingPolicy()
>>> +               {
>>> +                       @Override
>>> +                       public String getClassName(final String prefix,
>>> final String source, final Object key,
>>> +                               final Predicate names)
>>> +                       {
>>> +                               return
>>> o.getClass().getName().replace(".wrapper", "");
>>> +                       }
>>> +               });
>>> +
>>> +               return e.create();
>>> +       }
>>>   }
>>>
>>>
>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettings.java
>>> ----------------------------------------------------------------------
>>> diff --git
>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettings.java
>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettings.java
>>> deleted file mode 100644
>>> index efa6048..0000000
>>> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettings.java
>>> +++ /dev/null
>>> @@ -1,128 +0,0 @@
>>> -/*
>>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>>> - * contributor license agreements.  See the NOTICE file distributed with
>>> - * this work for additional information regarding copyright ownership.
>>> - * The ASF licenses this file to You under the Apache License, Version
>>> 2.0
>>> - * (the "License"); you may not use this file except in compliance with
>>> - * the License.  You may obtain a copy of the License at
>>> - *
>>> - *      http://www.apache.org/licenses/LICENSE-2.0
>>> - *
>>> - * Unless required by applicable law or agreed to in writing, software
>>> - * distributed under the License is distributed on an "AS IS" BASIS,
>>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>> implied.
>>> - * See the License for the specific language governing permissions and
>>> - * limitations under the License.
>>> - */
>>> -package org.apache.wicket.jmx;
>>> -
>>> -
>>> -/**
>>> - * Exposes Application related functionality for JMX.
>>> - *
>>> - * @author eelcohillenius
>>> - */
>>> -public class MarkupSettings implements MarkupSettingsMBean
>>> -{
>>> -       private final org.apache.wicket.Application application;
>>> -
>>> -       /**
>>> -        * Create.
>>> -        *
>>> -        * @param application
>>> -        */
>>> -       public MarkupSettings(final org.apache.wicket.Application
>>> application)
>>> -       {
>>> -               this.application = application;
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.MarkupSettingsMBean#getAutomaticLinking()
>>> -        */
>>> -       @Override
>>> -       public boolean getAutomaticLinking()
>>> -       {
>>> -               return
>>> application.getMarkupSettings().getAutomaticLinking();
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.MarkupSettingsMBean#getCompressWhitespace()
>>> -        */
>>> -       @Override
>>> -       public boolean getCompressWhitespace()
>>> -       {
>>> -               return
>>> application.getMarkupSettings().getCompressWhitespace();
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.MarkupSettingsMBean#getDefaultMarkupEncoding()
>>> -        */
>>> -       @Override
>>> -       public String getDefaultMarkupEncoding()
>>> -       {
>>> -               return
>>> application.getMarkupSettings().getDefaultMarkupEncoding();
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.MarkupSettingsMBean#getStripComments()
>>> -        */
>>> -       @Override
>>> -       public boolean getStripComments()
>>> -       {
>>> -               return application.getMarkupSettings().getStripComments();
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.MarkupSettingsMBean#getStripWicketTags()
>>> -        */
>>> -       @Override
>>> -       public boolean getStripWicketTags()
>>> -       {
>>> -               return
>>> application.getMarkupSettings().getStripWicketTags();
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.MarkupSettingsMBean#setAutomaticLinking(boolean)
>>> -        */
>>> -       @Override
>>> -       public void setAutomaticLinking(final boolean automaticLinking)
>>> -       {
>>> -
>>> application.getMarkupSettings().setAutomaticLinking(automaticLinking);
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.MarkupSettingsMBean#setCompressWhitespace(boolean)
>>> -        */
>>> -       @Override
>>> -       public void setCompressWhitespace(final boolean
>>> compressWhitespace)
>>> -       {
>>> -
>>> application.getMarkupSettings().setCompressWhitespace(compressWhitespace);
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.MarkupSettingsMBean#setDefaultMarkupEncoding(java.lang.String)
>>> -        */
>>> -       @Override
>>> -       public void setDefaultMarkupEncoding(final String encoding)
>>> -       {
>>> -
>>> application.getMarkupSettings().setDefaultMarkupEncoding(encoding);
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.MarkupSettingsMBean#setStripComments(boolean)
>>> -        */
>>> -       @Override
>>> -       public void setStripComments(final boolean stripComments)
>>> -       {
>>> -
>>> application.getMarkupSettings().setStripComments(stripComments);
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.MarkupSettingsMBean#setStripWicketTags(boolean)
>>> -        */
>>> -       @Override
>>> -       public void setStripWicketTags(final boolean stripWicketTags)
>>> -       {
>>> -
>>> application.getMarkupSettings().setStripWicketTags(stripWicketTags);
>>> -       }
>>> -}
>>>
>>>
>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettingsMBean.java
>>> ----------------------------------------------------------------------
>>> diff --git
>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettingsMBean.java
>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettingsMBean.java
>>> index 91f2b23..df0d25d 100644
>>> ---
>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettingsMBean.java
>>> +++
>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettingsMBean.java
>>> @@ -16,6 +16,8 @@
>>>    */
>>>   package org.apache.wicket.jmx;
>>>
>>> +import org.apache.wicket.jmx.wrapper.MarkupSettings;
>>> +
>>>   /**
>>>    * Markup settings.
>>>    *
>>>
>>>
>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/PageSettings.java
>>> ----------------------------------------------------------------------
>>> diff --git
>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/PageSettings.java
>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/PageSettings.java
>>> deleted file mode 100644
>>> index b91b1e7..0000000
>>> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/PageSettings.java
>>> +++ /dev/null
>>> @@ -1,56 +0,0 @@
>>> -/*
>>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>>> - * contributor license agreements.  See the NOTICE file distributed with
>>> - * this work for additional information regarding copyright ownership.
>>> - * The ASF licenses this file to You under the Apache License, Version
>>> 2.0
>>> - * (the "License"); you may not use this file except in compliance with
>>> - * the License.  You may obtain a copy of the License at
>>> - *
>>> - *      http://www.apache.org/licenses/LICENSE-2.0
>>> - *
>>> - * Unless required by applicable law or agreed to in writing, software
>>> - * distributed under the License is distributed on an "AS IS" BASIS,
>>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>> implied.
>>> - * See the License for the specific language governing permissions and
>>> - * limitations under the License.
>>> - */
>>> -package org.apache.wicket.jmx;
>>> -
>>> -
>>> -/**
>>> - * Exposes Application related functionality for JMX.
>>> - *
>>> - * @author eelcohillenius
>>> - */
>>> -public class PageSettings implements PageSettingsMBean
>>> -{
>>> -       private final org.apache.wicket.Application application;
>>> -
>>> -       /**
>>> -        * Create.
>>> -        *
>>> -        * @param application
>>> -        */
>>> -       public PageSettings(final org.apache.wicket.Application
>>> application)
>>> -       {
>>> -               this.application = application;
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.PageSettingsMBean#getVersionPagesByDefault()
>>> -        */
>>> -       @Override
>>> -       public boolean getVersionPagesByDefault()
>>> -       {
>>> -               return
>>> application.getPageSettings().getVersionPagesByDefault();
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.PageSettingsMBean#setVersionPagesByDefault(boolean)
>>> -        */
>>> -       @Override
>>> -       public void setVersionPagesByDefault(final boolean
>>> pagesVersionedByDefault)
>>> -       {
>>> -
>>> application.getPageSettings().setVersionPagesByDefault(pagesVersionedByDefault);
>>> -       }
>>> -}
>>>
>>>
>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestCycleSettings.java
>>> ----------------------------------------------------------------------
>>> diff --git
>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestCycleSettings.java
>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestCycleSettings.java
>>> deleted file mode 100644
>>> index 8815ee0..0000000
>>> ---
>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestCycleSettings.java
>>> +++ /dev/null
>>> @@ -1,125 +0,0 @@
>>> -/*
>>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>>> - * contributor license agreements.  See the NOTICE file distributed with
>>> - * this work for additional information regarding copyright ownership.
>>> - * The ASF licenses this file to You under the Apache License, Version
>>> 2.0
>>> - * (the "License"); you may not use this file except in compliance with
>>> - * the License.  You may obtain a copy of the License at
>>> - *
>>> - *      http://www.apache.org/licenses/LICENSE-2.0
>>> - *
>>> - * Unless required by applicable law or agreed to in writing, software
>>> - * distributed under the License is distributed on an "AS IS" BASIS,
>>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>> implied.
>>> - * See the License for the specific language governing permissions and
>>> - * limitations under the License.
>>> - */
>>> -package org.apache.wicket.jmx;
>>> -
>>> -import org.apache.wicket.util.time.Duration;
>>> -
>>> -
>>> -/**
>>> - * Exposes Application related functionality for JMX.
>>> - *
>>> - * @author eelcohillenius
>>> - */
>>> -public class RequestCycleSettings implements RequestCycleSettingsMBean
>>> -{
>>> -       private final org.apache.wicket.Application application;
>>> -
>>> -       /**
>>> -        * Create.
>>> -        *
>>> -        * @param application
>>> -        */
>>> -       public RequestCycleSettings(final org.apache.wicket.Application
>>> application)
>>> -       {
>>> -               this.application = application;
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.RequestCycleSettingsMBean#getBufferResponse()
>>> -        */
>>> -       @Override
>>> -       public boolean getBufferResponse()
>>> -       {
>>> -               return
>>> application.getRequestCycleSettings().getBufferResponse();
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.RequestCycleSettingsMBean#getGatherExtendedBrowserInfo()
>>> -        */
>>> -       @Override
>>> -       public boolean getGatherExtendedBrowserInfo()
>>> -       {
>>> -               return
>>> application.getRequestCycleSettings().getGatherExtendedBrowserInfo();
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.RequestCycleSettingsMBean#getResponseRequestEncoding()
>>> -        */
>>> -       @Override
>>> -       public String getResponseRequestEncoding()
>>> -       {
>>> -               return
>>> application.getRequestCycleSettings().getResponseRequestEncoding();
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.RequestCycleSettingsMBean#getTimeout()
>>> -        */
>>> -       @Override
>>> -       public String getTimeout()
>>> -       {
>>> -               return
>>> application.getRequestCycleSettings().getTimeout().toString();
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.RequestCycleSettingsMBean#setBufferResponse(boolean)
>>> -        */
>>> -       @Override
>>> -       public void setBufferResponse(final boolean bufferResponse)
>>> -       {
>>> -
>>> application.getRequestCycleSettings().setBufferResponse(bufferResponse);
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.RequestCycleSettingsMBean#setGatherExtendedBrowserInfo(boolean)
>>> -        */
>>> -       @Override
>>> -       public void setGatherExtendedBrowserInfo(final boolean
>>> gatherExtendedBrowserInfo)
>>> -       {
>>> -
>>> application.getRequestCycleSettings().setGatherExtendedBrowserInfo(
>>> -                       gatherExtendedBrowserInfo);
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.RequestCycleSettingsMBean#setResponseRequestEncoding(java.lang.String)
>>> -        */
>>> -       @Override
>>> -       public void setResponseRequestEncoding(final String
>>> responseRequestEncoding)
>>> -       {
>>> -
>>> application.getRequestCycleSettings().setResponseRequestEncoding(responseRequestEncoding);
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.RequestCycleSettingsMBean#setTimeout(java.lang.String)
>>> -        */
>>> -       @Override
>>> -       public void setTimeout(final String timeout)
>>> -       {
>>> -
>>> application.getRequestCycleSettings().setTimeout(Duration.valueOf(timeout));
>>> -       }
>>> -
>>> -       @Override
>>> -       public void setExceptionRetryCount(int retries)
>>> -       {
>>> -
>>> application.getRequestCycleSettings().setExceptionRetryCount(retries);
>>> -       }
>>> -
>>> -       @Override
>>> -       public int getExceptionRetryCount()
>>> -       {
>>> -               return
>>> application.getRequestCycleSettings().getExceptionRetryCount();
>>> -       }
>>> -}
>>>
>>>
>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestLogger.java
>>> ----------------------------------------------------------------------
>>> diff --git
>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestLogger.java
>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestLogger.java
>>> deleted file mode 100644
>>> index 28ec4cf..0000000
>>> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestLogger.java
>>> +++ /dev/null
>>> @@ -1,166 +0,0 @@
>>> -/*
>>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>>> - * contributor license agreements.  See the NOTICE file distributed with
>>> - * this work for additional information regarding copyright ownership.
>>> - * The ASF licenses this file to You under the Apache License, Version
>>> 2.0
>>> - * (the "License"); you may not use this file except in compliance with
>>> - * the License.  You may obtain a copy of the License at
>>> - *
>>> - *      http://www.apache.org/licenses/LICENSE-2.0
>>> - *
>>> - * Unless required by applicable law or agreed to in writing, software
>>> - * distributed under the License is distributed on an "AS IS" BASIS,
>>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>> implied.
>>> - * See the License for the specific language governing permissions and
>>> - * limitations under the License.
>>> - */
>>> -package org.apache.wicket.jmx;
>>> -
>>> -import java.io.IOException;
>>> -
>>> -import org.apache.wicket.protocol.http.WebApplication;
>>> -
>>> -
>>> -/**
>>> - * Exposes {@link org.apache.wicket.protocol.http.RequestLogger} for JMX.
>>> - *
>>> - * @author eelcohillenius
>>> - */
>>> -public class RequestLogger implements RequestLoggerMBean
>>> -{
>>> -       private final org.apache.wicket.Application application;
>>> -
>>> -       private final WebApplication webApplication;
>>> -
>>> -       /**
>>> -        * Construct.
>>> -        *
>>> -        * @param application
>>> -        *            The application
>>> -        */
>>> -       public RequestLogger(final org.apache.wicket.Application
>>> application)
>>> -       {
>>> -               this.application = application;
>>> -
>>> -               // do this so that we don't have to cast all the time
>>> -               if (application instanceof WebApplication)
>>> -               {
>>> -                       webApplication = (WebApplication)application;
>>> -               }
>>> -               else
>>> -               {
>>> -                       webApplication = null;
>>> -               }
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.RequestLoggerMBean#getNumberOfCreatedSessions()
>>> -        */
>>> -       @Override
>>> -       public Integer getNumberOfCreatedSessions() throws IOException
>>> -       {
>>> -               org.apache.wicket.protocol.http.IRequestLogger logger =
>>> getRequestLogger();
>>> -               if (logger != null)
>>> -               {
>>> -                       return logger.getTotalCreatedSessions();
>>> -               }
>>> -               return null;
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.RequestLoggerMBean#getNumberOfLiveSessions()
>>> -        */
>>> -       @Override
>>> -       public Integer getNumberOfLiveSessions() throws IOException
>>> -       {
>>> -               org.apache.wicket.protocol.http.IRequestLogger logger =
>>> getRequestLogger();
>>> -               if (logger != null)
>>> -               {
>>> -                       return logger.getLiveSessions().length;
>>> -               }
>>> -               return null;
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.RequestLoggerMBean#getPeakNumberOfSessions()
>>> -        */
>>> -       @Override
>>> -       public Integer getPeakNumberOfSessions() throws IOException
>>> -       {
>>> -               org.apache.wicket.protocol.http.IRequestLogger logger =
>>> getRequestLogger();
>>> -               if (logger != null)
>>> -               {
>>> -                       return logger.getPeakSessions();
>>> -               }
>>> -               return null;
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.RequestLoggerMBean#getNumberOfCurrentActiveRequests()
>>> -        */
>>> -       @Override
>>> -       public Integer getNumberOfCurrentActiveRequests() throws
>>> IOException
>>> -       {
>>> -               org.apache.wicket.protocol.http.IRequestLogger logger =
>>> getRequestLogger();
>>> -               if (logger != null)
>>> -               {
>>> -                       return
>>> Integer.valueOf(logger.getCurrentActiveRequestCount());
>>> -               }
>>> -               return null;
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.RequestLoggerMBean#getPeakNumberOfActiveRequests()
>>> -        */
>>> -       @Override
>>> -       public Integer getPeakNumberOfActiveRequests() throws IOException
>>> -       {
>>> -               org.apache.wicket.protocol.http.IRequestLogger logger =
>>> getRequestLogger();
>>> -               if (logger != null)
>>> -               {
>>> -                       return
>>> Integer.valueOf(logger.getPeakActiveRequestCount());
>>> -               }
>>> -               return null;
>>> -       }
>>> -
>>> -       /**
>>> -        * @see org.apache.wicket.jmx.RequestLoggerMBean#restart()
>>> -        */
>>> -       @Override
>>> -       public void restart() throws IOException
>>> -       {
>>> -               if (webApplication != null)
>>> -               {
>>> -
>>> webApplication.getRequestLoggerSettings().setRequestLoggerEnabled(false);
>>> -                       webApplication.getRequestLogger();
>>> -
>>> webApplication.getRequestLoggerSettings().setRequestLoggerEnabled(true);
>>> -               }
>>> -       }
>>> -
>>> -       /**
>>> -        * @see org.apache.wicket.jmx.RequestLoggerMBean#stop()
>>> -        */
>>> -       @Override
>>> -       public void stop() throws IOException
>>> -       {
>>> -               if (webApplication != null)
>>> -               {
>>> -
>>> webApplication.getRequestLoggerSettings().setRequestLoggerEnabled(false);
>>> -               }
>>> -       }
>>> -
>>> -       /**
>>> -        * Gets the request logger for this application.
>>> -        *
>>> -        * @return The request logger or null if no request is active, or
>>> if this is not a web
>>> -        *         application
>>> -        */
>>> -       protected org.apache.wicket.protocol.http.IRequestLogger
>>> getRequestLogger()
>>> -       {
>>> -               if (application instanceof WebApplication)
>>> -               {
>>> -                       return application.getRequestLogger();
>>> -               }
>>> -               return null;
>>> -       }
>>> -}
>>>
>>>
>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/ResourceSettings.java
>>> ----------------------------------------------------------------------
>>> diff --git
>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/ResourceSettings.java
>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/ResourceSettings.java
>>> deleted file mode 100644
>>> index af7f60d..0000000
>>> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/ResourceSettings.java
>>> +++ /dev/null
>>> @@ -1,173 +0,0 @@
>>> -/*
>>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>>> - * contributor license agreements.  See the NOTICE file distributed with
>>> - * this work for additional information regarding copyright ownership.
>>> - * The ASF licenses this file to You under the Apache License, Version
>>> 2.0
>>> - * (the "License"); you may not use this file except in compliance with
>>> - * the License.  You may obtain a copy of the License at
>>> - *
>>> - *      http://www.apache.org/licenses/LICENSE-2.0
>>> - *
>>> - * Unless required by applicable law or agreed to in writing, software
>>> - * distributed under the License is distributed on an "AS IS" BASIS,
>>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>> implied.
>>> - * See the License for the specific language governing permissions and
>>> - * limitations under the License.
>>> - */
>>> -package org.apache.wicket.jmx;
>>> -
>>> -import java.util.List;
>>> -
>>> -import org.apache.wicket.ThreadContext;
>>> -import org.apache.wicket.resource.loader.IStringResourceLoader;
>>> -import org.apache.wicket.util.file.IResourceFinder;
>>> -import org.apache.wicket.util.lang.Generics;
>>> -import org.apache.wicket.util.time.Duration;
>>> -
>>> -
>>> -/**
>>> - * Exposes Application related functionality for JMX.
>>> - *
>>> - * @author eelcohillenius
>>> - */
>>> -public class ResourceSettings implements ResourceSettingsMBean
>>> -{
>>> -       private final org.apache.wicket.Application application;
>>> -
>>> -       /**
>>> -        * Create.
>>> -        *
>>> -        * @param application
>>> -        */
>>> -       public ResourceSettings(final org.apache.wicket.Application
>>> application)
>>> -       {
>>> -               this.application = application;
>>> -       }
>>> -
>>> -       /**
>>> -        * {@inheritDoc}
>>> -        */
>>> -       @Override
>>> -       public String getLocalizer()
>>> -       {
>>> -               return
>>> Stringz.className(application.getResourceSettings().getLocalizer());
>>> -       }
>>> -
>>> -       /**
>>> -        * {@inheritDoc}
>>> -        */
>>> -       @Override
>>> -       public String getPackageResourceGuard()
>>> -       {
>>> -               return
>>> Stringz.className(application.getResourceSettings().getPackageResourceGuard());
>>> -       }
>>> -
>>> -       /**
>>> -        * {@inheritDoc}
>>> -        */
>>> -       @Override
>>> -       public String getPropertiesFactory()
>>> -       {
>>> -               ThreadContext.setApplication(application);
>>> -
>>> -               try
>>> -               {
>>> -                       return
>>> Stringz.className(application.getResourceSettings().getPropertiesFactory());
>>> -               }
>>> -               finally
>>> -               {
>>> -                       ThreadContext.detach();
>>> -               }
>>> -       }
>>> -
>>> -       /**
>>> -        * {@inheritDoc}
>>> -        */
>>> -       @Override
>>> -       public String getResourceFinders()
>>> -       {
>>> -               StringBuilder builder = new StringBuilder();
>>> -               for (IResourceFinder rf :
>>> application.getResourceSettings().getResourceFinders())
>>> -               {
>>> -                       builder.append(Stringz.className(rf));
>>> -               }
>>> -               return builder.toString();
>>> -       }
>>> -
>>> -       /**
>>> -        * {@inheritDoc}
>>> -        */
>>> -       @Override
>>> -       public String getResourcePollFrequency()
>>> -       {
>>> -               Duration duration =
>>> application.getResourceSettings().getResourcePollFrequency();
>>> -               return (duration != null) ? duration.toString() : null;
>>> -       }
>>> -
>>> -       /**
>>> -        * {@inheritDoc}
>>> -        */
>>> -       @Override
>>> -       public String getResourceStreamLocator()
>>> -       {
>>> -               return
>>> Stringz.className(application.getResourceSettings().getResourceStreamLocator());
>>> -       }
>>> -
>>> -       /**
>>> -        * {@inheritDoc}
>>> -        */
>>> -       @Override
>>> -       public String[] getStringResourceLoaders()
>>> -       {
>>> -               List<IStringResourceLoader> loaders =
>>> application.getResourceSettings()
>>> -                       .getStringResourceLoaders();
>>> -               if (loaders != null)
>>> -               {
>>> -                       List<String> list = Generics.newArrayList();
>>> -                       for (Object loader : loaders)
>>> -                       {
>>> -                               list.add(loader.toString());
>>> -                       }
>>> -                       return list.toArray(new String[loaders.size()]);
>>> -               }
>>> -               return null;
>>> -       }
>>> -
>>> -       /**
>>> -        * {@inheritDoc}
>>> -        */
>>> -       @Override
>>> -       public boolean getThrowExceptionOnMissingResource()
>>> -       {
>>> -               return
>>> application.getResourceSettings().getThrowExceptionOnMissingResource();
>>> -       }
>>> -
>>> -       /**
>>> -        * {@inheritDoc}
>>> -        */
>>> -       @Override
>>> -       public boolean getUseDefaultOnMissingResource()
>>> -       {
>>> -               return
>>> application.getResourceSettings().getUseDefaultOnMissingResource();
>>> -       }
>>> -
>>> -       /**
>>> -        * {@inheritDoc}
>>> -        */
>>> -       @Override
>>> -       public void setThrowExceptionOnMissingResource(final boolean
>>> throwExceptionOnMissingResource)
>>> -       {
>>> -
>>> application.getResourceSettings().setThrowExceptionOnMissingResource(
>>> -                       throwExceptionOnMissingResource);
>>> -       }
>>> -
>>> -       /**
>>> -        * {@inheritDoc}
>>> -        */
>>> -       @Override
>>> -       public void setUseDefaultOnMissingResource(final boolean
>>> useDefaultOnMissingResource)
>>> -       {
>>> -
>>> application.getResourceSettings().setUseDefaultOnMissingResource(
>>> -                       useDefaultOnMissingResource);
>>> -       }
>>> -}
>>>
>>>
>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/SecuritySettings.java
>>> ----------------------------------------------------------------------
>>> diff --git
>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/SecuritySettings.java
>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/SecuritySettings.java
>>> deleted file mode 100644
>>> index be89017..0000000
>>> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/SecuritySettings.java
>>> +++ /dev/null
>>> @@ -1,65 +0,0 @@
>>> -/*
>>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>>> - * contributor license agreements.  See the NOTICE file distributed with
>>> - * this work for additional information regarding copyright ownership.
>>> - * The ASF licenses this file to You under the Apache License, Version
>>> 2.0
>>> - * (the "License"); you may not use this file except in compliance with
>>> - * the License.  You may obtain a copy of the License at
>>> - *
>>> - *      http://www.apache.org/licenses/LICENSE-2.0
>>> - *
>>> - * Unless required by applicable law or agreed to in writing, software
>>> - * distributed under the License is distributed on an "AS IS" BASIS,
>>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>> implied.
>>> - * See the License for the specific language governing permissions and
>>> - * limitations under the License.
>>> - */
>>> -package org.apache.wicket.jmx;
>>> -
>>> -/**
>>> - * Exposes Application related functionality for JMX.
>>> - *
>>> - * @author eelcohillenius
>>> - */
>>> -public class SecuritySettings implements SecuritySettingsMBean
>>> -{
>>> -       private final org.apache.wicket.Application application;
>>> -
>>> -       /**
>>> -        * Create.
>>> -        *
>>> -        * @param application
>>> -        */
>>> -       public SecuritySettings(final org.apache.wicket.Application
>>> application)
>>> -       {
>>> -               this.application = application;
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.SecuritySettingsMBean#getAuthorizationStrategy()
>>> -        */
>>> -       @Override
>>> -       public String getAuthorizationStrategy()
>>> -       {
>>> -               return
>>> Stringz.className(application.getSecuritySettings().getAuthorizationStrategy());
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.SecuritySettingsMBean#getCryptFactory()
>>> -        */
>>> -       @Override
>>> -       public String getCryptFactory()
>>> -       {
>>> -               return
>>> Stringz.className(application.getSecuritySettings().getCryptFactory());
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.SecuritySettingsMBean#getUnauthorizedComponentInstantiationListener()
>>> -        */
>>> -       @Override
>>> -       public String getUnauthorizedComponentInstantiationListener()
>>> -       {
>>> -               return Stringz.className(application.getSecuritySettings()
>>> -                       .getUnauthorizedComponentInstantiationListener());
>>> -       }
>>> -}
>>>
>>>
>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/SessionSettings.java
>>> ----------------------------------------------------------------------
>>> diff --git
>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/SessionSettings.java
>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/SessionSettings.java
>>> deleted file mode 100644
>>> index 6c15ab3..0000000
>>> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/SessionSettings.java
>>> +++ /dev/null
>>> @@ -1,55 +0,0 @@
>>> -/*
>>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>>> - * contributor license agreements.  See the NOTICE file distributed with
>>> - * this work for additional information regarding copyright ownership.
>>> - * The ASF licenses this file to You under the Apache License, Version
>>> 2.0
>>> - * (the "License"); you may not use this file except in compliance with
>>> - * the License.  You may obtain a copy of the License at
>>> - *
>>> - *      http://www.apache.org/licenses/LICENSE-2.0
>>> - *
>>> - * Unless required by applicable law or agreed to in writing, software
>>> - * distributed under the License is distributed on an "AS IS" BASIS,
>>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>> implied.
>>> - * See the License for the specific language governing permissions and
>>> - * limitations under the License.
>>> - */
>>> -package org.apache.wicket.jmx;
>>> -
>>> -/**
>>> - * Exposes Application related functionality for JMX.
>>> - *
>>> - * @author eelcohillenius
>>> - */
>>> -public class SessionSettings implements SessionSettingsMBean
>>> -{
>>> -       private final org.apache.wicket.Application application;
>>> -
>>> -       /**
>>> -        * Create.
>>> -        *
>>> -        * @param application
>>> -        */
>>> -       public SessionSettings(final org.apache.wicket.Application
>>> application)
>>> -       {
>>> -               this.application = application;
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.SessionSettingsMBean#getPageFactory()
>>> -        */
>>> -       @Override
>>> -       public String getPageFactory()
>>> -       {
>>> -               return Stringz.className(application.getPageFactory());
>>> -       }
>>> -
>>> -       /**
>>> -        * @see
>>> org.apache.wicket.jmx.SessionSettingsMBean#getSessionStore()
>>> -        */
>>> -       @Override
>>> -       public String getSessionStore()
>>> -       {
>>> -               return Stringz.className(application.getSessionStore());
>>> -       }
>>> -}
>>>
>>>
>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/StoreSettings.java
>>> ----------------------------------------------------------------------
>>> diff --git
>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/StoreSettings.java
>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/StoreSettings.java
>>> deleted file mode 100644
>>> index 4705f3f..0000000
>>> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/StoreSettings.java
>>> +++ /dev/null
>>> @@ -1,68 +0,0 @@
>>> -/*
>>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>>> - * contributor license agreements.  See the NOTICE file distributed with
>>> - * this work for additional information regarding copyright ownership.
>>> - * The ASF licenses this file to You under the Apache License, Version
>>> 2.0
>>> - * (the "License"); you may not use this file except in compliance with
>>> - * the License.  You may obtain a copy of the License at
>>> - *
>>> - *      http://www.apache.org/licenses/LICENSE-2.0
>>> - *
>>> - * Unless required by applicable law or agreed to in writing, software
>>> - * distributed under the License is distributed on an "AS IS" BASIS,
>>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>> implied.
>>> - * See the License for the specific language governing permissions and
>>> - * limitations under the License.
>>> - */
>>> -package org.apache.wicket.jmx;
>>> -
>>> -import org.apache.wicket.Application;
>>> -
>>> -/**
>>> - * Exposes Application's StoreSettings for JMX.
>>> - */
>>> -public class StoreSettings implements StoreSettingsMBean
>>> -{
>>> -       private final Application application;
>>> -
>>> -       /**
>>> -        * Construct.
>>> -        *
>>> -        * @param application
>>> -        */
>>> -       public StoreSettings(final Application application)
>>> -       {
>>> -               this.application = application;
>>> -       }
>>> -
>>> -       @Override
>>> -       public int getInmemoryCacheSize()
>>> -       {
>>> -               return
>>> application.getStoreSettings().getInmemoryCacheSize();
>>> -       }
>>> -
>>> -       @Override
>>> -       public long getMaxSizePerSession()
>>> -       {
>>> -               return
>>> application.getStoreSettings().getMaxSizePerSession().bytes();
>>> -       }
>>> -
>>> -       @Override
>>> -       public String getFileStoreFolder()
>>> -       {
>>> -               return
>>> application.getStoreSettings().getFileStoreFolder().getAbsolutePath();
>>> -       }
>>> -
>>> -       @Override
>>> -       public int getAsynchronousQueueCapacity()
>>> -       {
>>> -               return
>>> application.getStoreSettings().getAsynchronousQueueCapacity();
>>> -       }
>>> -
>>> -       @Override
>>> -       public boolean isAsynchronous()
>>> -       {
>>> -               return application.getStoreSettings().isAsynchronous();
>>> -       }
>>> -
>>> -}
>>>
>>>
>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/Stringz.java
>>> ----------------------------------------------------------------------
>>> diff --git a/wicket-jmx/src/main/java/org/apache/wicket/jmx/Stringz.java
>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/Stringz.java
>>> deleted file mode 100644
>>> index f9f6381..0000000
>>> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/Stringz.java
>>> +++ /dev/null
>>> @@ -1,25 +0,0 @@
>>> -/*
>>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>>> - * contributor license agreements.  See the NOTICE file distributed with
>>> - * this work for additional information regarding copyright ownership.
>>> - * The ASF licenses this file to You under the Apache License, Version
>>> 2.0
>>> - * (the "License"); you may not use this file except in compliance with
>>> - * the License.  You may obtain a copy of the License at
>>> - *
>>> - *      http://www.apache.org/licenses/LICENSE-2.0
>>> - *
>>> - * Unless required by applicable law or agreed to in writing, software
>>> - * distributed under the License is distributed on an "AS IS" BASIS,
>>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>> implied.
>>> - * See the License for the specific language governing permissions and
>>> - * limitations under the License.
>>> - */
>>> -package org.apache.wicket.jmx;
>>> -
>>> -class Stringz
>>> -{
>>> -       static String className(final Object o)
>>> -       {
>>> -               return (o != null) ? o.getClass().getName() : null;
>>> -       }
>>> -}
>>>
>>>
>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/Application.java
>>> ----------------------------------------------------------------------
>>> diff --git
>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/Application.java
>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/Application.java
>>> new file mode 100644
>>> index 0000000..56e0eff
>>> --- /dev/null
>>> +++
>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/Application.java
>>> @@ -0,0 +1,104 @@
>>> +/*
>>> + * Licensed to the Apache Software Foundation (ASF) under one or more
>>> + * contributor license agreements.  See the NOTICE file distributed with
>>> + * this work for additional information regarding copyright ownership.
>>> + * The ASF licenses this file to You under the Apache License, Version
>>> 2.0
>>> + * (the "License"); you may not use this file except in compliance with
>>> + * the License.  You may obtain a copy of the License at
>>> + *
>>> + *      http://www.apache.org/licenses/LICENSE-2.0
>>> + *
>>> + * Unless required by applicable law or agreed to in writing, software
>>> + * distributed under the License is distributed on an "AS IS" BASIS,
>>> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>> implied.
>>> + * See the License for the specific language governing permissions and
>>> + * limitations under the License.
>>> + */
>>> +package org.apache.wicket.jmx.wrapper;
>>> +
>>> +import java.io.IOException;
>>> +
>>> +import org.apache.wicket.jmx.ApplicationMBean;
>>> +
>>> +/**
>>> + * Exposes Application related functionality for JMX.
>>> + *
>>> + * @author eelcohillenius
>>> + */
>>> +public class Application implements ApplicationMBean
>>> +{
>>> +       private final org.apache.wicket.Application application;
>>> +
>>> +       /**
>>> +        * Create.
>>> +        *
>>> +        * @param application
>>> +        */
>>> +       public Application(final org.apache.wicket.Application
>>> application)
>>> +       {
>>> +               this.application = application;
>>> +       }
>>> +
>>> +       /**
>>> +        * @see org.apache.wicket.jmx.ApplicationMBean#clearMarkupCache()
>>> +        */
>>> +       @Override
>>> +       public void clearMarkupCache() throws IOException
>>> +       {
>>> +
>>> application.getMarkupSettings().getMarkupFactory().getMarkupCache().clear();
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.ApplicationMBean#getApplicationClass()
>>> +        */
>>> +       @Override
>>> +       public String getApplicationClass() throws IOException
>>> +       {
>>> +               return application.getClass().getName();
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.ApplicationMBean#getConfigurationType()
>>> +        */
>>> +       @Override
>>> +       public String getConfigurationType()
>>> +       {
>>> +               return application.getConfigurationType().name();
>>> +       }
>>> +
>>> +       /**
>>> +        * @see org.apache.wicket.jmx.ApplicationMBean#getHomePageClass()
>>> +        */
>>> +       @Override
>>> +       public String getHomePageClass() throws IOException
>>> +       {
>>> +               return application.getHomePage().getName();
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.ApplicationMBean#getMarkupCacheSize()
>>> +        */
>>> +       @Override
>>> +       public int getMarkupCacheSize() throws IOException
>>> +       {
>>> +               return
>>> application.getMarkupSettings().getMarkupFactory().getMarkupCache().size();
>>> +       }
>>> +
>>> +       /**
>>> +        * @see org.apache.wicket.jmx.ApplicationMBean#getWicketVersion()
>>> +        */
>>> +       @Override
>>> +       public String getWicketVersion() throws IOException
>>> +       {
>>> +               return application.getFrameworkSettings().getVersion();
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.ApplicationMBean#clearLocalizerCache()
>>> +        */
>>> +       @Override
>>> +       public void clearLocalizerCache() throws IOException
>>> +       {
>>> +
>>> application.getResourceSettings().getLocalizer().clearCache();
>>> +       }
>>> +}
>>>
>>>
>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/ApplicationSettings.java
>>> ----------------------------------------------------------------------
>>> diff --git
>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/ApplicationSettings.java
>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/ApplicationSettings.java
>>> new file mode 100644
>>> index 0000000..a6a0d4c
>>> --- /dev/null
>>> +++
>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/ApplicationSettings.java
>>> @@ -0,0 +1,103 @@
>>> +/*
>>> + * Licensed to the Apache Software Foundation (ASF) under one or more
>>> + * contributor license agreements.  See the NOTICE file distributed with
>>> + * this work for additional information regarding copyright ownership.
>>> + * The ASF licenses this file to You under the Apache License, Version
>>> 2.0
>>> + * (the "License"); you may not use this file except in compliance with
>>> + * the License.  You may obtain a copy of the License at
>>> + *
>>> + *      http://www.apache.org/licenses/LICENSE-2.0
>>> + *
>>> + * Unless required by applicable law or agreed to in writing, software
>>> + * distributed under the License is distributed on an "AS IS" BASIS,
>>> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>> implied.
>>> + * See the License for the specific language governing permissions and
>>> + * limitations under the License.
>>> + */
>>> +package org.apache.wicket.jmx.wrapper;
>>> +
>>> +import org.apache.wicket.Application;
>>> +import org.apache.wicket.jmx.ApplicationSettingsMBean;
>>> +import org.apache.wicket.util.lang.Bytes;
>>> +import org.apache.wicket.util.lang.Classes;
>>> +
>>> +/**
>>> + * Exposes Application related functionality for JMX.
>>> + *
>>> + * @author eelcohillenius
>>> + */
>>> +public class ApplicationSettings implements ApplicationSettingsMBean
>>> +{
>>> +       private final Application application;
>>> +
>>> +       /**
>>> +        * Create.
>>> +        *
>>> +        * @param application
>>> +        */
>>> +       public ApplicationSettings(final Application application)
>>> +       {
>>> +               this.application = application;
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.ApplicationSettingsMBean#getAccessDeniedPage()
>>> +        */
>>> +       @Override
>>> +       public String getAccessDeniedPage()
>>> +       {
>>> +               return
>>> Classes.name(application.getApplicationSettings().getAccessDeniedPage());
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.ApplicationSettingsMBean#getClassResolver()
>>> +        */
>>> +       @Override
>>> +       public String getClassResolver()
>>> +       {
>>> +               return
>>> Stringz.className(application.getApplicationSettings().getClassResolver());
>>> +       }
>>> +
>>> +       @Override
>>> +       public String getDefaultMaximumUploadSize()
>>> +       {
>>> +               return
>>> application.getApplicationSettings().getDefaultMaximumUploadSize().toString();
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.ApplicationSettingsMBean#getInternalErrorPage()
>>> +        */
>>> +       @Override
>>> +       public String getInternalErrorPage()
>>> +       {
>>> +               return
>>> Classes.name(application.getApplicationSettings().getInternalErrorPage());
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.ApplicationSettingsMBean#getPageExpiredErrorPage()
>>> +        */
>>> +       @Override
>>> +       public String getPageExpiredErrorPage()
>>> +       {
>>> +               return
>>> Classes.name(application.getApplicationSettings().getPageExpiredErrorPage());
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.ApplicationSettingsMBean#getUnexpectedExceptionDisplay()
>>> +        */
>>> +       @Override
>>> +       public String getUnexpectedExceptionDisplay()
>>> +       {
>>> +               return
>>> application.getExceptionSettings().getUnexpectedExceptionDisplay().toString();
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.ApplicationSettingsMBean#setDefaultMaximumUploadSize(java.lang.String)
>>> +        */
>>> +       @Override
>>> +       public void setDefaultMaximumUploadSize(final String
>>> defaultUploadSize)
>>> +       {
>>> +
>>> application.getApplicationSettings().setDefaultMaximumUploadSize(
>>> +                       Bytes.valueOf(defaultUploadSize));
>>> +       }
>>> +}
>>>
>>>
>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/DebugSettings.java
>>> ----------------------------------------------------------------------
>>> diff --git
>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/DebugSettings.java
>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/DebugSettings.java
>>> new file mode 100644
>>> index 0000000..fcd073a
>>> --- /dev/null
>>> +++
>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/DebugSettings.java
>>> @@ -0,0 +1,167 @@
>>> +/*
>>> + * Licensed to the Apache Software Foundation (ASF) under one or more
>>> + * contributor license agreements.  See the NOTICE file distributed with
>>> + * this work for additional information regarding copyright ownership.
>>> + * The ASF licenses this file to You under the Apache License, Version
>>> 2.0
>>> + * (the "License"); you may not use this file except in compliance with
>>> + * the License.  You may obtain a copy of the License at
>>> + *
>>> + *      http://www.apache.org/licenses/LICENSE-2.0
>>> + *
>>> + * Unless required by applicable law or agreed to in writing, software
>>> + * distributed under the License is distributed on an "AS IS" BASIS,
>>> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>> implied.
>>> + * See the License for the specific language governing permissions and
>>> + * limitations under the License.
>>> + */
>>> +package org.apache.wicket.jmx.wrapper;
>>> +
>>> +import org.apache.wicket.Application;
>>> +import org.apache.wicket.jmx.DebugSettingsMBean;
>>> +
>>> +/**
>>> + * Exposes Application related functionality for JMX.
>>> + *
>>> + * @author eelcohillenius
>>> + */
>>> +public class DebugSettings implements DebugSettingsMBean
>>> +{
>>> +       private final Application application;
>>> +
>>> +       /**
>>> +        * Create.
>>> +        *
>>> +        * @param application
>>> +        */
>>> +       public DebugSettings(final Application application)
>>> +       {
>>> +               this.application = application;
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.DebugSettingsMBean#getComponentUseCheck()
>>> +        */
>>> +       @Override
>>> +       public boolean getComponentUseCheck()
>>> +       {
>>> +               return
>>> application.getDebugSettings().getComponentUseCheck();
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.DebugSettingsMBean#isAjaxDebugModeEnabled()
>>> +        */
>>> +       @Override
>>> +       public boolean isAjaxDebugModeEnabled()
>>> +       {
>>> +               return
>>> application.getDebugSettings().isAjaxDebugModeEnabled();
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.DebugSettingsMBean#setAjaxDebugModeEnabled(boolean)
>>> +        */
>>> +       @Override
>>> +       public void setAjaxDebugModeEnabled(final boolean enable)
>>> +       {
>>> +
>>> application.getDebugSettings().setAjaxDebugModeEnabled(enable);
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.DebugSettingsMBean#setComponentUseCheck(boolean)
>>> +        */
>>> +       @Override
>>> +       public void setComponentUseCheck(final boolean check)
>>> +       {
>>> +
>>> application.getDebugSettings().setComponentUseCheck(check);
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.DebugSettingsMBean#setOutputComponentPath(boolean)
>>> +        */
>>> +       @Override
>>> +       public void setOutputComponentPath(final boolean enabled)
>>> +       {
>>> +
>>> application.getDebugSettings().setOutputComponentPath(enabled);
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.DebugSettingsMBean#isOutputComponentPath()
>>> +        */
>>> +       @Override
>>> +       public boolean isOutputComponentPath()
>>> +       {
>>> +               return
>>> application.getDebugSettings().isOutputComponentPath();
>>> +       }
>>> +
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.DebugSettingsMBean#setOutputMarkupContainerClassName(boolean)
>>> +        */
>>> +       @Override
>>> +       public void setOutputMarkupContainerClassName(final boolean
>>> enable)
>>> +       {
>>> +
>>> application.getDebugSettings().setOutputMarkupContainerClassName(enable);
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.DebugSettingsMBean#isOutputMarkupContainerClassName()
>>> +        */
>>> +       @Override
>>> +       public boolean isOutputMarkupContainerClassName()
>>> +       {
>>> +               return
>>> application.getDebugSettings().isOutputMarkupContainerClassName();
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.DebugSettingsMBean#isLinePreciseReportingOnAddComponentEnabled()
>>> +        */
>>> +       @Override
>>> +       public boolean isLinePreciseReportingOnAddComponentEnabled()
>>> +       {
>>> +               return
>>> application.getDebugSettings().isLinePreciseReportingOnAddComponentEnabled();
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.DebugSettingsMBean#setLinePreciseReportingOnAddComponentEnabled(boolean)
>>> +        */
>>> +       @Override
>>> +       public void setLinePreciseReportingOnAddComponentEnabled(final
>>> boolean enable)
>>> +       {
>>> +
>>> application.getDebugSettings().setLinePreciseReportingOnAddComponentEnabled(enable);
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.DebugSettingsMBean#isLinePreciseReportingOnNewComponentEnabled()
>>> +        */
>>> +       @Override
>>> +       public boolean isLinePreciseReportingOnNewComponentEnabled()
>>> +       {
>>> +               return
>>> application.getDebugSettings().isLinePreciseReportingOnNewComponentEnabled();
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.DebugSettingsMBean#setLinePreciseReportingOnNewComponentEnabled(boolean)
>>> +        */
>>> +       @Override
>>> +       public void setLinePreciseReportingOnNewComponentEnabled(final
>>> boolean enable)
>>> +       {
>>> +
>>> application.getDebugSettings().setLinePreciseReportingOnNewComponentEnabled(enable);
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.DebugSettingsMBean#setDevelopmentUtilitiesEnabled(boolean)
>>> +        */
>>> +       @Override
>>> +       public void setDevelopmentUtilitiesEnabled(final boolean enable)
>>> +       {
>>> +
>>> application.getDebugSettings().setDevelopmentUtilitiesEnabled(enable);
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.DebugSettingsMBean#isDevelopmentUtilitiesEnabled()
>>> +        */
>>> +       @Override
>>> +       public boolean isDevelopmentUtilitiesEnabled()
>>> +       {
>>> +               return
>>> application.getDebugSettings().isDevelopmentUtilitiesEnabled();
>>> +       }
>>> +}
>>>
>>>
>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/MarkupSettings.java
>>> ----------------------------------------------------------------------
>>> diff --git
>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/MarkupSettings.java
>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/MarkupSettings.java
>>> new file mode 100644
>>> index 0000000..387b2ba
>>> --- /dev/null
>>> +++
>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/MarkupSettings.java
>>> @@ -0,0 +1,131 @@
>>> +/*
>>> + * Licensed to the Apache Software Foundation (ASF) under one or more
>>> + * contributor license agreements.  See the NOTICE file distributed with
>>> + * this work for additional information regarding copyright ownership.
>>> + * The ASF licenses this file to You under the Apache License, Version
>>> 2.0
>>> + * (the "License"); you may not use this file except in compliance with
>>> + * the License.  You may obtain a copy of the License at
>>> + *
>>> + *      http://www.apache.org/licenses/LICENSE-2.0
>>> + *
>>> + * Unless required by applicable law or agreed to in writing, software
>>> + * distributed under the License is distributed on an "AS IS" BASIS,
>>> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>> implied.
>>> + * See the License for the specific language governing permissions and
>>> + * limitations under the License.
>>> + */
>>> +package org.apache.wicket.jmx.wrapper;
>>> +
>>> +import org.apache.wicket.Application;
>>> +import org.apache.wicket.jmx.MarkupSettingsMBean;
>>> +
>>> +
>>> +/**
>>> + * Exposes Application related functionality for JMX.
>>> + *
>>> + * @author eelcohillenius
>>> + */
>>> +public class MarkupSettings implements MarkupSettingsMBean
>>> +{
>>> +       private final Application application;
>>> +
>>> +       /**
>>> +        * Create.
>>> +        *
>>> +        * @param application
>>> +        */
>>> +       public MarkupSettings(final Application application)
>>> +       {
>>> +               this.application = application;
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.MarkupSettingsMBean#getAutomaticLinking()
>>> +        */
>>> +       @Override
>>> +       public boolean getAutomaticLinking()
>>> +       {
>>> +               return
>>> application.getMarkupSettings().getAutomaticLinking();
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.MarkupSettingsMBean#getCompressWhitespace()
>>> +        */
>>> +       @Override
>>> +       public boolean getCompressWhitespace()
>>> +       {
>>> +               return
>>> application.getMarkupSettings().getCompressWhitespace();
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.MarkupSettingsMBean#getDefaultMarkupEncoding()
>>> +        */
>>> +       @Override
>>> +       public String getDefaultMarkupEncoding()
>>> +       {
>>> +               return
>>> application.getMarkupSettings().getDefaultMarkupEncoding();
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.MarkupSettingsMBean#getStripComments()
>>> +        */
>>> +       @Override
>>> +       public boolean getStripComments()
>>> +       {
>>> +               return application.getMarkupSettings().getStripComments();
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.MarkupSettingsMBean#getStripWicketTags()
>>> +        */
>>> +       @Override
>>> +       public boolean getStripWicketTags()
>>> +       {
>>> +               return
>>> application.getMarkupSettings().getStripWicketTags();
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.MarkupSettingsMBean#setAutomaticLinking(boolean)
>>> +        */
>>> +       @Override
>>> +       public void setAutomaticLinking(final boolean automaticLinking)
>>> +       {
>>> +
>>> application.getMarkupSettings().setAutomaticLinking(automaticLinking);
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.MarkupSettingsMBean#setCompressWhitespace(boolean)
>>> +        */
>>> +       @Override
>>> +       public void setCompressWhitespace(final boolean
>>> compressWhitespace)
>>> +       {
>>> +
>>> application.getMarkupSettings().setCompressWhitespace(compressWhitespace);
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.MarkupSettingsMBean#setDefaultMarkupEncoding(java.lang.String)
>>> +        */
>>> +       @Override
>>> +       public void setDefaultMarkupEncoding(final String encoding)
>>> +       {
>>> +
>>> application.getMarkupSettings().setDefaultMarkupEncoding(encoding);
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.MarkupSettingsMBean#setStripComments(boolean)
>>> +        */
>>> +       @Override
>>> +       public void setStripComments(final boolean stripComments)
>>> +       {
>>> +
>>> application.getMarkupSettings().setStripComments(stripComments);
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.MarkupSettingsMBean#setStripWicketTags(boolean)
>>> +        */
>>> +       @Override
>>> +       public void setStripWicketTags(final boolean stripWicketTags)
>>> +       {
>>> +
>>> application.getMarkupSettings().setStripWicketTags(stripWicketTags);
>>> +       }
>>> +}
>>>
>>>
>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/PageSettings.java
>>> ----------------------------------------------------------------------
>>> diff --git
>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/PageSettings.java
>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/PageSettings.java
>>> new file mode 100644
>>> index 0000000..27d325d
>>> --- /dev/null
>>> +++
>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/PageSettings.java
>>> @@ -0,0 +1,59 @@
>>> +/*
>>> + * Licensed to the Apache Software Foundation (ASF) under one or more
>>> + * contributor license agreements.  See the NOTICE file distributed with
>>> + * this work for additional information regarding copyright ownership.
>>> + * The ASF licenses this file to You under the Apache License, Version
>>> 2.0
>>> + * (the "License"); you may not use this file except in compliance with
>>> + * the License.  You may obtain a copy of the License at
>>> + *
>>> + *      http://www.apache.org/licenses/LICENSE-2.0
>>> + *
>>> + * Unless required by applicable law or agreed to in writing, software
>>> + * distributed under the License is distributed on an "AS IS" BASIS,
>>> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>> implied.
>>> + * See the License for the specific language governing permissions and
>>> + * limitations under the License.
>>> + */
>>> +package org.apache.wicket.jmx.wrapper;
>>> +
>>> +import org.apache.wicket.Application;
>>> +import org.apache.wicket.jmx.PageSettingsMBean;
>>> +
>>> +
>>> +/**
>>> + * Exposes Application related functionality for JMX.
>>> + *
>>> + * @author eelcohillenius
>>> + */
>>> +public class PageSettings implements PageSettingsMBean
>>> +{
>>> +       private final Application application;
>>> +
>>> +       /**
>>> +        * Create.
>>> +        *
>>> +        * @param application
>>> +        */
>>> +       public PageSettings(final Application application)
>>> +       {
>>> +               this.application = application;
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.PageSettingsMBean#getVersionPagesByDefault()
>>> +        */
>>> +       @Override
>>> +       public boolean getVersionPagesByDefault()
>>> +       {
>>> +               return
>>> application.getPageSettings().getVersionPagesByDefault();
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.PageSettingsMBean#setVersionPagesByDefault(boolean)
>>> +        */
>>> +       @Override
>>> +       public void setVersionPagesByDefault(final boolean
>>> pagesVersionedByDefault)
>>> +       {
>>> +
>>> application.getPageSettings().setVersionPagesByDefault(pagesVersionedByDefault);
>>> +       }
>>> +}
>>>
>>>
>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/RequestCycleSettings.java
>>> ----------------------------------------------------------------------
>>> diff --git
>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/RequestCycleSettings.java
>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/RequestCycleSettings.java
>>> new file mode 100644
>>> index 0000000..8fa04f2
>>> --- /dev/null
>>> +++
>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/RequestCycleSettings.java
>>> @@ -0,0 +1,127 @@
>>> +/*
>>> + * Licensed to the Apache Software Foundation (ASF) under one or more
>>> + * contributor license agreements.  See the NOTICE file distributed with
>>> + * this work for additional information regarding copyright ownership.
>>> + * The ASF licenses this file to You under the Apache License, Version
>>> 2.0
>>> + * (the "License"); you may not use this file except in compliance with
>>> + * the License.  You may obtain a copy of the License at
>>> + *
>>> + *      http://www.apache.org/licenses/LICENSE-2.0
>>> + *
>>> + * Unless required by applicable law or agreed to in writing, software
>>> + * distributed under the License is distributed on an "AS IS" BASIS,
>>> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>> implied.
>>> + * See the License for the specific language governing permissions and
>>> + * limitations under the License.
>>> + */
>>> +package org.apache.wicket.jmx.wrapper;
>>> +
>>> +import org.apache.wicket.Application;
>>> +import org.apache.wicket.jmx.RequestCycleSettingsMBean;
>>> +import org.apache.wicket.util.time.Duration;
>>> +
>>> +
>>> +/**
>>> + * Exposes Application related functionality for JMX.
>>> + *
>>> + * @author eelcohillenius
>>> + */
>>> +public class RequestCycleSettings implements RequestCycleSettingsMBean
>>> +{
>>> +       private final Application application;
>>> +
>>> +       /**
>>> +        * Create.
>>> +        *
>>> +        * @param application
>>> +        */
>>> +       public RequestCycleSettings(final Application application)
>>> +       {
>>> +               this.application = application;
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.RequestCycleSettingsMBean#getBufferResponse()
>>> +        */
>>> +       @Override
>>> +       public boolean getBufferResponse()
>>> +       {
>>> +               return
>>> application.getRequestCycleSettings().getBufferResponse();
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.RequestCycleSettingsMBean#getGatherExtendedBrowserInfo()
>>> +        */
>>> +       @Override
>>> +       public boolean getGatherExtendedBrowserInfo()
>>> +       {
>>> +               return
>>> application.getRequestCycleSettings().getGatherExtendedBrowserInfo();
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.RequestCycleSettingsMBean#getResponseRequestEncoding()
>>> +        */
>>> +       @Override
>>> +       public String getResponseRequestEncoding()
>>> +       {
>>> +               return
>>> application.getRequestCycleSettings().getResponseRequestEncoding();
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.RequestCycleSettingsMBean#getTimeout()
>>> +        */
>>> +       @Override
>>> +       public String getTimeout()
>>> +       {
>>> +               return
>>> application.getRequestCycleSettings().getTimeout().toString();
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.RequestCycleSettingsMBean#setBufferResponse(boolean)
>>> +        */
>>> +       @Override
>>> +       public void setBufferResponse(final boolean bufferResponse)
>>> +       {
>>> +
>>> application.getRequestCycleSettings().setBufferResponse(bufferResponse);
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.RequestCycleSettingsMBean#setGatherExtendedBrowserInfo(boolean)
>>> +        */
>>> +       @Override
>>> +       public void setGatherExtendedBrowserInfo(final boolean
>>> gatherExtendedBrowserInfo)
>>> +       {
>>> +
>>> application.getRequestCycleSettings().setGatherExtendedBrowserInfo(
>>> +                       gatherExtendedBrowserInfo);
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.RequestCycleSettingsMBean#setResponseRequestEncoding(java.lang.String)
>>> +        */
>>> +       @Override
>>> +       public void setResponseRequestEncoding(final String
>>> responseRequestEncoding)
>>> +       {
>>> +
>>> application.getRequestCycleSettings().setResponseRequestEncoding(responseRequestEncoding);
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.RequestCycleSettingsMBean#setTimeout(java.lang.String)
>>> +        */
>>> +       @Override
>>> +       public void setTimeout(final String timeout)
>>> +       {
>>> +
>>> application.getRequestCycleSettings().setTimeout(Duration.valueOf(timeout));
>>> +       }
>>> +
>>> +       @Override
>>> +       public void setExceptionRetryCount(int retries)
>>> +       {
>>> +
>>> application.getRequestCycleSettings().setExceptionRetryCount(retries);
>>> +       }
>>> +
>>> +       @Override
>>> +       public int getExceptionRetryCount()
>>> +       {
>>> +               return
>>> application.getRequestCycleSettings().getExceptionRetryCount();
>>> +       }
>>> +}
>>>
>>>
>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/RequestLogger.java
>>> ----------------------------------------------------------------------
>>> diff --git
>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/RequestLogger.java
>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/RequestLogger.java
>>> new file mode 100644
>>> index 0000000..90e234f
>>> --- /dev/null
>>> +++
>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/RequestLogger.java
>>> @@ -0,0 +1,168 @@
>>> +/*
>>> + * Licensed to the Apache Software Foundation (ASF) under one or more
>>> + * contributor license agreements.  See the NOTICE file distributed with
>>> + * this work for additional information regarding copyright ownership.
>>> + * The ASF licenses this file to You under the Apache License, Version
>>> 2.0
>>> + * (the "License"); you may not use this file except in compliance with
>>> + * the License.  You may obtain a copy of the License at
>>> + *
>>> + *      http://www.apache.org/licenses/LICENSE-2.0
>>> + *
>>> + * Unless required by applicable law or agreed to in writing, software
>>> + * distributed under the License is distributed on an "AS IS" BASIS,
>>> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>> implied.
>>> + * See the License for the specific language governing permissions and
>>> + * limitations under the License.
>>> + */
>>> +package org.apache.wicket.jmx.wrapper;
>>> +
>>> +import java.io.IOException;
>>> +
>>> +import org.apache.wicket.Application;
>>> +import org.apache.wicket.jmx.RequestLoggerMBean;
>>> +import org.apache.wicket.protocol.http.WebApplication;
>>> +
>>> +
>>> +/**
>>> + * Exposes {@link org.apache.wicket.protocol.http.RequestLogger} for JMX.
>>> + *
>>> + * @author eelcohillenius
>>> + */
>>> +public class RequestLogger implements RequestLoggerMBean
>>> +{
>>> +       private final Application application;
>>> +
>>> +       private final WebApplication webApplication;
>>> +
>>> +       /**
>>> +        * Construct.
>>> +        *
>>> +        * @param application
>>> +        *            The application
>>> +        */
>>> +       public RequestLogger(final Application application)
>>> +       {
>>> +               this.application = application;
>>> +
>>> +               // do this so that we don't have to cast all the time
>>> +               if (application instanceof WebApplication)
>>> +               {
>>> +                       webApplication = (WebApplication)application;
>>> +               }
>>> +               else
>>> +               {
>>> +                       webApplication = null;
>>> +               }
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.RequestLoggerMBean#getNumberOfCreatedSessions()
>>> +        */
>>> +       @Override
>>> +       public Integer getNumberOfCreatedSessions() throws IOException
>>> +       {
>>> +               org.apache.wicket.protocol.http.IRequestLogger logger =
>>> getRequestLogger();
>>> +               if (logger != null)
>>> +               {
>>> +                       return logger.getTotalCreatedSessions();
>>> +               }
>>> +               return null;
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.RequestLoggerMBean#getNumberOfLiveSessions()
>>> +        */
>>> +       @Override
>>> +       public Integer getNumberOfLiveSessions() throws IOException
>>> +       {
>>> +               org.apache.wicket.protocol.http.IRequestLogger logger =
>>> getRequestLogger();
>>> +               if (logger != null)
>>> +               {
>>> +                       return logger.getLiveSessions().length;
>>> +               }
>>> +               return null;
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.RequestLoggerMBean#getPeakNumberOfSessions()
>>> +        */
>>> +       @Override
>>> +       public Integer getPeakNumberOfSessions() throws IOException
>>> +       {
>>> +               org.apache.wicket.protocol.http.IRequestLogger logger =
>>> getRequestLogger();
>>> +               if (logger != null)
>>> +               {
>>> +                       return logger.getPeakSessions();
>>> +               }
>>> +               return null;
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.RequestLoggerMBean#getNumberOfCurrentActiveRequests()
>>> +        */
>>> +       @Override
>>> +       public Integer getNumberOfCurrentActiveRequests() throws
>>> IOException
>>> +       {
>>> +               org.apache.wicket.protocol.http.IRequestLogger logger =
>>> getRequestLogger();
>>> +               if (logger != null)
>>> +               {
>>> +                       return
>>> Integer.valueOf(logger.getCurrentActiveRequestCount());
>>> +               }
>>> +               return null;
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.RequestLoggerMBean#getPeakNumberOfActiveRequests()
>>> +        */
>>> +       @Override
>>> +       public Integer getPeakNumberOfActiveRequests() throws IOException
>>> +       {
>>> +               org.apache.wicket.protocol.http.IRequestLogger logger =
>>> getRequestLogger();
>>> +               if (logger != null)
>>> +               {
>>> +                       return
>>> Integer.valueOf(logger.getPeakActiveRequestCount());
>>> +               }
>>> +               return null;
>>> +       }
>>> +
>>> +       /**
>>> +        * @see org.apache.wicket.jmx.RequestLoggerMBean#restart()
>>> +        */
>>> +       @Override
>>> +       public void restart() throws IOException
>>> +       {
>>> +               if (webApplication != null)
>>> +               {
>>> +
>>> webApplication.getRequestLoggerSettings().setRequestLoggerEnabled(false);
>>> +                       webApplication.getRequestLogger();
>>> +
>>> webApplication.getRequestLoggerSettings().setRequestLoggerEnabled(true);
>>> +               }
>>> +       }
>>> +
>>> +       /**
>>> +        * @see org.apache.wicket.jmx.RequestLoggerMBean#stop()
>>> +        */
>>> +       @Override
>>> +       public void stop() throws IOException
>>> +       {
>>> +               if (webApplication != null)
>>> +               {
>>> +
>>> webApplication.getRequestLoggerSettings().setRequestLoggerEnabled(false);
>>> +               }
>>> +       }
>>> +
>>> +       /**
>>> +        * Gets the request logger for this application.
>>> +        *
>>> +        * @return The request logger or null if no request is active, or
>>> if this is not a web
>>> +        *         application
>>> +        */
>>> +       protected org.apache.wicket.protocol.http.IRequestLogger
>>> getRequestLogger()
>>> +       {
>>> +               if (application instanceof WebApplication)
>>> +               {
>>> +                       return application.getRequestLogger();
>>> +               }
>>> +               return null;
>>> +       }
>>> +}
>>>
>>>
>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/ResourceSettings.java
>>> ----------------------------------------------------------------------
>>> diff --git
>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/ResourceSettings.java
>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/ResourceSettings.java
>>> new file mode 100644
>>> index 0000000..b03de01
>>> --- /dev/null
>>> +++
>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/ResourceSettings.java
>>> @@ -0,0 +1,165 @@
>>> +/*
>>> + * Licensed to the Apache Software Foundation (ASF) under one or more
>>> + * contributor license agreements.  See the NOTICE file distributed with
>>> + * this work for additional information regarding copyright ownership.
>>> + * The ASF licenses this file to You under the Apache License, Version
>>> 2.0
>>> + * (the "License"); you may not use this file except in compliance with
>>> + * the License.  You may obtain a copy of the License at
>>> + *
>>> + *      http://www.apache.org/licenses/LICENSE-2.0
>>> + *
>>> + * Unless required by applicable law or agreed to in writing, software
>>> + * distributed under the License is distributed on an "AS IS" BASIS,
>>> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>> implied.
>>> + * See the License for the specific language governing permissions and
>>> + * limitations under the License.
>>> + */
>>> +package org.apache.wicket.jmx.wrapper;
>>> +
>>> +import java.util.List;
>>> +
>>> +import org.apache.wicket.Application;
>>> +import org.apache.wicket.jmx.ResourceSettingsMBean;
>>> +import org.apache.wicket.resource.loader.IStringResourceLoader;
>>> +import org.apache.wicket.util.file.IResourceFinder;
>>> +import org.apache.wicket.util.lang.Generics;
>>> +import org.apache.wicket.util.time.Duration;
>>> +
>>> +
>>> +/**
>>> + * Exposes Application related functionality for JMX.
>>> + *
>>> + * @author eelcohillenius
>>> + */
>>> +public class ResourceSettings implements ResourceSettingsMBean
>>> +{
>>> +       private final Application application;
>>> +
>>> +       /**
>>> +        * Create.
>>> +        *
>>> +        * @param application
>>> +        */
>>> +       public ResourceSettings(final Application application)
>>> +       {
>>> +               this.application = application;
>>> +       }
>>> +
>>> +       /**
>>> +        * {@inheritDoc}
>>> +        */
>>> +       @Override
>>> +       public String getLocalizer()
>>> +       {
>>> +               return
>>> Stringz.className(application.getResourceSettings().getLocalizer());
>>> +       }
>>> +
>>> +       /**
>>> +        * {@inheritDoc}
>>> +        */
>>> +       @Override
>>> +       public String getPackageResourceGuard()
>>> +       {
>>> +               return
>>> Stringz.className(application.getResourceSettings().getPackageResourceGuard());
>>> +       }
>>> +
>>> +       /**
>>> +        * {@inheritDoc}
>>> +        */
>>> +       @Override
>>> +       public String getPropertiesFactory()
>>> +       {
>>> +               return
>>> Stringz.className(application.getResourceSettings().getPropertiesFactory());
>>> +       }
>>> +
>>> +       /**
>>> +        * {@inheritDoc}
>>> +        */
>>> +       @Override
>>> +       public String getResourceFinders()
>>> +       {
>>> +               StringBuilder builder = new StringBuilder();
>>> +               for (IResourceFinder rf :
>>> application.getResourceSettings().getResourceFinders())
>>> +               {
>>> +                       builder.append(Stringz.className(rf));
>>> +               }
>>> +               return builder.toString();
>>> +       }
>>> +
>>> +       /**
>>> +        * {@inheritDoc}
>>> +        */
>>> +       @Override
>>> +       public String getResourcePollFrequency()
>>> +       {
>>> +               Duration duration =
>>> application.getResourceSettings().getResourcePollFrequency();
>>> +               return (duration != null) ? duration.toString() : null;
>>> +       }
>>> +
>>> +       /**
>>> +        * {@inheritDoc}
>>> +        */
>>> +       @Override
>>> +       public String getResourceStreamLocator()
>>> +       {
>>> +               return
>>> Stringz.className(application.getResourceSettings().getResourceStreamLocator());
>>> +       }
>>> +
>>> +       /**
>>> +        * {@inheritDoc}
>>> +        */
>>> +       @Override
>>> +       public String[] getStringResourceLoaders()
>>> +       {
>>> +               List<IStringResourceLoader> loaders =
>>> application.getResourceSettings()
>>> +                       .getStringResourceLoaders();
>>> +               if (loaders != null)
>>> +               {
>>> +                       List<String> list = Generics.newArrayList();
>>> +                       for (Object loader : loaders)
>>> +                       {
>>> +                               list.add(loader.toString());
>>> +                       }
>>> +                       return list.toArray(new String[loaders.size()]);
>>> +               }
>>> +               return null;
>>> +       }
>>> +
>>> +       /**
>>> +        * {@inheritDoc}
>>> +        */
>>> +       @Override
>>> +       public boolean getThrowExceptionOnMissingResource()
>>> +       {
>>> +               return
>>> application.getResourceSettings().getThrowExceptionOnMissingResource();
>>> +       }
>>> +
>>> +       /**
>>> +        * {@inheritDoc}
>>> +        */
>>> +       @Override
>>> +       public boolean getUseDefaultOnMissingResource()
>>> +       {
>>> +               return
>>> application.getResourceSettings().getUseDefaultOnMissingResource();
>>> +       }
>>> +
>>> +       /**
>>> +        * {@inheritDoc}
>>> +        */
>>> +       @Override
>>> +       public void setThrowExceptionOnMissingResource(final boolean
>>> throwExceptionOnMissingResource)
>>> +       {
>>> +
>>> application.getResourceSettings().setThrowExceptionOnMissingResource(
>>> +                       throwExceptionOnMissingResource);
>>> +       }
>>> +
>>> +       /**
>>> +        * {@inheritDoc}
>>> +        */
>>> +       @Override
>>> +       public void setUseDefaultOnMissingResource(final boolean
>>> useDefaultOnMissingResource)
>>> +       {
>>> +
>>> application.getResourceSettings().setUseDefaultOnMissingResource(
>>> +                       useDefaultOnMissingResource);
>>> +       }
>>> +}
>>>
>>>
>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/SecuritySettings.java
>>> ----------------------------------------------------------------------
>>> diff --git
>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/SecuritySettings.java
>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/SecuritySettings.java
>>> new file mode 100644
>>> index 0000000..67a8748
>>> --- /dev/null
>>> +++
>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/SecuritySettings.java
>>> @@ -0,0 +1,68 @@
>>> +/*
>>> + * Licensed to the Apache Software Foundation (ASF) under one or more
>>> + * contributor license agreements.  See the NOTICE file distributed with
>>> + * this work for additional information regarding copyright ownership.
>>> + * The ASF licenses this file to You under the Apache License, Version
>>> 2.0
>>> + * (the "License"); you may not use this file except in compliance with
>>> + * the License.  You may obtain a copy of the License at
>>> + *
>>> + *      http://www.apache.org/licenses/LICENSE-2.0
>>> + *
>>> + * Unless required by applicable law or agreed to in writing, software
>>> + * distributed under the License is distributed on an "AS IS" BASIS,
>>> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>> implied.
>>> + * See the License for the specific language governing permissions and
>>> + * limitations under the License.
>>> + */
>>> +package org.apache.wicket.jmx.wrapper;
>>> +
>>> +import org.apache.wicket.Application;
>>> +import org.apache.wicket.jmx.SecuritySettingsMBean;
>>> +
>>> +/**
>>> + * Exposes Application related functionality for JMX.
>>> + *
>>> + * @author eelcohillenius
>>> + */
>>> +public class SecuritySettings implements SecuritySettingsMBean
>>> +{
>>> +       private final Application application;
>>> +
>>> +       /**
>>> +        * Create.
>>> +        *
>>> +        * @param application
>>> +        */
>>> +       public SecuritySettings(final Application application)
>>> +       {
>>> +               this.application = application;
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.SecuritySettingsMBean#getAuthorizationStrategy()
>>> +        */
>>> +       @Override
>>> +       public String getAuthorizationStrategy()
>>> +       {
>>> +               return
>>> Stringz.className(application.getSecuritySettings().getAuthorizationStrategy());
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.SecuritySettingsMBean#getCryptFactory()
>>> +        */
>>> +       @Override
>>> +       public String getCryptFactory()
>>> +       {
>>> +               return
>>> Stringz.className(application.getSecuritySettings().getCryptFactory());
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.SecuritySettingsMBean#getUnauthorizedComponentInstantiationListener()
>>> +        */
>>> +       @Override
>>> +       public String getUnauthorizedComponentInstantiationListener()
>>> +       {
>>> +               return Stringz.className(application.getSecuritySettings()
>>> +                       .getUnauthorizedComponentInstantiationListener());
>>> +       }
>>> +}
>>>
>>>
>>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/SessionSettings.java
>>> ----------------------------------------------------------------------
>>> diff --git
>>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/SessionSettings.java
>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/SessionSettings.java
>>> new file mode 100644
>>> index 0000000..f235ab6
>>> --- /dev/null
>>> +++
>>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/SessionSettings.java
>>> @@ -0,0 +1,58 @@
>>> +/*
>>> + * Licensed to the Apache Software Foundation (ASF) under one or more
>>> + * contributor license agreements.  See the NOTICE file distributed with
>>> + * this work for additional information regarding copyright ownership.
>>> + * The ASF licenses this file to You under the Apache License, Version
>>> 2.0
>>> + * (the "License"); you may not use this file except in compliance with
>>> + * the License.  You may obtain a copy of the License at
>>> + *
>>> + *      http://www.apache.org/licenses/LICENSE-2.0
>>> + *
>>> + * Unless required by applicable law or agreed to in writing, software
>>> + * distributed under the License is distributed on an "AS IS" BASIS,
>>> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>>> implied.
>>> + * See the License for the specific language governing permissions and
>>> + * limitations under the License.
>>> + */
>>> +package org.apache.wicket.jmx.wrapper;
>>> +
>>> +import org.apache.wicket.Application;
>>> +import org.apache.wicket.jmx.SessionSettingsMBean;
>>> +
>>> +/**
>>> + * Exposes Application related functionality for JMX.
>>> + *
>>> + * @author eelcohillenius
>>> + */
>>> +public class SessionSettings implements SessionSettingsMBean
>>> +{
>>> +       private final Application application;
>>> +
>>> +       /**
>>> +        * Create.
>>> +        *
>>> +        * @param application
>>> +        */
>>> +       public SessionSettings(final Application application)
>>> +       {
>>> +               this.application = application;
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.SessionSettingsMBean#getPageFactory()
>>> +        */
>>> +       @Override
>>> +       public String getPageFactory()
>>> +       {
>>> +               return Stringz.className(application.getPageFactory());
>>> +       }
>>> +
>>> +       /**
>>> +        * @see
>>> org.apache.wicket.jmx.SessionSettingsMBean#getSessionStore()
>>> +        */
>>> +       @Override
>>> +       public String getSessionStore()
>>> +       {
>>> +               return Stringz.className(application.getSessionStore());
>>> +       }
>>> +}
>>>
>>>


Re: [2/3] git commit: use proxies for mbeans, so application is set on thread automatically

Posted by Martin Grigorov <mg...@apache.org>.
OK. Debugging showed where I was in mistake.
The passed 'o' object is actually the XysSettingsMBean wrapper/impl, so it
implements interface XyzSettingsMBean

All is fine.
Sorry for the noise.

Martin Grigorov
Wicket Training and Consulting


On Mon, Mar 24, 2014 at 10:08 AM, Martin Grigorov <mg...@apache.org>wrote:

> Hi Sven,
>
>
> On Fri, Mar 21, 2014 at 5:48 PM, <sv...@apache.org> wrote:
>
>> use proxies for mbeans, so application is set on thread automatically
>>
>> Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
>> Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/fea2b8e4
>> Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/fea2b8e4
>> Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/fea2b8e4
>>
>> Branch: refs/heads/master
>> Commit: fea2b8e4e0feb6a7374bcfe6de2da5d1a2feba20
>> Parents: 329b945
>> Author: svenmeier <sv...@meiers.net>
>> Authored: Fri Mar 21 16:39:29 2014 +0100
>> Committer: svenmeier <sv...@meiers.net>
>> Committed: Fri Mar 21 16:39:29 2014 +0100
>>
>> ----------------------------------------------------------------------
>>  wicket-jmx/pom.xml                              |   8 +
>>  .../java/org/apache/wicket/jmx/Application.java | 113 ------------
>>  .../apache/wicket/jmx/ApplicationSettings.java  | 101 -----------
>>  .../org/apache/wicket/jmx/DebugSettings.java    | 164 ------------------
>>  .../java/org/apache/wicket/jmx/Initializer.java | 111 +++++++++---
>>  .../org/apache/wicket/jmx/MarkupSettings.java   | 128 --------------
>>  .../apache/wicket/jmx/MarkupSettingsMBean.java  |   2 +
>>  .../org/apache/wicket/jmx/PageSettings.java     |  56 ------
>>  .../apache/wicket/jmx/RequestCycleSettings.java | 125 --------------
>>  .../org/apache/wicket/jmx/RequestLogger.java    | 166 ------------------
>>  .../org/apache/wicket/jmx/ResourceSettings.java | 173 -------------------
>>  .../org/apache/wicket/jmx/SecuritySettings.java |  65 -------
>>  .../org/apache/wicket/jmx/SessionSettings.java  |  55 ------
>>  .../org/apache/wicket/jmx/StoreSettings.java    |  68 --------
>>  .../java/org/apache/wicket/jmx/Stringz.java     |  25 ---
>>  .../apache/wicket/jmx/wrapper/Application.java  | 104 +++++++++++
>>  .../wicket/jmx/wrapper/ApplicationSettings.java | 103 +++++++++++
>>  .../wicket/jmx/wrapper/DebugSettings.java       | 167 ++++++++++++++++++
>>  .../wicket/jmx/wrapper/MarkupSettings.java      | 131 ++++++++++++++
>>  .../apache/wicket/jmx/wrapper/PageSettings.java |  59 +++++++
>>  .../jmx/wrapper/RequestCycleSettings.java       | 127 ++++++++++++++
>>  .../wicket/jmx/wrapper/RequestLogger.java       | 168 ++++++++++++++++++
>>  .../wicket/jmx/wrapper/ResourceSettings.java    | 165 ++++++++++++++++++
>>  .../wicket/jmx/wrapper/SecuritySettings.java    |  68 ++++++++
>>  .../wicket/jmx/wrapper/SessionSettings.java     |  58 +++++++
>>  .../wicket/jmx/wrapper/StoreSettings.java       |  69 ++++++++
>>  .../org/apache/wicket/jmx/wrapper/Stringz.java  |  25 +++
>>  27 files changed, 1340 insertions(+), 1264 deletions(-)
>> ----------------------------------------------------------------------
>>
>>
>>
>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/pom.xml
>> ----------------------------------------------------------------------
>> diff --git a/wicket-jmx/pom.xml b/wicket-jmx/pom.xml
>> index 9bc5a08..c58cb06 100644
>> --- a/wicket-jmx/pom.xml
>> +++ b/wicket-jmx/pom.xml
>> @@ -32,6 +32,14 @@
>>                         <groupId>org.apache.wicket</groupId>
>>                         <artifactId>wicket-core</artifactId>
>>                 </dependency>
>> +               <dependency>
>> +                       <groupId>cglib</groupId>
>> +                       <artifactId>cglib</artifactId>
>> +               </dependency>
>> +<!--   <dependency>
>> +                       <groupId>org.ow2.asm</groupId>
>> +                       <artifactId>asm-util</artifactId>
>> +               </dependency> -->
>>         </dependencies>
>>         <build>
>>                 <pluginManagement>
>>
>>
>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/Application.java
>> ----------------------------------------------------------------------
>> diff --git
>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/Application.java
>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/Application.java
>> deleted file mode 100644
>> index 5eaa003..0000000
>> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/Application.java
>> +++ /dev/null
>> @@ -1,113 +0,0 @@
>> -/*
>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>> - * contributor license agreements.  See the NOTICE file distributed with
>> - * this work for additional information regarding copyright ownership.
>> - * The ASF licenses this file to You under the Apache License, Version
>> 2.0
>> - * (the "License"); you may not use this file except in compliance with
>> - * the License.  You may obtain a copy of the License at
>> - *
>> - *      http://www.apache.org/licenses/LICENSE-2.0
>> - *
>> - * Unless required by applicable law or agreed to in writing, software
>> - * distributed under the License is distributed on an "AS IS" BASIS,
>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>> implied.
>> - * See the License for the specific language governing permissions and
>> - * limitations under the License.
>> - */
>> -package org.apache.wicket.jmx;
>> -
>> -import java.io.IOException;
>> -
>> -import org.apache.wicket.ThreadContext;
>> -
>> -/**
>> - * Exposes Application related functionality for JMX.
>> - *
>> - * @author eelcohillenius
>> - */
>> -public class Application implements ApplicationMBean
>> -{
>> -       private final org.apache.wicket.Application application;
>> -
>> -       /**
>> -        * Create.
>> -        *
>> -        * @param application
>> -        */
>> -       public Application(final org.apache.wicket.Application
>> application)
>> -       {
>> -               this.application = application;
>> -       }
>> -
>> -       /**
>> -        * @see org.apache.wicket.jmx.ApplicationMBean#clearMarkupCache()
>> -        */
>> -       @Override
>> -       public void clearMarkupCache() throws IOException
>> -       {
>> -
>> application.getMarkupSettings().getMarkupFactory().getMarkupCache().clear();
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.ApplicationMBean#getApplicationClass()
>> -        */
>> -       @Override
>> -       public String getApplicationClass() throws IOException
>> -       {
>> -               return application.getClass().getName();
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.ApplicationMBean#getConfigurationType()
>> -        */
>> -       @Override
>> -       public String getConfigurationType()
>> -       {
>> -               return application.getConfigurationType().name();
>> -       }
>> -
>> -       /**
>> -        * @see org.apache.wicket.jmx.ApplicationMBean#getHomePageClass()
>> -        */
>> -       @Override
>> -       public String getHomePageClass() throws IOException
>> -       {
>> -               return application.getHomePage().getName();
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.ApplicationMBean#getMarkupCacheSize()
>> -        */
>> -       @Override
>> -       public int getMarkupCacheSize() throws IOException
>> -       {
>> -               ThreadContext.setApplication(application);
>> -
>> -               try
>> -               {
>> -                       return
>> application.getMarkupSettings().getMarkupFactory().getMarkupCache().size();
>> -               }
>> -               finally
>> -               {
>> -                       ThreadContext.detach();
>> -               }
>> -       }
>> -
>> -       /**
>> -        * @see org.apache.wicket.jmx.ApplicationMBean#getWicketVersion()
>> -        */
>> -       @Override
>> -       public String getWicketVersion() throws IOException
>> -       {
>> -               return application.getFrameworkSettings().getVersion();
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.ApplicationMBean#clearLocalizerCache()
>> -        */
>> -       @Override
>> -       public void clearLocalizerCache() throws IOException
>> -       {
>> -
>> application.getResourceSettings().getLocalizer().clearCache();
>> -       }
>> -}
>>
>>
>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/ApplicationSettings.java
>> ----------------------------------------------------------------------
>> diff --git
>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/ApplicationSettings.java
>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/ApplicationSettings.java
>> deleted file mode 100644
>> index 52c8e0b..0000000
>> ---
>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/ApplicationSettings.java
>> +++ /dev/null
>> @@ -1,101 +0,0 @@
>> -/*
>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>> - * contributor license agreements.  See the NOTICE file distributed with
>> - * this work for additional information regarding copyright ownership.
>> - * The ASF licenses this file to You under the Apache License, Version
>> 2.0
>> - * (the "License"); you may not use this file except in compliance with
>> - * the License.  You may obtain a copy of the License at
>> - *
>> - *      http://www.apache.org/licenses/LICENSE-2.0
>> - *
>> - * Unless required by applicable law or agreed to in writing, software
>> - * distributed under the License is distributed on an "AS IS" BASIS,
>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>> implied.
>> - * See the License for the specific language governing permissions and
>> - * limitations under the License.
>> - */
>> -package org.apache.wicket.jmx;
>> -
>> -import org.apache.wicket.util.lang.Bytes;
>> -import org.apache.wicket.util.lang.Classes;
>> -
>> -/**
>> - * Exposes Application related functionality for JMX.
>> - *
>> - * @author eelcohillenius
>> - */
>> -public class ApplicationSettings implements ApplicationSettingsMBean
>> -{
>> -       private final org.apache.wicket.Application application;
>> -
>> -       /**
>> -        * Create.
>> -        *
>> -        * @param application
>> -        */
>> -       public ApplicationSettings(final org.apache.wicket.Application
>> application)
>> -       {
>> -               this.application = application;
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.ApplicationSettingsMBean#getAccessDeniedPage()
>> -        */
>> -       @Override
>> -       public String getAccessDeniedPage()
>> -       {
>> -               return
>> Classes.name(application.getApplicationSettings().getAccessDeniedPage());
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.ApplicationSettingsMBean#getClassResolver()
>> -        */
>> -       @Override
>> -       public String getClassResolver()
>> -       {
>> -               return
>> Stringz.className(application.getApplicationSettings().getClassResolver());
>> -       }
>> -
>> -       @Override
>> -       public String getDefaultMaximumUploadSize()
>> -       {
>> -               return
>> application.getApplicationSettings().getDefaultMaximumUploadSize().toString();
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.ApplicationSettingsMBean#getInternalErrorPage()
>> -        */
>> -       @Override
>> -       public String getInternalErrorPage()
>> -       {
>> -               return
>> Classes.name(application.getApplicationSettings().getInternalErrorPage());
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.ApplicationSettingsMBean#getPageExpiredErrorPage()
>> -        */
>> -       @Override
>> -       public String getPageExpiredErrorPage()
>> -       {
>> -               return
>> Classes.name(application.getApplicationSettings().getPageExpiredErrorPage());
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.ApplicationSettingsMBean#getUnexpectedExceptionDisplay()
>> -        */
>> -       @Override
>> -       public String getUnexpectedExceptionDisplay()
>> -       {
>> -               return
>> application.getExceptionSettings().getUnexpectedExceptionDisplay().toString();
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.ApplicationSettingsMBean#setDefaultMaximumUploadSize(java.lang.String)
>> -        */
>> -       @Override
>> -       public void setDefaultMaximumUploadSize(final String
>> defaultUploadSize)
>> -       {
>> -
>> application.getApplicationSettings().setDefaultMaximumUploadSize(
>> -                       Bytes.valueOf(defaultUploadSize));
>> -       }
>> -}
>>
>>
>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/DebugSettings.java
>> ----------------------------------------------------------------------
>> diff --git
>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/DebugSettings.java
>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/DebugSettings.java
>> deleted file mode 100644
>> index 0055dcf..0000000
>> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/DebugSettings.java
>> +++ /dev/null
>> @@ -1,164 +0,0 @@
>> -/*
>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>> - * contributor license agreements.  See the NOTICE file distributed with
>> - * this work for additional information regarding copyright ownership.
>> - * The ASF licenses this file to You under the Apache License, Version
>> 2.0
>> - * (the "License"); you may not use this file except in compliance with
>> - * the License.  You may obtain a copy of the License at
>> - *
>> - *      http://www.apache.org/licenses/LICENSE-2.0
>> - *
>> - * Unless required by applicable law or agreed to in writing, software
>> - * distributed under the License is distributed on an "AS IS" BASIS,
>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>> implied.
>> - * See the License for the specific language governing permissions and
>> - * limitations under the License.
>> - */
>> -package org.apache.wicket.jmx;
>> -
>> -/**
>> - * Exposes Application related functionality for JMX.
>> - *
>> - * @author eelcohillenius
>> - */
>> -public class DebugSettings implements DebugSettingsMBean
>> -{
>> -       private final org.apache.wicket.Application application;
>> -
>> -       /**
>> -        * Create.
>> -        *
>> -        * @param application
>> -        */
>> -       public DebugSettings(final org.apache.wicket.Application
>> application)
>> -       {
>> -               this.application = application;
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.DebugSettingsMBean#getComponentUseCheck()
>> -        */
>> -       @Override
>> -       public boolean getComponentUseCheck()
>> -       {
>> -               return
>> application.getDebugSettings().getComponentUseCheck();
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.DebugSettingsMBean#isAjaxDebugModeEnabled()
>> -        */
>> -       @Override
>> -       public boolean isAjaxDebugModeEnabled()
>> -       {
>> -               return
>> application.getDebugSettings().isAjaxDebugModeEnabled();
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.DebugSettingsMBean#setAjaxDebugModeEnabled(boolean)
>> -        */
>> -       @Override
>> -       public void setAjaxDebugModeEnabled(final boolean enable)
>> -       {
>> -
>> application.getDebugSettings().setAjaxDebugModeEnabled(enable);
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.DebugSettingsMBean#setComponentUseCheck(boolean)
>> -        */
>> -       @Override
>> -       public void setComponentUseCheck(final boolean check)
>> -       {
>> -
>> application.getDebugSettings().setComponentUseCheck(check);
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.DebugSettingsMBean#setOutputComponentPath(boolean)
>> -        */
>> -       @Override
>> -       public void setOutputComponentPath(final boolean enabled)
>> -       {
>> -
>> application.getDebugSettings().setOutputComponentPath(enabled);
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.DebugSettingsMBean#isOutputComponentPath()
>> -        */
>> -       @Override
>> -       public boolean isOutputComponentPath()
>> -       {
>> -               return
>> application.getDebugSettings().isOutputComponentPath();
>> -       }
>> -
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.DebugSettingsMBean#setOutputMarkupContainerClassName(boolean)
>> -        */
>> -       @Override
>> -       public void setOutputMarkupContainerClassName(final boolean
>> enable)
>> -       {
>> -
>> application.getDebugSettings().setOutputMarkupContainerClassName(enable);
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.DebugSettingsMBean#isOutputMarkupContainerClassName()
>> -        */
>> -       @Override
>> -       public boolean isOutputMarkupContainerClassName()
>> -       {
>> -               return
>> application.getDebugSettings().isOutputMarkupContainerClassName();
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.DebugSettingsMBean#isLinePreciseReportingOnAddComponentEnabled()
>> -        */
>> -       @Override
>> -       public boolean isLinePreciseReportingOnAddComponentEnabled()
>> -       {
>> -               return
>> application.getDebugSettings().isLinePreciseReportingOnAddComponentEnabled();
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.DebugSettingsMBean#setLinePreciseReportingOnAddComponentEnabled(boolean)
>> -        */
>> -       @Override
>> -       public void setLinePreciseReportingOnAddComponentEnabled(final
>> boolean enable)
>> -       {
>> -
>> application.getDebugSettings().setLinePreciseReportingOnAddComponentEnabled(enable);
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.DebugSettingsMBean#isLinePreciseReportingOnNewComponentEnabled()
>> -        */
>> -       @Override
>> -       public boolean isLinePreciseReportingOnNewComponentEnabled()
>> -       {
>> -               return
>> application.getDebugSettings().isLinePreciseReportingOnNewComponentEnabled();
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.DebugSettingsMBean#setLinePreciseReportingOnNewComponentEnabled(boolean)
>> -        */
>> -       @Override
>> -       public void setLinePreciseReportingOnNewComponentEnabled(final
>> boolean enable)
>> -       {
>> -
>> application.getDebugSettings().setLinePreciseReportingOnNewComponentEnabled(enable);
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.DebugSettingsMBean#setDevelopmentUtilitiesEnabled(boolean)
>> -        */
>> -       @Override
>> -       public void setDevelopmentUtilitiesEnabled(final boolean enable)
>> -       {
>> -
>> application.getDebugSettings().setDevelopmentUtilitiesEnabled(enable);
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.DebugSettingsMBean#isDevelopmentUtilitiesEnabled()
>> -        */
>> -       @Override
>> -       public boolean isDevelopmentUtilitiesEnabled()
>> -       {
>> -               return
>> application.getDebugSettings().isDevelopmentUtilitiesEnabled();
>> -       }
>> -}
>>
>>
>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/Initializer.java
>> ----------------------------------------------------------------------
>> diff --git
>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/Initializer.java
>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/Initializer.java
>> index 77aaa2d..27f4c33 100644
>> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/Initializer.java
>> +++ b/wicket-jmx/src/main/java/org/apache/wicket/jmx/Initializer.java
>> @@ -17,6 +17,7 @@
>>  package org.apache.wicket.jmx;
>>
>>  import java.lang.management.ManagementFactory;
>> +import java.lang.reflect.Method;
>>  import java.util.ArrayList;
>>  import java.util.List;
>>
>> @@ -29,8 +30,24 @@ import javax.management.MalformedObjectNameException;
>>  import javax.management.NotCompliantMBeanException;
>>  import javax.management.ObjectName;
>>
>> +import net.sf.cglib.core.DefaultNamingPolicy;
>> +import net.sf.cglib.core.Predicate;
>> +import net.sf.cglib.proxy.Enhancer;
>> +
>>  import org.apache.wicket.IInitializer;
>> +import org.apache.wicket.ThreadContext;
>>  import org.apache.wicket.WicketRuntimeException;
>> +import org.apache.wicket.jmx.wrapper.Application;
>> +import org.apache.wicket.jmx.wrapper.ApplicationSettings;
>> +import org.apache.wicket.jmx.wrapper.DebugSettings;
>> +import org.apache.wicket.jmx.wrapper.MarkupSettings;
>> +import org.apache.wicket.jmx.wrapper.PageSettings;
>> +import org.apache.wicket.jmx.wrapper.RequestCycleSettings;
>> +import org.apache.wicket.jmx.wrapper.RequestLogger;
>> +import org.apache.wicket.jmx.wrapper.ResourceSettings;
>> +import org.apache.wicket.jmx.wrapper.SecuritySettings;
>> +import org.apache.wicket.jmx.wrapper.SessionSettings;
>> +import org.apache.wicket.jmx.wrapper.StoreSettings;
>>  import org.slf4j.Logger;
>>  import org.slf4j.LoggerFactory;
>>
>> @@ -172,30 +189,30 @@ public class Initializer implements IInitializer
>>                         domain = tempDomain;
>>
>>                         Application appBean = new
>> Application(application);
>> -                       register(appBean, appBeanName);
>> -
>> -                       register(new ApplicationSettings(application),
>> new ObjectName(domain +
>> -
>> ":type=Application,name=ApplicationSettings"));
>> -                       register(new DebugSettings(application), new
>> ObjectName(domain +
>> -                               ":type=Application,name=DebugSettings"));
>> -                       register(new MarkupSettings(application), new
>> ObjectName(domain +
>> -                               ":type=Application,name=MarkupSettings"));
>> -                       register(new ResourceSettings(application), new
>> ObjectName(domain +
>> -
>> ":type=Application,name=ResourceSettings"));
>> -                       register(new PageSettings(application), new
>> ObjectName(domain +
>> -                               ":type=Application,name=PageSettings"));
>> -                       register(new RequestCycleSettings(application),
>> new ObjectName(domain +
>> -
>> ":type=Application,name=RequestCycleSettings"));
>> -                       register(new SecuritySettings(application), new
>> ObjectName(domain +
>> -
>> ":type=Application,name=SecuritySettings"));
>> -                       register(new SessionSettings(application), new
>> ObjectName(domain +
>> -
>> ":type=Application,name=SessionSettings"));
>> -                       register(new StoreSettings(application), new
>> ObjectName(domain +
>> -                               ":type=Application,name=StoreSettings"));
>> +                       register(application, appBean, appBeanName);
>> +
>> +                       register(application, new
>> ApplicationSettings(application), new ObjectName(domain
>> +                               +
>> ":type=Application,name=ApplicationSettings"));
>> +                       register(application, new
>> DebugSettings(application), new ObjectName(domain
>> +                               +
>> ":type=Application,name=DebugSettings"));
>> +                       register(application, new
>> MarkupSettings(application), new ObjectName(domain
>> +                               +
>> ":type=Application,name=MarkupSettings"));
>> +                       register(application, new
>> ResourceSettings(application), new ObjectName(domain
>> +                               +
>> ":type=Application,name=ResourceSettings"));
>> +                       register(application, new
>> PageSettings(application), new ObjectName(domain
>> +                               + ":type=Application,name=PageSettings"));
>> +                       register(application, new
>> RequestCycleSettings(application), new ObjectName(domain
>> +                               +
>> ":type=Application,name=RequestCycleSettings"));
>> +                       register(application, new
>> SecuritySettings(application), new ObjectName(domain
>> +                               +
>> ":type=Application,name=SecuritySettings"));
>> +                       register(application, new
>> SessionSettings(application), new ObjectName(domain
>> +                               +
>> ":type=Application,name=SessionSettings"));
>> +                       register(application, new
>> StoreSettings(application), new ObjectName(domain
>> +                               +
>> ":type=Application,name=StoreSettings"));
>>
>>                         RequestLogger sessionsBean = new
>> RequestLogger(application);
>>                         ObjectName sessionsBeanName = new
>> ObjectName(domain + ":type=RequestLogger");
>> -                       register(sessionsBean, sessionsBeanName);
>> +                       register(application, sessionsBean,
>> sessionsBeanName);
>>                 }
>>                 catch (MalformedObjectNameException e)
>>                 {
>> @@ -236,11 +253,55 @@ public class Initializer implements IInitializer
>>          * @throws MBeanRegistrationException
>>          * @throws InstanceAlreadyExistsException
>>          */
>> -       private void register(final Object o, final ObjectName objectName)
>> -               throws InstanceAlreadyExistsException,
>> MBeanRegistrationException,
>> -               NotCompliantMBeanException
>> +       private void register(final org.apache.wicket.Application
>> application, final Object o,
>> +               final ObjectName objectName) throws
>> InstanceAlreadyExistsException,
>> +               MBeanRegistrationException, NotCompliantMBeanException
>>         {
>> -               mbeanServer.registerMBean(o, objectName);
>> +               Object proxy = createProxy(application, o);
>> +               mbeanServer.registerMBean(proxy, objectName);
>>                 registered.add(objectName);
>>         }
>> +
>> +       private Object createProxy(final org.apache.wicket.Application
>> application, final Object o)
>> +       {
>> +               Enhancer e = new Enhancer();
>> +               e.setInterfaces(o.getClass().getInterfaces());
>> +               e.setSuperclass(Object.class);
>>
>
> I'm sure you have tested it but the lines above look a bit weird.
> In Wicket 7.x all XyzSettings classes are Java classes and just few of
> them implement some interfaces.
> I have to test it but I think the JMX runtime won't be able to list the
> setters and getters of the MBean because the proxy has no knowledge of its
> delegate.
> The fix I have in mind is:  e.setSuperclass(o.getClass());
>
>
>> +               e.setCallback(new net.sf.cglib.proxy.InvocationHandler()
>> +               {
>> +                       @Override
>> +                       public Object invoke(Object proxy, Method method,
>> Object[] args) throws Throwable
>> +                       {
>> +                               boolean existed = ThreadContext.exists();
>> +
>> +                               if (existed == false)
>> +                               {
>> +
>> ThreadContext.setApplication(application);
>> +                               }
>> +
>> +                               try
>> +                               {
>> +                                       return method.invoke(o, args);
>> +                               }
>> +                               finally
>> +                               {
>> +                                       if (existed == false)
>> +                                       {
>> +                                               ThreadContext.detach();
>> +                                       }
>> +                               }
>> +                       }
>> +               });
>> +               e.setNamingPolicy(new DefaultNamingPolicy()
>> +               {
>> +                       @Override
>> +                       public String getClassName(final String prefix,
>> final String source, final Object key,
>> +                               final Predicate names)
>> +                       {
>> +                               return
>> o.getClass().getName().replace(".wrapper", "");
>> +                       }
>> +               });
>> +
>> +               return e.create();
>> +       }
>>  }
>>
>>
>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettings.java
>> ----------------------------------------------------------------------
>> diff --git
>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettings.java
>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettings.java
>> deleted file mode 100644
>> index efa6048..0000000
>> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettings.java
>> +++ /dev/null
>> @@ -1,128 +0,0 @@
>> -/*
>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>> - * contributor license agreements.  See the NOTICE file distributed with
>> - * this work for additional information regarding copyright ownership.
>> - * The ASF licenses this file to You under the Apache License, Version
>> 2.0
>> - * (the "License"); you may not use this file except in compliance with
>> - * the License.  You may obtain a copy of the License at
>> - *
>> - *      http://www.apache.org/licenses/LICENSE-2.0
>> - *
>> - * Unless required by applicable law or agreed to in writing, software
>> - * distributed under the License is distributed on an "AS IS" BASIS,
>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>> implied.
>> - * See the License for the specific language governing permissions and
>> - * limitations under the License.
>> - */
>> -package org.apache.wicket.jmx;
>> -
>> -
>> -/**
>> - * Exposes Application related functionality for JMX.
>> - *
>> - * @author eelcohillenius
>> - */
>> -public class MarkupSettings implements MarkupSettingsMBean
>> -{
>> -       private final org.apache.wicket.Application application;
>> -
>> -       /**
>> -        * Create.
>> -        *
>> -        * @param application
>> -        */
>> -       public MarkupSettings(final org.apache.wicket.Application
>> application)
>> -       {
>> -               this.application = application;
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.MarkupSettingsMBean#getAutomaticLinking()
>> -        */
>> -       @Override
>> -       public boolean getAutomaticLinking()
>> -       {
>> -               return
>> application.getMarkupSettings().getAutomaticLinking();
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.MarkupSettingsMBean#getCompressWhitespace()
>> -        */
>> -       @Override
>> -       public boolean getCompressWhitespace()
>> -       {
>> -               return
>> application.getMarkupSettings().getCompressWhitespace();
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.MarkupSettingsMBean#getDefaultMarkupEncoding()
>> -        */
>> -       @Override
>> -       public String getDefaultMarkupEncoding()
>> -       {
>> -               return
>> application.getMarkupSettings().getDefaultMarkupEncoding();
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.MarkupSettingsMBean#getStripComments()
>> -        */
>> -       @Override
>> -       public boolean getStripComments()
>> -       {
>> -               return application.getMarkupSettings().getStripComments();
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.MarkupSettingsMBean#getStripWicketTags()
>> -        */
>> -       @Override
>> -       public boolean getStripWicketTags()
>> -       {
>> -               return
>> application.getMarkupSettings().getStripWicketTags();
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.MarkupSettingsMBean#setAutomaticLinking(boolean)
>> -        */
>> -       @Override
>> -       public void setAutomaticLinking(final boolean automaticLinking)
>> -       {
>> -
>> application.getMarkupSettings().setAutomaticLinking(automaticLinking);
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.MarkupSettingsMBean#setCompressWhitespace(boolean)
>> -        */
>> -       @Override
>> -       public void setCompressWhitespace(final boolean
>> compressWhitespace)
>> -       {
>> -
>> application.getMarkupSettings().setCompressWhitespace(compressWhitespace);
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.MarkupSettingsMBean#setDefaultMarkupEncoding(java.lang.String)
>> -        */
>> -       @Override
>> -       public void setDefaultMarkupEncoding(final String encoding)
>> -       {
>> -
>> application.getMarkupSettings().setDefaultMarkupEncoding(encoding);
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.MarkupSettingsMBean#setStripComments(boolean)
>> -        */
>> -       @Override
>> -       public void setStripComments(final boolean stripComments)
>> -       {
>> -
>> application.getMarkupSettings().setStripComments(stripComments);
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.MarkupSettingsMBean#setStripWicketTags(boolean)
>> -        */
>> -       @Override
>> -       public void setStripWicketTags(final boolean stripWicketTags)
>> -       {
>> -
>> application.getMarkupSettings().setStripWicketTags(stripWicketTags);
>> -       }
>> -}
>>
>>
>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettingsMBean.java
>> ----------------------------------------------------------------------
>> diff --git
>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettingsMBean.java
>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettingsMBean.java
>> index 91f2b23..df0d25d 100644
>> ---
>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettingsMBean.java
>> +++
>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettingsMBean.java
>> @@ -16,6 +16,8 @@
>>   */
>>  package org.apache.wicket.jmx;
>>
>> +import org.apache.wicket.jmx.wrapper.MarkupSettings;
>> +
>>  /**
>>   * Markup settings.
>>   *
>>
>>
>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/PageSettings.java
>> ----------------------------------------------------------------------
>> diff --git
>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/PageSettings.java
>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/PageSettings.java
>> deleted file mode 100644
>> index b91b1e7..0000000
>> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/PageSettings.java
>> +++ /dev/null
>> @@ -1,56 +0,0 @@
>> -/*
>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>> - * contributor license agreements.  See the NOTICE file distributed with
>> - * this work for additional information regarding copyright ownership.
>> - * The ASF licenses this file to You under the Apache License, Version
>> 2.0
>> - * (the "License"); you may not use this file except in compliance with
>> - * the License.  You may obtain a copy of the License at
>> - *
>> - *      http://www.apache.org/licenses/LICENSE-2.0
>> - *
>> - * Unless required by applicable law or agreed to in writing, software
>> - * distributed under the License is distributed on an "AS IS" BASIS,
>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>> implied.
>> - * See the License for the specific language governing permissions and
>> - * limitations under the License.
>> - */
>> -package org.apache.wicket.jmx;
>> -
>> -
>> -/**
>> - * Exposes Application related functionality for JMX.
>> - *
>> - * @author eelcohillenius
>> - */
>> -public class PageSettings implements PageSettingsMBean
>> -{
>> -       private final org.apache.wicket.Application application;
>> -
>> -       /**
>> -        * Create.
>> -        *
>> -        * @param application
>> -        */
>> -       public PageSettings(final org.apache.wicket.Application
>> application)
>> -       {
>> -               this.application = application;
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.PageSettingsMBean#getVersionPagesByDefault()
>> -        */
>> -       @Override
>> -       public boolean getVersionPagesByDefault()
>> -       {
>> -               return
>> application.getPageSettings().getVersionPagesByDefault();
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.PageSettingsMBean#setVersionPagesByDefault(boolean)
>> -        */
>> -       @Override
>> -       public void setVersionPagesByDefault(final boolean
>> pagesVersionedByDefault)
>> -       {
>> -
>> application.getPageSettings().setVersionPagesByDefault(pagesVersionedByDefault);
>> -       }
>> -}
>>
>>
>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestCycleSettings.java
>> ----------------------------------------------------------------------
>> diff --git
>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestCycleSettings.java
>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestCycleSettings.java
>> deleted file mode 100644
>> index 8815ee0..0000000
>> ---
>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestCycleSettings.java
>> +++ /dev/null
>> @@ -1,125 +0,0 @@
>> -/*
>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>> - * contributor license agreements.  See the NOTICE file distributed with
>> - * this work for additional information regarding copyright ownership.
>> - * The ASF licenses this file to You under the Apache License, Version
>> 2.0
>> - * (the "License"); you may not use this file except in compliance with
>> - * the License.  You may obtain a copy of the License at
>> - *
>> - *      http://www.apache.org/licenses/LICENSE-2.0
>> - *
>> - * Unless required by applicable law or agreed to in writing, software
>> - * distributed under the License is distributed on an "AS IS" BASIS,
>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>> implied.
>> - * See the License for the specific language governing permissions and
>> - * limitations under the License.
>> - */
>> -package org.apache.wicket.jmx;
>> -
>> -import org.apache.wicket.util.time.Duration;
>> -
>> -
>> -/**
>> - * Exposes Application related functionality for JMX.
>> - *
>> - * @author eelcohillenius
>> - */
>> -public class RequestCycleSettings implements RequestCycleSettingsMBean
>> -{
>> -       private final org.apache.wicket.Application application;
>> -
>> -       /**
>> -        * Create.
>> -        *
>> -        * @param application
>> -        */
>> -       public RequestCycleSettings(final org.apache.wicket.Application
>> application)
>> -       {
>> -               this.application = application;
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.RequestCycleSettingsMBean#getBufferResponse()
>> -        */
>> -       @Override
>> -       public boolean getBufferResponse()
>> -       {
>> -               return
>> application.getRequestCycleSettings().getBufferResponse();
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.RequestCycleSettingsMBean#getGatherExtendedBrowserInfo()
>> -        */
>> -       @Override
>> -       public boolean getGatherExtendedBrowserInfo()
>> -       {
>> -               return
>> application.getRequestCycleSettings().getGatherExtendedBrowserInfo();
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.RequestCycleSettingsMBean#getResponseRequestEncoding()
>> -        */
>> -       @Override
>> -       public String getResponseRequestEncoding()
>> -       {
>> -               return
>> application.getRequestCycleSettings().getResponseRequestEncoding();
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.RequestCycleSettingsMBean#getTimeout()
>> -        */
>> -       @Override
>> -       public String getTimeout()
>> -       {
>> -               return
>> application.getRequestCycleSettings().getTimeout().toString();
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.RequestCycleSettingsMBean#setBufferResponse(boolean)
>> -        */
>> -       @Override
>> -       public void setBufferResponse(final boolean bufferResponse)
>> -       {
>> -
>> application.getRequestCycleSettings().setBufferResponse(bufferResponse);
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.RequestCycleSettingsMBean#setGatherExtendedBrowserInfo(boolean)
>> -        */
>> -       @Override
>> -       public void setGatherExtendedBrowserInfo(final boolean
>> gatherExtendedBrowserInfo)
>> -       {
>> -
>> application.getRequestCycleSettings().setGatherExtendedBrowserInfo(
>> -                       gatherExtendedBrowserInfo);
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.RequestCycleSettingsMBean#setResponseRequestEncoding(java.lang.String)
>> -        */
>> -       @Override
>> -       public void setResponseRequestEncoding(final String
>> responseRequestEncoding)
>> -       {
>> -
>> application.getRequestCycleSettings().setResponseRequestEncoding(responseRequestEncoding);
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.RequestCycleSettingsMBean#setTimeout(java.lang.String)
>> -        */
>> -       @Override
>> -       public void setTimeout(final String timeout)
>> -       {
>> -
>> application.getRequestCycleSettings().setTimeout(Duration.valueOf(timeout));
>> -       }
>> -
>> -       @Override
>> -       public void setExceptionRetryCount(int retries)
>> -       {
>> -
>> application.getRequestCycleSettings().setExceptionRetryCount(retries);
>> -       }
>> -
>> -       @Override
>> -       public int getExceptionRetryCount()
>> -       {
>> -               return
>> application.getRequestCycleSettings().getExceptionRetryCount();
>> -       }
>> -}
>>
>>
>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestLogger.java
>> ----------------------------------------------------------------------
>> diff --git
>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestLogger.java
>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestLogger.java
>> deleted file mode 100644
>> index 28ec4cf..0000000
>> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestLogger.java
>> +++ /dev/null
>> @@ -1,166 +0,0 @@
>> -/*
>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>> - * contributor license agreements.  See the NOTICE file distributed with
>> - * this work for additional information regarding copyright ownership.
>> - * The ASF licenses this file to You under the Apache License, Version
>> 2.0
>> - * (the "License"); you may not use this file except in compliance with
>> - * the License.  You may obtain a copy of the License at
>> - *
>> - *      http://www.apache.org/licenses/LICENSE-2.0
>> - *
>> - * Unless required by applicable law or agreed to in writing, software
>> - * distributed under the License is distributed on an "AS IS" BASIS,
>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>> implied.
>> - * See the License for the specific language governing permissions and
>> - * limitations under the License.
>> - */
>> -package org.apache.wicket.jmx;
>> -
>> -import java.io.IOException;
>> -
>> -import org.apache.wicket.protocol.http.WebApplication;
>> -
>> -
>> -/**
>> - * Exposes {@link org.apache.wicket.protocol.http.RequestLogger} for JMX.
>> - *
>> - * @author eelcohillenius
>> - */
>> -public class RequestLogger implements RequestLoggerMBean
>> -{
>> -       private final org.apache.wicket.Application application;
>> -
>> -       private final WebApplication webApplication;
>> -
>> -       /**
>> -        * Construct.
>> -        *
>> -        * @param application
>> -        *            The application
>> -        */
>> -       public RequestLogger(final org.apache.wicket.Application
>> application)
>> -       {
>> -               this.application = application;
>> -
>> -               // do this so that we don't have to cast all the time
>> -               if (application instanceof WebApplication)
>> -               {
>> -                       webApplication = (WebApplication)application;
>> -               }
>> -               else
>> -               {
>> -                       webApplication = null;
>> -               }
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.RequestLoggerMBean#getNumberOfCreatedSessions()
>> -        */
>> -       @Override
>> -       public Integer getNumberOfCreatedSessions() throws IOException
>> -       {
>> -               org.apache.wicket.protocol.http.IRequestLogger logger =
>> getRequestLogger();
>> -               if (logger != null)
>> -               {
>> -                       return logger.getTotalCreatedSessions();
>> -               }
>> -               return null;
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.RequestLoggerMBean#getNumberOfLiveSessions()
>> -        */
>> -       @Override
>> -       public Integer getNumberOfLiveSessions() throws IOException
>> -       {
>> -               org.apache.wicket.protocol.http.IRequestLogger logger =
>> getRequestLogger();
>> -               if (logger != null)
>> -               {
>> -                       return logger.getLiveSessions().length;
>> -               }
>> -               return null;
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.RequestLoggerMBean#getPeakNumberOfSessions()
>> -        */
>> -       @Override
>> -       public Integer getPeakNumberOfSessions() throws IOException
>> -       {
>> -               org.apache.wicket.protocol.http.IRequestLogger logger =
>> getRequestLogger();
>> -               if (logger != null)
>> -               {
>> -                       return logger.getPeakSessions();
>> -               }
>> -               return null;
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.RequestLoggerMBean#getNumberOfCurrentActiveRequests()
>> -        */
>> -       @Override
>> -       public Integer getNumberOfCurrentActiveRequests() throws
>> IOException
>> -       {
>> -               org.apache.wicket.protocol.http.IRequestLogger logger =
>> getRequestLogger();
>> -               if (logger != null)
>> -               {
>> -                       return
>> Integer.valueOf(logger.getCurrentActiveRequestCount());
>> -               }
>> -               return null;
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.RequestLoggerMBean#getPeakNumberOfActiveRequests()
>> -        */
>> -       @Override
>> -       public Integer getPeakNumberOfActiveRequests() throws IOException
>> -       {
>> -               org.apache.wicket.protocol.http.IRequestLogger logger =
>> getRequestLogger();
>> -               if (logger != null)
>> -               {
>> -                       return
>> Integer.valueOf(logger.getPeakActiveRequestCount());
>> -               }
>> -               return null;
>> -       }
>> -
>> -       /**
>> -        * @see org.apache.wicket.jmx.RequestLoggerMBean#restart()
>> -        */
>> -       @Override
>> -       public void restart() throws IOException
>> -       {
>> -               if (webApplication != null)
>> -               {
>> -
>> webApplication.getRequestLoggerSettings().setRequestLoggerEnabled(false);
>> -                       webApplication.getRequestLogger();
>> -
>> webApplication.getRequestLoggerSettings().setRequestLoggerEnabled(true);
>> -               }
>> -       }
>> -
>> -       /**
>> -        * @see org.apache.wicket.jmx.RequestLoggerMBean#stop()
>> -        */
>> -       @Override
>> -       public void stop() throws IOException
>> -       {
>> -               if (webApplication != null)
>> -               {
>> -
>> webApplication.getRequestLoggerSettings().setRequestLoggerEnabled(false);
>> -               }
>> -       }
>> -
>> -       /**
>> -        * Gets the request logger for this application.
>> -        *
>> -        * @return The request logger or null if no request is active, or
>> if this is not a web
>> -        *         application
>> -        */
>> -       protected org.apache.wicket.protocol.http.IRequestLogger
>> getRequestLogger()
>> -       {
>> -               if (application instanceof WebApplication)
>> -               {
>> -                       return application.getRequestLogger();
>> -               }
>> -               return null;
>> -       }
>> -}
>>
>>
>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/ResourceSettings.java
>> ----------------------------------------------------------------------
>> diff --git
>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/ResourceSettings.java
>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/ResourceSettings.java
>> deleted file mode 100644
>> index af7f60d..0000000
>> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/ResourceSettings.java
>> +++ /dev/null
>> @@ -1,173 +0,0 @@
>> -/*
>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>> - * contributor license agreements.  See the NOTICE file distributed with
>> - * this work for additional information regarding copyright ownership.
>> - * The ASF licenses this file to You under the Apache License, Version
>> 2.0
>> - * (the "License"); you may not use this file except in compliance with
>> - * the License.  You may obtain a copy of the License at
>> - *
>> - *      http://www.apache.org/licenses/LICENSE-2.0
>> - *
>> - * Unless required by applicable law or agreed to in writing, software
>> - * distributed under the License is distributed on an "AS IS" BASIS,
>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>> implied.
>> - * See the License for the specific language governing permissions and
>> - * limitations under the License.
>> - */
>> -package org.apache.wicket.jmx;
>> -
>> -import java.util.List;
>> -
>> -import org.apache.wicket.ThreadContext;
>> -import org.apache.wicket.resource.loader.IStringResourceLoader;
>> -import org.apache.wicket.util.file.IResourceFinder;
>> -import org.apache.wicket.util.lang.Generics;
>> -import org.apache.wicket.util.time.Duration;
>> -
>> -
>> -/**
>> - * Exposes Application related functionality for JMX.
>> - *
>> - * @author eelcohillenius
>> - */
>> -public class ResourceSettings implements ResourceSettingsMBean
>> -{
>> -       private final org.apache.wicket.Application application;
>> -
>> -       /**
>> -        * Create.
>> -        *
>> -        * @param application
>> -        */
>> -       public ResourceSettings(final org.apache.wicket.Application
>> application)
>> -       {
>> -               this.application = application;
>> -       }
>> -
>> -       /**
>> -        * {@inheritDoc}
>> -        */
>> -       @Override
>> -       public String getLocalizer()
>> -       {
>> -               return
>> Stringz.className(application.getResourceSettings().getLocalizer());
>> -       }
>> -
>> -       /**
>> -        * {@inheritDoc}
>> -        */
>> -       @Override
>> -       public String getPackageResourceGuard()
>> -       {
>> -               return
>> Stringz.className(application.getResourceSettings().getPackageResourceGuard());
>> -       }
>> -
>> -       /**
>> -        * {@inheritDoc}
>> -        */
>> -       @Override
>> -       public String getPropertiesFactory()
>> -       {
>> -               ThreadContext.setApplication(application);
>> -
>> -               try
>> -               {
>> -                       return
>> Stringz.className(application.getResourceSettings().getPropertiesFactory());
>> -               }
>> -               finally
>> -               {
>> -                       ThreadContext.detach();
>> -               }
>> -       }
>> -
>> -       /**
>> -        * {@inheritDoc}
>> -        */
>> -       @Override
>> -       public String getResourceFinders()
>> -       {
>> -               StringBuilder builder = new StringBuilder();
>> -               for (IResourceFinder rf :
>> application.getResourceSettings().getResourceFinders())
>> -               {
>> -                       builder.append(Stringz.className(rf));
>> -               }
>> -               return builder.toString();
>> -       }
>> -
>> -       /**
>> -        * {@inheritDoc}
>> -        */
>> -       @Override
>> -       public String getResourcePollFrequency()
>> -       {
>> -               Duration duration =
>> application.getResourceSettings().getResourcePollFrequency();
>> -               return (duration != null) ? duration.toString() : null;
>> -       }
>> -
>> -       /**
>> -        * {@inheritDoc}
>> -        */
>> -       @Override
>> -       public String getResourceStreamLocator()
>> -       {
>> -               return
>> Stringz.className(application.getResourceSettings().getResourceStreamLocator());
>> -       }
>> -
>> -       /**
>> -        * {@inheritDoc}
>> -        */
>> -       @Override
>> -       public String[] getStringResourceLoaders()
>> -       {
>> -               List<IStringResourceLoader> loaders =
>> application.getResourceSettings()
>> -                       .getStringResourceLoaders();
>> -               if (loaders != null)
>> -               {
>> -                       List<String> list = Generics.newArrayList();
>> -                       for (Object loader : loaders)
>> -                       {
>> -                               list.add(loader.toString());
>> -                       }
>> -                       return list.toArray(new String[loaders.size()]);
>> -               }
>> -               return null;
>> -       }
>> -
>> -       /**
>> -        * {@inheritDoc}
>> -        */
>> -       @Override
>> -       public boolean getThrowExceptionOnMissingResource()
>> -       {
>> -               return
>> application.getResourceSettings().getThrowExceptionOnMissingResource();
>> -       }
>> -
>> -       /**
>> -        * {@inheritDoc}
>> -        */
>> -       @Override
>> -       public boolean getUseDefaultOnMissingResource()
>> -       {
>> -               return
>> application.getResourceSettings().getUseDefaultOnMissingResource();
>> -       }
>> -
>> -       /**
>> -        * {@inheritDoc}
>> -        */
>> -       @Override
>> -       public void setThrowExceptionOnMissingResource(final boolean
>> throwExceptionOnMissingResource)
>> -       {
>> -
>> application.getResourceSettings().setThrowExceptionOnMissingResource(
>> -                       throwExceptionOnMissingResource);
>> -       }
>> -
>> -       /**
>> -        * {@inheritDoc}
>> -        */
>> -       @Override
>> -       public void setUseDefaultOnMissingResource(final boolean
>> useDefaultOnMissingResource)
>> -       {
>> -
>> application.getResourceSettings().setUseDefaultOnMissingResource(
>> -                       useDefaultOnMissingResource);
>> -       }
>> -}
>>
>>
>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/SecuritySettings.java
>> ----------------------------------------------------------------------
>> diff --git
>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/SecuritySettings.java
>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/SecuritySettings.java
>> deleted file mode 100644
>> index be89017..0000000
>> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/SecuritySettings.java
>> +++ /dev/null
>> @@ -1,65 +0,0 @@
>> -/*
>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>> - * contributor license agreements.  See the NOTICE file distributed with
>> - * this work for additional information regarding copyright ownership.
>> - * The ASF licenses this file to You under the Apache License, Version
>> 2.0
>> - * (the "License"); you may not use this file except in compliance with
>> - * the License.  You may obtain a copy of the License at
>> - *
>> - *      http://www.apache.org/licenses/LICENSE-2.0
>> - *
>> - * Unless required by applicable law or agreed to in writing, software
>> - * distributed under the License is distributed on an "AS IS" BASIS,
>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>> implied.
>> - * See the License for the specific language governing permissions and
>> - * limitations under the License.
>> - */
>> -package org.apache.wicket.jmx;
>> -
>> -/**
>> - * Exposes Application related functionality for JMX.
>> - *
>> - * @author eelcohillenius
>> - */
>> -public class SecuritySettings implements SecuritySettingsMBean
>> -{
>> -       private final org.apache.wicket.Application application;
>> -
>> -       /**
>> -        * Create.
>> -        *
>> -        * @param application
>> -        */
>> -       public SecuritySettings(final org.apache.wicket.Application
>> application)
>> -       {
>> -               this.application = application;
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.SecuritySettingsMBean#getAuthorizationStrategy()
>> -        */
>> -       @Override
>> -       public String getAuthorizationStrategy()
>> -       {
>> -               return
>> Stringz.className(application.getSecuritySettings().getAuthorizationStrategy());
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.SecuritySettingsMBean#getCryptFactory()
>> -        */
>> -       @Override
>> -       public String getCryptFactory()
>> -       {
>> -               return
>> Stringz.className(application.getSecuritySettings().getCryptFactory());
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.SecuritySettingsMBean#getUnauthorizedComponentInstantiationListener()
>> -        */
>> -       @Override
>> -       public String getUnauthorizedComponentInstantiationListener()
>> -       {
>> -               return Stringz.className(application.getSecuritySettings()
>> -                       .getUnauthorizedComponentInstantiationListener());
>> -       }
>> -}
>>
>>
>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/SessionSettings.java
>> ----------------------------------------------------------------------
>> diff --git
>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/SessionSettings.java
>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/SessionSettings.java
>> deleted file mode 100644
>> index 6c15ab3..0000000
>> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/SessionSettings.java
>> +++ /dev/null
>> @@ -1,55 +0,0 @@
>> -/*
>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>> - * contributor license agreements.  See the NOTICE file distributed with
>> - * this work for additional information regarding copyright ownership.
>> - * The ASF licenses this file to You under the Apache License, Version
>> 2.0
>> - * (the "License"); you may not use this file except in compliance with
>> - * the License.  You may obtain a copy of the License at
>> - *
>> - *      http://www.apache.org/licenses/LICENSE-2.0
>> - *
>> - * Unless required by applicable law or agreed to in writing, software
>> - * distributed under the License is distributed on an "AS IS" BASIS,
>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>> implied.
>> - * See the License for the specific language governing permissions and
>> - * limitations under the License.
>> - */
>> -package org.apache.wicket.jmx;
>> -
>> -/**
>> - * Exposes Application related functionality for JMX.
>> - *
>> - * @author eelcohillenius
>> - */
>> -public class SessionSettings implements SessionSettingsMBean
>> -{
>> -       private final org.apache.wicket.Application application;
>> -
>> -       /**
>> -        * Create.
>> -        *
>> -        * @param application
>> -        */
>> -       public SessionSettings(final org.apache.wicket.Application
>> application)
>> -       {
>> -               this.application = application;
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.SessionSettingsMBean#getPageFactory()
>> -        */
>> -       @Override
>> -       public String getPageFactory()
>> -       {
>> -               return Stringz.className(application.getPageFactory());
>> -       }
>> -
>> -       /**
>> -        * @see
>> org.apache.wicket.jmx.SessionSettingsMBean#getSessionStore()
>> -        */
>> -       @Override
>> -       public String getSessionStore()
>> -       {
>> -               return Stringz.className(application.getSessionStore());
>> -       }
>> -}
>>
>>
>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/StoreSettings.java
>> ----------------------------------------------------------------------
>> diff --git
>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/StoreSettings.java
>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/StoreSettings.java
>> deleted file mode 100644
>> index 4705f3f..0000000
>> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/StoreSettings.java
>> +++ /dev/null
>> @@ -1,68 +0,0 @@
>> -/*
>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>> - * contributor license agreements.  See the NOTICE file distributed with
>> - * this work for additional information regarding copyright ownership.
>> - * The ASF licenses this file to You under the Apache License, Version
>> 2.0
>> - * (the "License"); you may not use this file except in compliance with
>> - * the License.  You may obtain a copy of the License at
>> - *
>> - *      http://www.apache.org/licenses/LICENSE-2.0
>> - *
>> - * Unless required by applicable law or agreed to in writing, software
>> - * distributed under the License is distributed on an "AS IS" BASIS,
>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>> implied.
>> - * See the License for the specific language governing permissions and
>> - * limitations under the License.
>> - */
>> -package org.apache.wicket.jmx;
>> -
>> -import org.apache.wicket.Application;
>> -
>> -/**
>> - * Exposes Application's StoreSettings for JMX.
>> - */
>> -public class StoreSettings implements StoreSettingsMBean
>> -{
>> -       private final Application application;
>> -
>> -       /**
>> -        * Construct.
>> -        *
>> -        * @param application
>> -        */
>> -       public StoreSettings(final Application application)
>> -       {
>> -               this.application = application;
>> -       }
>> -
>> -       @Override
>> -       public int getInmemoryCacheSize()
>> -       {
>> -               return
>> application.getStoreSettings().getInmemoryCacheSize();
>> -       }
>> -
>> -       @Override
>> -       public long getMaxSizePerSession()
>> -       {
>> -               return
>> application.getStoreSettings().getMaxSizePerSession().bytes();
>> -       }
>> -
>> -       @Override
>> -       public String getFileStoreFolder()
>> -       {
>> -               return
>> application.getStoreSettings().getFileStoreFolder().getAbsolutePath();
>> -       }
>> -
>> -       @Override
>> -       public int getAsynchronousQueueCapacity()
>> -       {
>> -               return
>> application.getStoreSettings().getAsynchronousQueueCapacity();
>> -       }
>> -
>> -       @Override
>> -       public boolean isAsynchronous()
>> -       {
>> -               return application.getStoreSettings().isAsynchronous();
>> -       }
>> -
>> -}
>>
>>
>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/Stringz.java
>> ----------------------------------------------------------------------
>> diff --git a/wicket-jmx/src/main/java/org/apache/wicket/jmx/Stringz.java
>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/Stringz.java
>> deleted file mode 100644
>> index f9f6381..0000000
>> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/Stringz.java
>> +++ /dev/null
>> @@ -1,25 +0,0 @@
>> -/*
>> - * Licensed to the Apache Software Foundation (ASF) under one or more
>> - * contributor license agreements.  See the NOTICE file distributed with
>> - * this work for additional information regarding copyright ownership.
>> - * The ASF licenses this file to You under the Apache License, Version
>> 2.0
>> - * (the "License"); you may not use this file except in compliance with
>> - * the License.  You may obtain a copy of the License at
>> - *
>> - *      http://www.apache.org/licenses/LICENSE-2.0
>> - *
>> - * Unless required by applicable law or agreed to in writing, software
>> - * distributed under the License is distributed on an "AS IS" BASIS,
>> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>> implied.
>> - * See the License for the specific language governing permissions and
>> - * limitations under the License.
>> - */
>> -package org.apache.wicket.jmx;
>> -
>> -class Stringz
>> -{
>> -       static String className(final Object o)
>> -       {
>> -               return (o != null) ? o.getClass().getName() : null;
>> -       }
>> -}
>>
>>
>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/Application.java
>> ----------------------------------------------------------------------
>> diff --git
>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/Application.java
>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/Application.java
>> new file mode 100644
>> index 0000000..56e0eff
>> --- /dev/null
>> +++
>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/Application.java
>> @@ -0,0 +1,104 @@
>> +/*
>> + * Licensed to the Apache Software Foundation (ASF) under one or more
>> + * contributor license agreements.  See the NOTICE file distributed with
>> + * this work for additional information regarding copyright ownership.
>> + * The ASF licenses this file to You under the Apache License, Version
>> 2.0
>> + * (the "License"); you may not use this file except in compliance with
>> + * the License.  You may obtain a copy of the License at
>> + *
>> + *      http://www.apache.org/licenses/LICENSE-2.0
>> + *
>> + * Unless required by applicable law or agreed to in writing, software
>> + * distributed under the License is distributed on an "AS IS" BASIS,
>> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>> implied.
>> + * See the License for the specific language governing permissions and
>> + * limitations under the License.
>> + */
>> +package org.apache.wicket.jmx.wrapper;
>> +
>> +import java.io.IOException;
>> +
>> +import org.apache.wicket.jmx.ApplicationMBean;
>> +
>> +/**
>> + * Exposes Application related functionality for JMX.
>> + *
>> + * @author eelcohillenius
>> + */
>> +public class Application implements ApplicationMBean
>> +{
>> +       private final org.apache.wicket.Application application;
>> +
>> +       /**
>> +        * Create.
>> +        *
>> +        * @param application
>> +        */
>> +       public Application(final org.apache.wicket.Application
>> application)
>> +       {
>> +               this.application = application;
>> +       }
>> +
>> +       /**
>> +        * @see org.apache.wicket.jmx.ApplicationMBean#clearMarkupCache()
>> +        */
>> +       @Override
>> +       public void clearMarkupCache() throws IOException
>> +       {
>> +
>> application.getMarkupSettings().getMarkupFactory().getMarkupCache().clear();
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.ApplicationMBean#getApplicationClass()
>> +        */
>> +       @Override
>> +       public String getApplicationClass() throws IOException
>> +       {
>> +               return application.getClass().getName();
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.ApplicationMBean#getConfigurationType()
>> +        */
>> +       @Override
>> +       public String getConfigurationType()
>> +       {
>> +               return application.getConfigurationType().name();
>> +       }
>> +
>> +       /**
>> +        * @see org.apache.wicket.jmx.ApplicationMBean#getHomePageClass()
>> +        */
>> +       @Override
>> +       public String getHomePageClass() throws IOException
>> +       {
>> +               return application.getHomePage().getName();
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.ApplicationMBean#getMarkupCacheSize()
>> +        */
>> +       @Override
>> +       public int getMarkupCacheSize() throws IOException
>> +       {
>> +               return
>> application.getMarkupSettings().getMarkupFactory().getMarkupCache().size();
>> +       }
>> +
>> +       /**
>> +        * @see org.apache.wicket.jmx.ApplicationMBean#getWicketVersion()
>> +        */
>> +       @Override
>> +       public String getWicketVersion() throws IOException
>> +       {
>> +               return application.getFrameworkSettings().getVersion();
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.ApplicationMBean#clearLocalizerCache()
>> +        */
>> +       @Override
>> +       public void clearLocalizerCache() throws IOException
>> +       {
>> +
>> application.getResourceSettings().getLocalizer().clearCache();
>> +       }
>> +}
>>
>>
>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/ApplicationSettings.java
>> ----------------------------------------------------------------------
>> diff --git
>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/ApplicationSettings.java
>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/ApplicationSettings.java
>> new file mode 100644
>> index 0000000..a6a0d4c
>> --- /dev/null
>> +++
>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/ApplicationSettings.java
>> @@ -0,0 +1,103 @@
>> +/*
>> + * Licensed to the Apache Software Foundation (ASF) under one or more
>> + * contributor license agreements.  See the NOTICE file distributed with
>> + * this work for additional information regarding copyright ownership.
>> + * The ASF licenses this file to You under the Apache License, Version
>> 2.0
>> + * (the "License"); you may not use this file except in compliance with
>> + * the License.  You may obtain a copy of the License at
>> + *
>> + *      http://www.apache.org/licenses/LICENSE-2.0
>> + *
>> + * Unless required by applicable law or agreed to in writing, software
>> + * distributed under the License is distributed on an "AS IS" BASIS,
>> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>> implied.
>> + * See the License for the specific language governing permissions and
>> + * limitations under the License.
>> + */
>> +package org.apache.wicket.jmx.wrapper;
>> +
>> +import org.apache.wicket.Application;
>> +import org.apache.wicket.jmx.ApplicationSettingsMBean;
>> +import org.apache.wicket.util.lang.Bytes;
>> +import org.apache.wicket.util.lang.Classes;
>> +
>> +/**
>> + * Exposes Application related functionality for JMX.
>> + *
>> + * @author eelcohillenius
>> + */
>> +public class ApplicationSettings implements ApplicationSettingsMBean
>> +{
>> +       private final Application application;
>> +
>> +       /**
>> +        * Create.
>> +        *
>> +        * @param application
>> +        */
>> +       public ApplicationSettings(final Application application)
>> +       {
>> +               this.application = application;
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.ApplicationSettingsMBean#getAccessDeniedPage()
>> +        */
>> +       @Override
>> +       public String getAccessDeniedPage()
>> +       {
>> +               return
>> Classes.name(application.getApplicationSettings().getAccessDeniedPage());
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.ApplicationSettingsMBean#getClassResolver()
>> +        */
>> +       @Override
>> +       public String getClassResolver()
>> +       {
>> +               return
>> Stringz.className(application.getApplicationSettings().getClassResolver());
>> +       }
>> +
>> +       @Override
>> +       public String getDefaultMaximumUploadSize()
>> +       {
>> +               return
>> application.getApplicationSettings().getDefaultMaximumUploadSize().toString();
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.ApplicationSettingsMBean#getInternalErrorPage()
>> +        */
>> +       @Override
>> +       public String getInternalErrorPage()
>> +       {
>> +               return
>> Classes.name(application.getApplicationSettings().getInternalErrorPage());
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.ApplicationSettingsMBean#getPageExpiredErrorPage()
>> +        */
>> +       @Override
>> +       public String getPageExpiredErrorPage()
>> +       {
>> +               return
>> Classes.name(application.getApplicationSettings().getPageExpiredErrorPage());
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.ApplicationSettingsMBean#getUnexpectedExceptionDisplay()
>> +        */
>> +       @Override
>> +       public String getUnexpectedExceptionDisplay()
>> +       {
>> +               return
>> application.getExceptionSettings().getUnexpectedExceptionDisplay().toString();
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.ApplicationSettingsMBean#setDefaultMaximumUploadSize(java.lang.String)
>> +        */
>> +       @Override
>> +       public void setDefaultMaximumUploadSize(final String
>> defaultUploadSize)
>> +       {
>> +
>> application.getApplicationSettings().setDefaultMaximumUploadSize(
>> +                       Bytes.valueOf(defaultUploadSize));
>> +       }
>> +}
>>
>>
>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/DebugSettings.java
>> ----------------------------------------------------------------------
>> diff --git
>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/DebugSettings.java
>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/DebugSettings.java
>> new file mode 100644
>> index 0000000..fcd073a
>> --- /dev/null
>> +++
>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/DebugSettings.java
>> @@ -0,0 +1,167 @@
>> +/*
>> + * Licensed to the Apache Software Foundation (ASF) under one or more
>> + * contributor license agreements.  See the NOTICE file distributed with
>> + * this work for additional information regarding copyright ownership.
>> + * The ASF licenses this file to You under the Apache License, Version
>> 2.0
>> + * (the "License"); you may not use this file except in compliance with
>> + * the License.  You may obtain a copy of the License at
>> + *
>> + *      http://www.apache.org/licenses/LICENSE-2.0
>> + *
>> + * Unless required by applicable law or agreed to in writing, software
>> + * distributed under the License is distributed on an "AS IS" BASIS,
>> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>> implied.
>> + * See the License for the specific language governing permissions and
>> + * limitations under the License.
>> + */
>> +package org.apache.wicket.jmx.wrapper;
>> +
>> +import org.apache.wicket.Application;
>> +import org.apache.wicket.jmx.DebugSettingsMBean;
>> +
>> +/**
>> + * Exposes Application related functionality for JMX.
>> + *
>> + * @author eelcohillenius
>> + */
>> +public class DebugSettings implements DebugSettingsMBean
>> +{
>> +       private final Application application;
>> +
>> +       /**
>> +        * Create.
>> +        *
>> +        * @param application
>> +        */
>> +       public DebugSettings(final Application application)
>> +       {
>> +               this.application = application;
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.DebugSettingsMBean#getComponentUseCheck()
>> +        */
>> +       @Override
>> +       public boolean getComponentUseCheck()
>> +       {
>> +               return
>> application.getDebugSettings().getComponentUseCheck();
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.DebugSettingsMBean#isAjaxDebugModeEnabled()
>> +        */
>> +       @Override
>> +       public boolean isAjaxDebugModeEnabled()
>> +       {
>> +               return
>> application.getDebugSettings().isAjaxDebugModeEnabled();
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.DebugSettingsMBean#setAjaxDebugModeEnabled(boolean)
>> +        */
>> +       @Override
>> +       public void setAjaxDebugModeEnabled(final boolean enable)
>> +       {
>> +
>> application.getDebugSettings().setAjaxDebugModeEnabled(enable);
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.DebugSettingsMBean#setComponentUseCheck(boolean)
>> +        */
>> +       @Override
>> +       public void setComponentUseCheck(final boolean check)
>> +       {
>> +
>> application.getDebugSettings().setComponentUseCheck(check);
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.DebugSettingsMBean#setOutputComponentPath(boolean)
>> +        */
>> +       @Override
>> +       public void setOutputComponentPath(final boolean enabled)
>> +       {
>> +
>> application.getDebugSettings().setOutputComponentPath(enabled);
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.DebugSettingsMBean#isOutputComponentPath()
>> +        */
>> +       @Override
>> +       public boolean isOutputComponentPath()
>> +       {
>> +               return
>> application.getDebugSettings().isOutputComponentPath();
>> +       }
>> +
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.DebugSettingsMBean#setOutputMarkupContainerClassName(boolean)
>> +        */
>> +       @Override
>> +       public void setOutputMarkupContainerClassName(final boolean
>> enable)
>> +       {
>> +
>> application.getDebugSettings().setOutputMarkupContainerClassName(enable);
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.DebugSettingsMBean#isOutputMarkupContainerClassName()
>> +        */
>> +       @Override
>> +       public boolean isOutputMarkupContainerClassName()
>> +       {
>> +               return
>> application.getDebugSettings().isOutputMarkupContainerClassName();
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.DebugSettingsMBean#isLinePreciseReportingOnAddComponentEnabled()
>> +        */
>> +       @Override
>> +       public boolean isLinePreciseReportingOnAddComponentEnabled()
>> +       {
>> +               return
>> application.getDebugSettings().isLinePreciseReportingOnAddComponentEnabled();
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.DebugSettingsMBean#setLinePreciseReportingOnAddComponentEnabled(boolean)
>> +        */
>> +       @Override
>> +       public void setLinePreciseReportingOnAddComponentEnabled(final
>> boolean enable)
>> +       {
>> +
>> application.getDebugSettings().setLinePreciseReportingOnAddComponentEnabled(enable);
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.DebugSettingsMBean#isLinePreciseReportingOnNewComponentEnabled()
>> +        */
>> +       @Override
>> +       public boolean isLinePreciseReportingOnNewComponentEnabled()
>> +       {
>> +               return
>> application.getDebugSettings().isLinePreciseReportingOnNewComponentEnabled();
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.DebugSettingsMBean#setLinePreciseReportingOnNewComponentEnabled(boolean)
>> +        */
>> +       @Override
>> +       public void setLinePreciseReportingOnNewComponentEnabled(final
>> boolean enable)
>> +       {
>> +
>> application.getDebugSettings().setLinePreciseReportingOnNewComponentEnabled(enable);
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.DebugSettingsMBean#setDevelopmentUtilitiesEnabled(boolean)
>> +        */
>> +       @Override
>> +       public void setDevelopmentUtilitiesEnabled(final boolean enable)
>> +       {
>> +
>> application.getDebugSettings().setDevelopmentUtilitiesEnabled(enable);
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.DebugSettingsMBean#isDevelopmentUtilitiesEnabled()
>> +        */
>> +       @Override
>> +       public boolean isDevelopmentUtilitiesEnabled()
>> +       {
>> +               return
>> application.getDebugSettings().isDevelopmentUtilitiesEnabled();
>> +       }
>> +}
>>
>>
>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/MarkupSettings.java
>> ----------------------------------------------------------------------
>> diff --git
>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/MarkupSettings.java
>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/MarkupSettings.java
>> new file mode 100644
>> index 0000000..387b2ba
>> --- /dev/null
>> +++
>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/MarkupSettings.java
>> @@ -0,0 +1,131 @@
>> +/*
>> + * Licensed to the Apache Software Foundation (ASF) under one or more
>> + * contributor license agreements.  See the NOTICE file distributed with
>> + * this work for additional information regarding copyright ownership.
>> + * The ASF licenses this file to You under the Apache License, Version
>> 2.0
>> + * (the "License"); you may not use this file except in compliance with
>> + * the License.  You may obtain a copy of the License at
>> + *
>> + *      http://www.apache.org/licenses/LICENSE-2.0
>> + *
>> + * Unless required by applicable law or agreed to in writing, software
>> + * distributed under the License is distributed on an "AS IS" BASIS,
>> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>> implied.
>> + * See the License for the specific language governing permissions and
>> + * limitations under the License.
>> + */
>> +package org.apache.wicket.jmx.wrapper;
>> +
>> +import org.apache.wicket.Application;
>> +import org.apache.wicket.jmx.MarkupSettingsMBean;
>> +
>> +
>> +/**
>> + * Exposes Application related functionality for JMX.
>> + *
>> + * @author eelcohillenius
>> + */
>> +public class MarkupSettings implements MarkupSettingsMBean
>> +{
>> +       private final Application application;
>> +
>> +       /**
>> +        * Create.
>> +        *
>> +        * @param application
>> +        */
>> +       public MarkupSettings(final Application application)
>> +       {
>> +               this.application = application;
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.MarkupSettingsMBean#getAutomaticLinking()
>> +        */
>> +       @Override
>> +       public boolean getAutomaticLinking()
>> +       {
>> +               return
>> application.getMarkupSettings().getAutomaticLinking();
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.MarkupSettingsMBean#getCompressWhitespace()
>> +        */
>> +       @Override
>> +       public boolean getCompressWhitespace()
>> +       {
>> +               return
>> application.getMarkupSettings().getCompressWhitespace();
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.MarkupSettingsMBean#getDefaultMarkupEncoding()
>> +        */
>> +       @Override
>> +       public String getDefaultMarkupEncoding()
>> +       {
>> +               return
>> application.getMarkupSettings().getDefaultMarkupEncoding();
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.MarkupSettingsMBean#getStripComments()
>> +        */
>> +       @Override
>> +       public boolean getStripComments()
>> +       {
>> +               return application.getMarkupSettings().getStripComments();
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.MarkupSettingsMBean#getStripWicketTags()
>> +        */
>> +       @Override
>> +       public boolean getStripWicketTags()
>> +       {
>> +               return
>> application.getMarkupSettings().getStripWicketTags();
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.MarkupSettingsMBean#setAutomaticLinking(boolean)
>> +        */
>> +       @Override
>> +       public void setAutomaticLinking(final boolean automaticLinking)
>> +       {
>> +
>> application.getMarkupSettings().setAutomaticLinking(automaticLinking);
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.MarkupSettingsMBean#setCompressWhitespace(boolean)
>> +        */
>> +       @Override
>> +       public void setCompressWhitespace(final boolean
>> compressWhitespace)
>> +       {
>> +
>> application.getMarkupSettings().setCompressWhitespace(compressWhitespace);
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.MarkupSettingsMBean#setDefaultMarkupEncoding(java.lang.String)
>> +        */
>> +       @Override
>> +       public void setDefaultMarkupEncoding(final String encoding)
>> +       {
>> +
>> application.getMarkupSettings().setDefaultMarkupEncoding(encoding);
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.MarkupSettingsMBean#setStripComments(boolean)
>> +        */
>> +       @Override
>> +       public void setStripComments(final boolean stripComments)
>> +       {
>> +
>> application.getMarkupSettings().setStripComments(stripComments);
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.MarkupSettingsMBean#setStripWicketTags(boolean)
>> +        */
>> +       @Override
>> +       public void setStripWicketTags(final boolean stripWicketTags)
>> +       {
>> +
>> application.getMarkupSettings().setStripWicketTags(stripWicketTags);
>> +       }
>> +}
>>
>>
>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/PageSettings.java
>> ----------------------------------------------------------------------
>> diff --git
>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/PageSettings.java
>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/PageSettings.java
>> new file mode 100644
>> index 0000000..27d325d
>> --- /dev/null
>> +++
>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/PageSettings.java
>> @@ -0,0 +1,59 @@
>> +/*
>> + * Licensed to the Apache Software Foundation (ASF) under one or more
>> + * contributor license agreements.  See the NOTICE file distributed with
>> + * this work for additional information regarding copyright ownership.
>> + * The ASF licenses this file to You under the Apache License, Version
>> 2.0
>> + * (the "License"); you may not use this file except in compliance with
>> + * the License.  You may obtain a copy of the License at
>> + *
>> + *      http://www.apache.org/licenses/LICENSE-2.0
>> + *
>> + * Unless required by applicable law or agreed to in writing, software
>> + * distributed under the License is distributed on an "AS IS" BASIS,
>> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>> implied.
>> + * See the License for the specific language governing permissions and
>> + * limitations under the License.
>> + */
>> +package org.apache.wicket.jmx.wrapper;
>> +
>> +import org.apache.wicket.Application;
>> +import org.apache.wicket.jmx.PageSettingsMBean;
>> +
>> +
>> +/**
>> + * Exposes Application related functionality for JMX.
>> + *
>> + * @author eelcohillenius
>> + */
>> +public class PageSettings implements PageSettingsMBean
>> +{
>> +       private final Application application;
>> +
>> +       /**
>> +        * Create.
>> +        *
>> +        * @param application
>> +        */
>> +       public PageSettings(final Application application)
>> +       {
>> +               this.application = application;
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.PageSettingsMBean#getVersionPagesByDefault()
>> +        */
>> +       @Override
>> +       public boolean getVersionPagesByDefault()
>> +       {
>> +               return
>> application.getPageSettings().getVersionPagesByDefault();
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.PageSettingsMBean#setVersionPagesByDefault(boolean)
>> +        */
>> +       @Override
>> +       public void setVersionPagesByDefault(final boolean
>> pagesVersionedByDefault)
>> +       {
>> +
>> application.getPageSettings().setVersionPagesByDefault(pagesVersionedByDefault);
>> +       }
>> +}
>>
>>
>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/RequestCycleSettings.java
>> ----------------------------------------------------------------------
>> diff --git
>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/RequestCycleSettings.java
>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/RequestCycleSettings.java
>> new file mode 100644
>> index 0000000..8fa04f2
>> --- /dev/null
>> +++
>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/RequestCycleSettings.java
>> @@ -0,0 +1,127 @@
>> +/*
>> + * Licensed to the Apache Software Foundation (ASF) under one or more
>> + * contributor license agreements.  See the NOTICE file distributed with
>> + * this work for additional information regarding copyright ownership.
>> + * The ASF licenses this file to You under the Apache License, Version
>> 2.0
>> + * (the "License"); you may not use this file except in compliance with
>> + * the License.  You may obtain a copy of the License at
>> + *
>> + *      http://www.apache.org/licenses/LICENSE-2.0
>> + *
>> + * Unless required by applicable law or agreed to in writing, software
>> + * distributed under the License is distributed on an "AS IS" BASIS,
>> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>> implied.
>> + * See the License for the specific language governing permissions and
>> + * limitations under the License.
>> + */
>> +package org.apache.wicket.jmx.wrapper;
>> +
>> +import org.apache.wicket.Application;
>> +import org.apache.wicket.jmx.RequestCycleSettingsMBean;
>> +import org.apache.wicket.util.time.Duration;
>> +
>> +
>> +/**
>> + * Exposes Application related functionality for JMX.
>> + *
>> + * @author eelcohillenius
>> + */
>> +public class RequestCycleSettings implements RequestCycleSettingsMBean
>> +{
>> +       private final Application application;
>> +
>> +       /**
>> +        * Create.
>> +        *
>> +        * @param application
>> +        */
>> +       public RequestCycleSettings(final Application application)
>> +       {
>> +               this.application = application;
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.RequestCycleSettingsMBean#getBufferResponse()
>> +        */
>> +       @Override
>> +       public boolean getBufferResponse()
>> +       {
>> +               return
>> application.getRequestCycleSettings().getBufferResponse();
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.RequestCycleSettingsMBean#getGatherExtendedBrowserInfo()
>> +        */
>> +       @Override
>> +       public boolean getGatherExtendedBrowserInfo()
>> +       {
>> +               return
>> application.getRequestCycleSettings().getGatherExtendedBrowserInfo();
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.RequestCycleSettingsMBean#getResponseRequestEncoding()
>> +        */
>> +       @Override
>> +       public String getResponseRequestEncoding()
>> +       {
>> +               return
>> application.getRequestCycleSettings().getResponseRequestEncoding();
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.RequestCycleSettingsMBean#getTimeout()
>> +        */
>> +       @Override
>> +       public String getTimeout()
>> +       {
>> +               return
>> application.getRequestCycleSettings().getTimeout().toString();
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.RequestCycleSettingsMBean#setBufferResponse(boolean)
>> +        */
>> +       @Override
>> +       public void setBufferResponse(final boolean bufferResponse)
>> +       {
>> +
>> application.getRequestCycleSettings().setBufferResponse(bufferResponse);
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.RequestCycleSettingsMBean#setGatherExtendedBrowserInfo(boolean)
>> +        */
>> +       @Override
>> +       public void setGatherExtendedBrowserInfo(final boolean
>> gatherExtendedBrowserInfo)
>> +       {
>> +
>> application.getRequestCycleSettings().setGatherExtendedBrowserInfo(
>> +                       gatherExtendedBrowserInfo);
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.RequestCycleSettingsMBean#setResponseRequestEncoding(java.lang.String)
>> +        */
>> +       @Override
>> +       public void setResponseRequestEncoding(final String
>> responseRequestEncoding)
>> +       {
>> +
>> application.getRequestCycleSettings().setResponseRequestEncoding(responseRequestEncoding);
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.RequestCycleSettingsMBean#setTimeout(java.lang.String)
>> +        */
>> +       @Override
>> +       public void setTimeout(final String timeout)
>> +       {
>> +
>> application.getRequestCycleSettings().setTimeout(Duration.valueOf(timeout));
>> +       }
>> +
>> +       @Override
>> +       public void setExceptionRetryCount(int retries)
>> +       {
>> +
>> application.getRequestCycleSettings().setExceptionRetryCount(retries);
>> +       }
>> +
>> +       @Override
>> +       public int getExceptionRetryCount()
>> +       {
>> +               return
>> application.getRequestCycleSettings().getExceptionRetryCount();
>> +       }
>> +}
>>
>>
>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/RequestLogger.java
>> ----------------------------------------------------------------------
>> diff --git
>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/RequestLogger.java
>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/RequestLogger.java
>> new file mode 100644
>> index 0000000..90e234f
>> --- /dev/null
>> +++
>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/RequestLogger.java
>> @@ -0,0 +1,168 @@
>> +/*
>> + * Licensed to the Apache Software Foundation (ASF) under one or more
>> + * contributor license agreements.  See the NOTICE file distributed with
>> + * this work for additional information regarding copyright ownership.
>> + * The ASF licenses this file to You under the Apache License, Version
>> 2.0
>> + * (the "License"); you may not use this file except in compliance with
>> + * the License.  You may obtain a copy of the License at
>> + *
>> + *      http://www.apache.org/licenses/LICENSE-2.0
>> + *
>> + * Unless required by applicable law or agreed to in writing, software
>> + * distributed under the License is distributed on an "AS IS" BASIS,
>> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>> implied.
>> + * See the License for the specific language governing permissions and
>> + * limitations under the License.
>> + */
>> +package org.apache.wicket.jmx.wrapper;
>> +
>> +import java.io.IOException;
>> +
>> +import org.apache.wicket.Application;
>> +import org.apache.wicket.jmx.RequestLoggerMBean;
>> +import org.apache.wicket.protocol.http.WebApplication;
>> +
>> +
>> +/**
>> + * Exposes {@link org.apache.wicket.protocol.http.RequestLogger} for JMX.
>> + *
>> + * @author eelcohillenius
>> + */
>> +public class RequestLogger implements RequestLoggerMBean
>> +{
>> +       private final Application application;
>> +
>> +       private final WebApplication webApplication;
>> +
>> +       /**
>> +        * Construct.
>> +        *
>> +        * @param application
>> +        *            The application
>> +        */
>> +       public RequestLogger(final Application application)
>> +       {
>> +               this.application = application;
>> +
>> +               // do this so that we don't have to cast all the time
>> +               if (application instanceof WebApplication)
>> +               {
>> +                       webApplication = (WebApplication)application;
>> +               }
>> +               else
>> +               {
>> +                       webApplication = null;
>> +               }
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.RequestLoggerMBean#getNumberOfCreatedSessions()
>> +        */
>> +       @Override
>> +       public Integer getNumberOfCreatedSessions() throws IOException
>> +       {
>> +               org.apache.wicket.protocol.http.IRequestLogger logger =
>> getRequestLogger();
>> +               if (logger != null)
>> +               {
>> +                       return logger.getTotalCreatedSessions();
>> +               }
>> +               return null;
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.RequestLoggerMBean#getNumberOfLiveSessions()
>> +        */
>> +       @Override
>> +       public Integer getNumberOfLiveSessions() throws IOException
>> +       {
>> +               org.apache.wicket.protocol.http.IRequestLogger logger =
>> getRequestLogger();
>> +               if (logger != null)
>> +               {
>> +                       return logger.getLiveSessions().length;
>> +               }
>> +               return null;
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.RequestLoggerMBean#getPeakNumberOfSessions()
>> +        */
>> +       @Override
>> +       public Integer getPeakNumberOfSessions() throws IOException
>> +       {
>> +               org.apache.wicket.protocol.http.IRequestLogger logger =
>> getRequestLogger();
>> +               if (logger != null)
>> +               {
>> +                       return logger.getPeakSessions();
>> +               }
>> +               return null;
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.RequestLoggerMBean#getNumberOfCurrentActiveRequests()
>> +        */
>> +       @Override
>> +       public Integer getNumberOfCurrentActiveRequests() throws
>> IOException
>> +       {
>> +               org.apache.wicket.protocol.http.IRequestLogger logger =
>> getRequestLogger();
>> +               if (logger != null)
>> +               {
>> +                       return
>> Integer.valueOf(logger.getCurrentActiveRequestCount());
>> +               }
>> +               return null;
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.RequestLoggerMBean#getPeakNumberOfActiveRequests()
>> +        */
>> +       @Override
>> +       public Integer getPeakNumberOfActiveRequests() throws IOException
>> +       {
>> +               org.apache.wicket.protocol.http.IRequestLogger logger =
>> getRequestLogger();
>> +               if (logger != null)
>> +               {
>> +                       return
>> Integer.valueOf(logger.getPeakActiveRequestCount());
>> +               }
>> +               return null;
>> +       }
>> +
>> +       /**
>> +        * @see org.apache.wicket.jmx.RequestLoggerMBean#restart()
>> +        */
>> +       @Override
>> +       public void restart() throws IOException
>> +       {
>> +               if (webApplication != null)
>> +               {
>> +
>> webApplication.getRequestLoggerSettings().setRequestLoggerEnabled(false);
>> +                       webApplication.getRequestLogger();
>> +
>> webApplication.getRequestLoggerSettings().setRequestLoggerEnabled(true);
>> +               }
>> +       }
>> +
>> +       /**
>> +        * @see org.apache.wicket.jmx.RequestLoggerMBean#stop()
>> +        */
>> +       @Override
>> +       public void stop() throws IOException
>> +       {
>> +               if (webApplication != null)
>> +               {
>> +
>> webApplication.getRequestLoggerSettings().setRequestLoggerEnabled(false);
>> +               }
>> +       }
>> +
>> +       /**
>> +        * Gets the request logger for this application.
>> +        *
>> +        * @return The request logger or null if no request is active, or
>> if this is not a web
>> +        *         application
>> +        */
>> +       protected org.apache.wicket.protocol.http.IRequestLogger
>> getRequestLogger()
>> +       {
>> +               if (application instanceof WebApplication)
>> +               {
>> +                       return application.getRequestLogger();
>> +               }
>> +               return null;
>> +       }
>> +}
>>
>>
>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/ResourceSettings.java
>> ----------------------------------------------------------------------
>> diff --git
>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/ResourceSettings.java
>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/ResourceSettings.java
>> new file mode 100644
>> index 0000000..b03de01
>> --- /dev/null
>> +++
>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/ResourceSettings.java
>> @@ -0,0 +1,165 @@
>> +/*
>> + * Licensed to the Apache Software Foundation (ASF) under one or more
>> + * contributor license agreements.  See the NOTICE file distributed with
>> + * this work for additional information regarding copyright ownership.
>> + * The ASF licenses this file to You under the Apache License, Version
>> 2.0
>> + * (the "License"); you may not use this file except in compliance with
>> + * the License.  You may obtain a copy of the License at
>> + *
>> + *      http://www.apache.org/licenses/LICENSE-2.0
>> + *
>> + * Unless required by applicable law or agreed to in writing, software
>> + * distributed under the License is distributed on an "AS IS" BASIS,
>> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>> implied.
>> + * See the License for the specific language governing permissions and
>> + * limitations under the License.
>> + */
>> +package org.apache.wicket.jmx.wrapper;
>> +
>> +import java.util.List;
>> +
>> +import org.apache.wicket.Application;
>> +import org.apache.wicket.jmx.ResourceSettingsMBean;
>> +import org.apache.wicket.resource.loader.IStringResourceLoader;
>> +import org.apache.wicket.util.file.IResourceFinder;
>> +import org.apache.wicket.util.lang.Generics;
>> +import org.apache.wicket.util.time.Duration;
>> +
>> +
>> +/**
>> + * Exposes Application related functionality for JMX.
>> + *
>> + * @author eelcohillenius
>> + */
>> +public class ResourceSettings implements ResourceSettingsMBean
>> +{
>> +       private final Application application;
>> +
>> +       /**
>> +        * Create.
>> +        *
>> +        * @param application
>> +        */
>> +       public ResourceSettings(final Application application)
>> +       {
>> +               this.application = application;
>> +       }
>> +
>> +       /**
>> +        * {@inheritDoc}
>> +        */
>> +       @Override
>> +       public String getLocalizer()
>> +       {
>> +               return
>> Stringz.className(application.getResourceSettings().getLocalizer());
>> +       }
>> +
>> +       /**
>> +        * {@inheritDoc}
>> +        */
>> +       @Override
>> +       public String getPackageResourceGuard()
>> +       {
>> +               return
>> Stringz.className(application.getResourceSettings().getPackageResourceGuard());
>> +       }
>> +
>> +       /**
>> +        * {@inheritDoc}
>> +        */
>> +       @Override
>> +       public String getPropertiesFactory()
>> +       {
>> +               return
>> Stringz.className(application.getResourceSettings().getPropertiesFactory());
>> +       }
>> +
>> +       /**
>> +        * {@inheritDoc}
>> +        */
>> +       @Override
>> +       public String getResourceFinders()
>> +       {
>> +               StringBuilder builder = new StringBuilder();
>> +               for (IResourceFinder rf :
>> application.getResourceSettings().getResourceFinders())
>> +               {
>> +                       builder.append(Stringz.className(rf));
>> +               }
>> +               return builder.toString();
>> +       }
>> +
>> +       /**
>> +        * {@inheritDoc}
>> +        */
>> +       @Override
>> +       public String getResourcePollFrequency()
>> +       {
>> +               Duration duration =
>> application.getResourceSettings().getResourcePollFrequency();
>> +               return (duration != null) ? duration.toString() : null;
>> +       }
>> +
>> +       /**
>> +        * {@inheritDoc}
>> +        */
>> +       @Override
>> +       public String getResourceStreamLocator()
>> +       {
>> +               return
>> Stringz.className(application.getResourceSettings().getResourceStreamLocator());
>> +       }
>> +
>> +       /**
>> +        * {@inheritDoc}
>> +        */
>> +       @Override
>> +       public String[] getStringResourceLoaders()
>> +       {
>> +               List<IStringResourceLoader> loaders =
>> application.getResourceSettings()
>> +                       .getStringResourceLoaders();
>> +               if (loaders != null)
>> +               {
>> +                       List<String> list = Generics.newArrayList();
>> +                       for (Object loader : loaders)
>> +                       {
>> +                               list.add(loader.toString());
>> +                       }
>> +                       return list.toArray(new String[loaders.size()]);
>> +               }
>> +               return null;
>> +       }
>> +
>> +       /**
>> +        * {@inheritDoc}
>> +        */
>> +       @Override
>> +       public boolean getThrowExceptionOnMissingResource()
>> +       {
>> +               return
>> application.getResourceSettings().getThrowExceptionOnMissingResource();
>> +       }
>> +
>> +       /**
>> +        * {@inheritDoc}
>> +        */
>> +       @Override
>> +       public boolean getUseDefaultOnMissingResource()
>> +       {
>> +               return
>> application.getResourceSettings().getUseDefaultOnMissingResource();
>> +       }
>> +
>> +       /**
>> +        * {@inheritDoc}
>> +        */
>> +       @Override
>> +       public void setThrowExceptionOnMissingResource(final boolean
>> throwExceptionOnMissingResource)
>> +       {
>> +
>> application.getResourceSettings().setThrowExceptionOnMissingResource(
>> +                       throwExceptionOnMissingResource);
>> +       }
>> +
>> +       /**
>> +        * {@inheritDoc}
>> +        */
>> +       @Override
>> +       public void setUseDefaultOnMissingResource(final boolean
>> useDefaultOnMissingResource)
>> +       {
>> +
>> application.getResourceSettings().setUseDefaultOnMissingResource(
>> +                       useDefaultOnMissingResource);
>> +       }
>> +}
>>
>>
>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/SecuritySettings.java
>> ----------------------------------------------------------------------
>> diff --git
>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/SecuritySettings.java
>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/SecuritySettings.java
>> new file mode 100644
>> index 0000000..67a8748
>> --- /dev/null
>> +++
>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/SecuritySettings.java
>> @@ -0,0 +1,68 @@
>> +/*
>> + * Licensed to the Apache Software Foundation (ASF) under one or more
>> + * contributor license agreements.  See the NOTICE file distributed with
>> + * this work for additional information regarding copyright ownership.
>> + * The ASF licenses this file to You under the Apache License, Version
>> 2.0
>> + * (the "License"); you may not use this file except in compliance with
>> + * the License.  You may obtain a copy of the License at
>> + *
>> + *      http://www.apache.org/licenses/LICENSE-2.0
>> + *
>> + * Unless required by applicable law or agreed to in writing, software
>> + * distributed under the License is distributed on an "AS IS" BASIS,
>> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>> implied.
>> + * See the License for the specific language governing permissions and
>> + * limitations under the License.
>> + */
>> +package org.apache.wicket.jmx.wrapper;
>> +
>> +import org.apache.wicket.Application;
>> +import org.apache.wicket.jmx.SecuritySettingsMBean;
>> +
>> +/**
>> + * Exposes Application related functionality for JMX.
>> + *
>> + * @author eelcohillenius
>> + */
>> +public class SecuritySettings implements SecuritySettingsMBean
>> +{
>> +       private final Application application;
>> +
>> +       /**
>> +        * Create.
>> +        *
>> +        * @param application
>> +        */
>> +       public SecuritySettings(final Application application)
>> +       {
>> +               this.application = application;
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.SecuritySettingsMBean#getAuthorizationStrategy()
>> +        */
>> +       @Override
>> +       public String getAuthorizationStrategy()
>> +       {
>> +               return
>> Stringz.className(application.getSecuritySettings().getAuthorizationStrategy());
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.SecuritySettingsMBean#getCryptFactory()
>> +        */
>> +       @Override
>> +       public String getCryptFactory()
>> +       {
>> +               return
>> Stringz.className(application.getSecuritySettings().getCryptFactory());
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.SecuritySettingsMBean#getUnauthorizedComponentInstantiationListener()
>> +        */
>> +       @Override
>> +       public String getUnauthorizedComponentInstantiationListener()
>> +       {
>> +               return Stringz.className(application.getSecuritySettings()
>> +                       .getUnauthorizedComponentInstantiationListener());
>> +       }
>> +}
>>
>>
>> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/SessionSettings.java
>> ----------------------------------------------------------------------
>> diff --git
>> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/SessionSettings.java
>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/SessionSettings.java
>> new file mode 100644
>> index 0000000..f235ab6
>> --- /dev/null
>> +++
>> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/SessionSettings.java
>> @@ -0,0 +1,58 @@
>> +/*
>> + * Licensed to the Apache Software Foundation (ASF) under one or more
>> + * contributor license agreements.  See the NOTICE file distributed with
>> + * this work for additional information regarding copyright ownership.
>> + * The ASF licenses this file to You under the Apache License, Version
>> 2.0
>> + * (the "License"); you may not use this file except in compliance with
>> + * the License.  You may obtain a copy of the License at
>> + *
>> + *      http://www.apache.org/licenses/LICENSE-2.0
>> + *
>> + * Unless required by applicable law or agreed to in writing, software
>> + * distributed under the License is distributed on an "AS IS" BASIS,
>> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>> implied.
>> + * See the License for the specific language governing permissions and
>> + * limitations under the License.
>> + */
>> +package org.apache.wicket.jmx.wrapper;
>> +
>> +import org.apache.wicket.Application;
>> +import org.apache.wicket.jmx.SessionSettingsMBean;
>> +
>> +/**
>> + * Exposes Application related functionality for JMX.
>> + *
>> + * @author eelcohillenius
>> + */
>> +public class SessionSettings implements SessionSettingsMBean
>> +{
>> +       private final Application application;
>> +
>> +       /**
>> +        * Create.
>> +        *
>> +        * @param application
>> +        */
>> +       public SessionSettings(final Application application)
>> +       {
>> +               this.application = application;
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.SessionSettingsMBean#getPageFactory()
>> +        */
>> +       @Override
>> +       public String getPageFactory()
>> +       {
>> +               return Stringz.className(application.getPageFactory());
>> +       }
>> +
>> +       /**
>> +        * @see
>> org.apache.wicket.jmx.SessionSettingsMBean#getSessionStore()
>> +        */
>> +       @Override
>> +       public String getSessionStore()
>> +       {
>> +               return Stringz.className(application.getSessionStore());
>> +       }
>> +}
>>
>>
>

Re: [2/3] git commit: use proxies for mbeans, so application is set on thread automatically

Posted by Martin Grigorov <mg...@apache.org>.
Hi Sven,


On Fri, Mar 21, 2014 at 5:48 PM, <sv...@apache.org> wrote:

> use proxies for mbeans, so application is set on thread automatically
>
> Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
> Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/fea2b8e4
> Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/fea2b8e4
> Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/fea2b8e4
>
> Branch: refs/heads/master
> Commit: fea2b8e4e0feb6a7374bcfe6de2da5d1a2feba20
> Parents: 329b945
> Author: svenmeier <sv...@meiers.net>
> Authored: Fri Mar 21 16:39:29 2014 +0100
> Committer: svenmeier <sv...@meiers.net>
> Committed: Fri Mar 21 16:39:29 2014 +0100
>
> ----------------------------------------------------------------------
>  wicket-jmx/pom.xml                              |   8 +
>  .../java/org/apache/wicket/jmx/Application.java | 113 ------------
>  .../apache/wicket/jmx/ApplicationSettings.java  | 101 -----------
>  .../org/apache/wicket/jmx/DebugSettings.java    | 164 ------------------
>  .../java/org/apache/wicket/jmx/Initializer.java | 111 +++++++++---
>  .../org/apache/wicket/jmx/MarkupSettings.java   | 128 --------------
>  .../apache/wicket/jmx/MarkupSettingsMBean.java  |   2 +
>  .../org/apache/wicket/jmx/PageSettings.java     |  56 ------
>  .../apache/wicket/jmx/RequestCycleSettings.java | 125 --------------
>  .../org/apache/wicket/jmx/RequestLogger.java    | 166 ------------------
>  .../org/apache/wicket/jmx/ResourceSettings.java | 173 -------------------
>  .../org/apache/wicket/jmx/SecuritySettings.java |  65 -------
>  .../org/apache/wicket/jmx/SessionSettings.java  |  55 ------
>  .../org/apache/wicket/jmx/StoreSettings.java    |  68 --------
>  .../java/org/apache/wicket/jmx/Stringz.java     |  25 ---
>  .../apache/wicket/jmx/wrapper/Application.java  | 104 +++++++++++
>  .../wicket/jmx/wrapper/ApplicationSettings.java | 103 +++++++++++
>  .../wicket/jmx/wrapper/DebugSettings.java       | 167 ++++++++++++++++++
>  .../wicket/jmx/wrapper/MarkupSettings.java      | 131 ++++++++++++++
>  .../apache/wicket/jmx/wrapper/PageSettings.java |  59 +++++++
>  .../jmx/wrapper/RequestCycleSettings.java       | 127 ++++++++++++++
>  .../wicket/jmx/wrapper/RequestLogger.java       | 168 ++++++++++++++++++
>  .../wicket/jmx/wrapper/ResourceSettings.java    | 165 ++++++++++++++++++
>  .../wicket/jmx/wrapper/SecuritySettings.java    |  68 ++++++++
>  .../wicket/jmx/wrapper/SessionSettings.java     |  58 +++++++
>  .../wicket/jmx/wrapper/StoreSettings.java       |  69 ++++++++
>  .../org/apache/wicket/jmx/wrapper/Stringz.java  |  25 +++
>  27 files changed, 1340 insertions(+), 1264 deletions(-)
> ----------------------------------------------------------------------
>
>
>
> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/pom.xml
> ----------------------------------------------------------------------
> diff --git a/wicket-jmx/pom.xml b/wicket-jmx/pom.xml
> index 9bc5a08..c58cb06 100644
> --- a/wicket-jmx/pom.xml
> +++ b/wicket-jmx/pom.xml
> @@ -32,6 +32,14 @@
>                         <groupId>org.apache.wicket</groupId>
>                         <artifactId>wicket-core</artifactId>
>                 </dependency>
> +               <dependency>
> +                       <groupId>cglib</groupId>
> +                       <artifactId>cglib</artifactId>
> +               </dependency>
> +<!--   <dependency>
> +                       <groupId>org.ow2.asm</groupId>
> +                       <artifactId>asm-util</artifactId>
> +               </dependency> -->
>         </dependencies>
>         <build>
>                 <pluginManagement>
>
>
> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/Application.java
> ----------------------------------------------------------------------
> diff --git
> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/Application.java
> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/Application.java
> deleted file mode 100644
> index 5eaa003..0000000
> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/Application.java
> +++ /dev/null
> @@ -1,113 +0,0 @@
> -/*
> - * Licensed to the Apache Software Foundation (ASF) under one or more
> - * contributor license agreements.  See the NOTICE file distributed with
> - * this work for additional information regarding copyright ownership.
> - * The ASF licenses this file to You under the Apache License, Version 2.0
> - * (the "License"); you may not use this file except in compliance with
> - * the License.  You may obtain a copy of the License at
> - *
> - *      http://www.apache.org/licenses/LICENSE-2.0
> - *
> - * Unless required by applicable law or agreed to in writing, software
> - * distributed under the License is distributed on an "AS IS" BASIS,
> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied.
> - * See the License for the specific language governing permissions and
> - * limitations under the License.
> - */
> -package org.apache.wicket.jmx;
> -
> -import java.io.IOException;
> -
> -import org.apache.wicket.ThreadContext;
> -
> -/**
> - * Exposes Application related functionality for JMX.
> - *
> - * @author eelcohillenius
> - */
> -public class Application implements ApplicationMBean
> -{
> -       private final org.apache.wicket.Application application;
> -
> -       /**
> -        * Create.
> -        *
> -        * @param application
> -        */
> -       public Application(final org.apache.wicket.Application application)
> -       {
> -               this.application = application;
> -       }
> -
> -       /**
> -        * @see org.apache.wicket.jmx.ApplicationMBean#clearMarkupCache()
> -        */
> -       @Override
> -       public void clearMarkupCache() throws IOException
> -       {
> -
> application.getMarkupSettings().getMarkupFactory().getMarkupCache().clear();
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.ApplicationMBean#getApplicationClass()
> -        */
> -       @Override
> -       public String getApplicationClass() throws IOException
> -       {
> -               return application.getClass().getName();
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.ApplicationMBean#getConfigurationType()
> -        */
> -       @Override
> -       public String getConfigurationType()
> -       {
> -               return application.getConfigurationType().name();
> -       }
> -
> -       /**
> -        * @see org.apache.wicket.jmx.ApplicationMBean#getHomePageClass()
> -        */
> -       @Override
> -       public String getHomePageClass() throws IOException
> -       {
> -               return application.getHomePage().getName();
> -       }
> -
> -       /**
> -        * @see org.apache.wicket.jmx.ApplicationMBean#getMarkupCacheSize()
> -        */
> -       @Override
> -       public int getMarkupCacheSize() throws IOException
> -       {
> -               ThreadContext.setApplication(application);
> -
> -               try
> -               {
> -                       return
> application.getMarkupSettings().getMarkupFactory().getMarkupCache().size();
> -               }
> -               finally
> -               {
> -                       ThreadContext.detach();
> -               }
> -       }
> -
> -       /**
> -        * @see org.apache.wicket.jmx.ApplicationMBean#getWicketVersion()
> -        */
> -       @Override
> -       public String getWicketVersion() throws IOException
> -       {
> -               return application.getFrameworkSettings().getVersion();
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.ApplicationMBean#clearLocalizerCache()
> -        */
> -       @Override
> -       public void clearLocalizerCache() throws IOException
> -       {
> -
> application.getResourceSettings().getLocalizer().clearCache();
> -       }
> -}
>
>
> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/ApplicationSettings.java
> ----------------------------------------------------------------------
> diff --git
> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/ApplicationSettings.java
> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/ApplicationSettings.java
> deleted file mode 100644
> index 52c8e0b..0000000
> ---
> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/ApplicationSettings.java
> +++ /dev/null
> @@ -1,101 +0,0 @@
> -/*
> - * Licensed to the Apache Software Foundation (ASF) under one or more
> - * contributor license agreements.  See the NOTICE file distributed with
> - * this work for additional information regarding copyright ownership.
> - * The ASF licenses this file to You under the Apache License, Version 2.0
> - * (the "License"); you may not use this file except in compliance with
> - * the License.  You may obtain a copy of the License at
> - *
> - *      http://www.apache.org/licenses/LICENSE-2.0
> - *
> - * Unless required by applicable law or agreed to in writing, software
> - * distributed under the License is distributed on an "AS IS" BASIS,
> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied.
> - * See the License for the specific language governing permissions and
> - * limitations under the License.
> - */
> -package org.apache.wicket.jmx;
> -
> -import org.apache.wicket.util.lang.Bytes;
> -import org.apache.wicket.util.lang.Classes;
> -
> -/**
> - * Exposes Application related functionality for JMX.
> - *
> - * @author eelcohillenius
> - */
> -public class ApplicationSettings implements ApplicationSettingsMBean
> -{
> -       private final org.apache.wicket.Application application;
> -
> -       /**
> -        * Create.
> -        *
> -        * @param application
> -        */
> -       public ApplicationSettings(final org.apache.wicket.Application
> application)
> -       {
> -               this.application = application;
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.ApplicationSettingsMBean#getAccessDeniedPage()
> -        */
> -       @Override
> -       public String getAccessDeniedPage()
> -       {
> -               return
> Classes.name(application.getApplicationSettings().getAccessDeniedPage());
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.ApplicationSettingsMBean#getClassResolver()
> -        */
> -       @Override
> -       public String getClassResolver()
> -       {
> -               return
> Stringz.className(application.getApplicationSettings().getClassResolver());
> -       }
> -
> -       @Override
> -       public String getDefaultMaximumUploadSize()
> -       {
> -               return
> application.getApplicationSettings().getDefaultMaximumUploadSize().toString();
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.ApplicationSettingsMBean#getInternalErrorPage()
> -        */
> -       @Override
> -       public String getInternalErrorPage()
> -       {
> -               return
> Classes.name(application.getApplicationSettings().getInternalErrorPage());
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.ApplicationSettingsMBean#getPageExpiredErrorPage()
> -        */
> -       @Override
> -       public String getPageExpiredErrorPage()
> -       {
> -               return
> Classes.name(application.getApplicationSettings().getPageExpiredErrorPage());
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.ApplicationSettingsMBean#getUnexpectedExceptionDisplay()
> -        */
> -       @Override
> -       public String getUnexpectedExceptionDisplay()
> -       {
> -               return
> application.getExceptionSettings().getUnexpectedExceptionDisplay().toString();
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.ApplicationSettingsMBean#setDefaultMaximumUploadSize(java.lang.String)
> -        */
> -       @Override
> -       public void setDefaultMaximumUploadSize(final String
> defaultUploadSize)
> -       {
> -
> application.getApplicationSettings().setDefaultMaximumUploadSize(
> -                       Bytes.valueOf(defaultUploadSize));
> -       }
> -}
>
>
> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/DebugSettings.java
> ----------------------------------------------------------------------
> diff --git
> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/DebugSettings.java
> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/DebugSettings.java
> deleted file mode 100644
> index 0055dcf..0000000
> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/DebugSettings.java
> +++ /dev/null
> @@ -1,164 +0,0 @@
> -/*
> - * Licensed to the Apache Software Foundation (ASF) under one or more
> - * contributor license agreements.  See the NOTICE file distributed with
> - * this work for additional information regarding copyright ownership.
> - * The ASF licenses this file to You under the Apache License, Version 2.0
> - * (the "License"); you may not use this file except in compliance with
> - * the License.  You may obtain a copy of the License at
> - *
> - *      http://www.apache.org/licenses/LICENSE-2.0
> - *
> - * Unless required by applicable law or agreed to in writing, software
> - * distributed under the License is distributed on an "AS IS" BASIS,
> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied.
> - * See the License for the specific language governing permissions and
> - * limitations under the License.
> - */
> -package org.apache.wicket.jmx;
> -
> -/**
> - * Exposes Application related functionality for JMX.
> - *
> - * @author eelcohillenius
> - */
> -public class DebugSettings implements DebugSettingsMBean
> -{
> -       private final org.apache.wicket.Application application;
> -
> -       /**
> -        * Create.
> -        *
> -        * @param application
> -        */
> -       public DebugSettings(final org.apache.wicket.Application
> application)
> -       {
> -               this.application = application;
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.DebugSettingsMBean#getComponentUseCheck()
> -        */
> -       @Override
> -       public boolean getComponentUseCheck()
> -       {
> -               return
> application.getDebugSettings().getComponentUseCheck();
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.DebugSettingsMBean#isAjaxDebugModeEnabled()
> -        */
> -       @Override
> -       public boolean isAjaxDebugModeEnabled()
> -       {
> -               return
> application.getDebugSettings().isAjaxDebugModeEnabled();
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.DebugSettingsMBean#setAjaxDebugModeEnabled(boolean)
> -        */
> -       @Override
> -       public void setAjaxDebugModeEnabled(final boolean enable)
> -       {
> -
> application.getDebugSettings().setAjaxDebugModeEnabled(enable);
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.DebugSettingsMBean#setComponentUseCheck(boolean)
> -        */
> -       @Override
> -       public void setComponentUseCheck(final boolean check)
> -       {
> -               application.getDebugSettings().setComponentUseCheck(check);
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.DebugSettingsMBean#setOutputComponentPath(boolean)
> -        */
> -       @Override
> -       public void setOutputComponentPath(final boolean enabled)
> -       {
> -
> application.getDebugSettings().setOutputComponentPath(enabled);
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.DebugSettingsMBean#isOutputComponentPath()
> -        */
> -       @Override
> -       public boolean isOutputComponentPath()
> -       {
> -               return
> application.getDebugSettings().isOutputComponentPath();
> -       }
> -
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.DebugSettingsMBean#setOutputMarkupContainerClassName(boolean)
> -        */
> -       @Override
> -       public void setOutputMarkupContainerClassName(final boolean enable)
> -       {
> -
> application.getDebugSettings().setOutputMarkupContainerClassName(enable);
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.DebugSettingsMBean#isOutputMarkupContainerClassName()
> -        */
> -       @Override
> -       public boolean isOutputMarkupContainerClassName()
> -       {
> -               return
> application.getDebugSettings().isOutputMarkupContainerClassName();
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.DebugSettingsMBean#isLinePreciseReportingOnAddComponentEnabled()
> -        */
> -       @Override
> -       public boolean isLinePreciseReportingOnAddComponentEnabled()
> -       {
> -               return
> application.getDebugSettings().isLinePreciseReportingOnAddComponentEnabled();
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.DebugSettingsMBean#setLinePreciseReportingOnAddComponentEnabled(boolean)
> -        */
> -       @Override
> -       public void setLinePreciseReportingOnAddComponentEnabled(final
> boolean enable)
> -       {
> -
> application.getDebugSettings().setLinePreciseReportingOnAddComponentEnabled(enable);
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.DebugSettingsMBean#isLinePreciseReportingOnNewComponentEnabled()
> -        */
> -       @Override
> -       public boolean isLinePreciseReportingOnNewComponentEnabled()
> -       {
> -               return
> application.getDebugSettings().isLinePreciseReportingOnNewComponentEnabled();
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.DebugSettingsMBean#setLinePreciseReportingOnNewComponentEnabled(boolean)
> -        */
> -       @Override
> -       public void setLinePreciseReportingOnNewComponentEnabled(final
> boolean enable)
> -       {
> -
> application.getDebugSettings().setLinePreciseReportingOnNewComponentEnabled(enable);
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.DebugSettingsMBean#setDevelopmentUtilitiesEnabled(boolean)
> -        */
> -       @Override
> -       public void setDevelopmentUtilitiesEnabled(final boolean enable)
> -       {
> -
> application.getDebugSettings().setDevelopmentUtilitiesEnabled(enable);
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.DebugSettingsMBean#isDevelopmentUtilitiesEnabled()
> -        */
> -       @Override
> -       public boolean isDevelopmentUtilitiesEnabled()
> -       {
> -               return
> application.getDebugSettings().isDevelopmentUtilitiesEnabled();
> -       }
> -}
>
>
> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/Initializer.java
> ----------------------------------------------------------------------
> diff --git
> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/Initializer.java
> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/Initializer.java
> index 77aaa2d..27f4c33 100644
> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/Initializer.java
> +++ b/wicket-jmx/src/main/java/org/apache/wicket/jmx/Initializer.java
> @@ -17,6 +17,7 @@
>  package org.apache.wicket.jmx;
>
>  import java.lang.management.ManagementFactory;
> +import java.lang.reflect.Method;
>  import java.util.ArrayList;
>  import java.util.List;
>
> @@ -29,8 +30,24 @@ import javax.management.MalformedObjectNameException;
>  import javax.management.NotCompliantMBeanException;
>  import javax.management.ObjectName;
>
> +import net.sf.cglib.core.DefaultNamingPolicy;
> +import net.sf.cglib.core.Predicate;
> +import net.sf.cglib.proxy.Enhancer;
> +
>  import org.apache.wicket.IInitializer;
> +import org.apache.wicket.ThreadContext;
>  import org.apache.wicket.WicketRuntimeException;
> +import org.apache.wicket.jmx.wrapper.Application;
> +import org.apache.wicket.jmx.wrapper.ApplicationSettings;
> +import org.apache.wicket.jmx.wrapper.DebugSettings;
> +import org.apache.wicket.jmx.wrapper.MarkupSettings;
> +import org.apache.wicket.jmx.wrapper.PageSettings;
> +import org.apache.wicket.jmx.wrapper.RequestCycleSettings;
> +import org.apache.wicket.jmx.wrapper.RequestLogger;
> +import org.apache.wicket.jmx.wrapper.ResourceSettings;
> +import org.apache.wicket.jmx.wrapper.SecuritySettings;
> +import org.apache.wicket.jmx.wrapper.SessionSettings;
> +import org.apache.wicket.jmx.wrapper.StoreSettings;
>  import org.slf4j.Logger;
>  import org.slf4j.LoggerFactory;
>
> @@ -172,30 +189,30 @@ public class Initializer implements IInitializer
>                         domain = tempDomain;
>
>                         Application appBean = new Application(application);
> -                       register(appBean, appBeanName);
> -
> -                       register(new ApplicationSettings(application), new
> ObjectName(domain +
> -
> ":type=Application,name=ApplicationSettings"));
> -                       register(new DebugSettings(application), new
> ObjectName(domain +
> -                               ":type=Application,name=DebugSettings"));
> -                       register(new MarkupSettings(application), new
> ObjectName(domain +
> -                               ":type=Application,name=MarkupSettings"));
> -                       register(new ResourceSettings(application), new
> ObjectName(domain +
> -
> ":type=Application,name=ResourceSettings"));
> -                       register(new PageSettings(application), new
> ObjectName(domain +
> -                               ":type=Application,name=PageSettings"));
> -                       register(new RequestCycleSettings(application),
> new ObjectName(domain +
> -
> ":type=Application,name=RequestCycleSettings"));
> -                       register(new SecuritySettings(application), new
> ObjectName(domain +
> -
> ":type=Application,name=SecuritySettings"));
> -                       register(new SessionSettings(application), new
> ObjectName(domain +
> -                               ":type=Application,name=SessionSettings"));
> -                       register(new StoreSettings(application), new
> ObjectName(domain +
> -                               ":type=Application,name=StoreSettings"));
> +                       register(application, appBean, appBeanName);
> +
> +                       register(application, new
> ApplicationSettings(application), new ObjectName(domain
> +                               +
> ":type=Application,name=ApplicationSettings"));
> +                       register(application, new
> DebugSettings(application), new ObjectName(domain
> +                               + ":type=Application,name=DebugSettings"));
> +                       register(application, new
> MarkupSettings(application), new ObjectName(domain
> +                               +
> ":type=Application,name=MarkupSettings"));
> +                       register(application, new
> ResourceSettings(application), new ObjectName(domain
> +                               +
> ":type=Application,name=ResourceSettings"));
> +                       register(application, new
> PageSettings(application), new ObjectName(domain
> +                               + ":type=Application,name=PageSettings"));
> +                       register(application, new
> RequestCycleSettings(application), new ObjectName(domain
> +                               +
> ":type=Application,name=RequestCycleSettings"));
> +                       register(application, new
> SecuritySettings(application), new ObjectName(domain
> +                               +
> ":type=Application,name=SecuritySettings"));
> +                       register(application, new
> SessionSettings(application), new ObjectName(domain
> +                               +
> ":type=Application,name=SessionSettings"));
> +                       register(application, new
> StoreSettings(application), new ObjectName(domain
> +                               + ":type=Application,name=StoreSettings"));
>
>                         RequestLogger sessionsBean = new
> RequestLogger(application);
>                         ObjectName sessionsBeanName = new
> ObjectName(domain + ":type=RequestLogger");
> -                       register(sessionsBean, sessionsBeanName);
> +                       register(application, sessionsBean,
> sessionsBeanName);
>                 }
>                 catch (MalformedObjectNameException e)
>                 {
> @@ -236,11 +253,55 @@ public class Initializer implements IInitializer
>          * @throws MBeanRegistrationException
>          * @throws InstanceAlreadyExistsException
>          */
> -       private void register(final Object o, final ObjectName objectName)
> -               throws InstanceAlreadyExistsException,
> MBeanRegistrationException,
> -               NotCompliantMBeanException
> +       private void register(final org.apache.wicket.Application
> application, final Object o,
> +               final ObjectName objectName) throws
> InstanceAlreadyExistsException,
> +               MBeanRegistrationException, NotCompliantMBeanException
>         {
> -               mbeanServer.registerMBean(o, objectName);
> +               Object proxy = createProxy(application, o);
> +               mbeanServer.registerMBean(proxy, objectName);
>                 registered.add(objectName);
>         }
> +
> +       private Object createProxy(final org.apache.wicket.Application
> application, final Object o)
> +       {
> +               Enhancer e = new Enhancer();
> +               e.setInterfaces(o.getClass().getInterfaces());
> +               e.setSuperclass(Object.class);
>

I'm sure you have tested it but the lines above look a bit weird.
In Wicket 7.x all XyzSettings classes are Java classes and just few of them
implement some interfaces.
I have to test it but I think the JMX runtime won't be able to list the
setters and getters of the MBean because the proxy has no knowledge of its
delegate.
The fix I have in mind is:  e.setSuperclass(o.getClass());


> +               e.setCallback(new net.sf.cglib.proxy.InvocationHandler()
> +               {
> +                       @Override
> +                       public Object invoke(Object proxy, Method method,
> Object[] args) throws Throwable
> +                       {
> +                               boolean existed = ThreadContext.exists();
> +
> +                               if (existed == false)
> +                               {
> +
> ThreadContext.setApplication(application);
> +                               }
> +
> +                               try
> +                               {
> +                                       return method.invoke(o, args);
> +                               }
> +                               finally
> +                               {
> +                                       if (existed == false)
> +                                       {
> +                                               ThreadContext.detach();
> +                                       }
> +                               }
> +                       }
> +               });
> +               e.setNamingPolicy(new DefaultNamingPolicy()
> +               {
> +                       @Override
> +                       public String getClassName(final String prefix,
> final String source, final Object key,
> +                               final Predicate names)
> +                       {
> +                               return
> o.getClass().getName().replace(".wrapper", "");
> +                       }
> +               });
> +
> +               return e.create();
> +       }
>  }
>
>
> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettings.java
> ----------------------------------------------------------------------
> diff --git
> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettings.java
> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettings.java
> deleted file mode 100644
> index efa6048..0000000
> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettings.java
> +++ /dev/null
> @@ -1,128 +0,0 @@
> -/*
> - * Licensed to the Apache Software Foundation (ASF) under one or more
> - * contributor license agreements.  See the NOTICE file distributed with
> - * this work for additional information regarding copyright ownership.
> - * The ASF licenses this file to You under the Apache License, Version 2.0
> - * (the "License"); you may not use this file except in compliance with
> - * the License.  You may obtain a copy of the License at
> - *
> - *      http://www.apache.org/licenses/LICENSE-2.0
> - *
> - * Unless required by applicable law or agreed to in writing, software
> - * distributed under the License is distributed on an "AS IS" BASIS,
> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied.
> - * See the License for the specific language governing permissions and
> - * limitations under the License.
> - */
> -package org.apache.wicket.jmx;
> -
> -
> -/**
> - * Exposes Application related functionality for JMX.
> - *
> - * @author eelcohillenius
> - */
> -public class MarkupSettings implements MarkupSettingsMBean
> -{
> -       private final org.apache.wicket.Application application;
> -
> -       /**
> -        * Create.
> -        *
> -        * @param application
> -        */
> -       public MarkupSettings(final org.apache.wicket.Application
> application)
> -       {
> -               this.application = application;
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.MarkupSettingsMBean#getAutomaticLinking()
> -        */
> -       @Override
> -       public boolean getAutomaticLinking()
> -       {
> -               return
> application.getMarkupSettings().getAutomaticLinking();
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.MarkupSettingsMBean#getCompressWhitespace()
> -        */
> -       @Override
> -       public boolean getCompressWhitespace()
> -       {
> -               return
> application.getMarkupSettings().getCompressWhitespace();
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.MarkupSettingsMBean#getDefaultMarkupEncoding()
> -        */
> -       @Override
> -       public String getDefaultMarkupEncoding()
> -       {
> -               return
> application.getMarkupSettings().getDefaultMarkupEncoding();
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.MarkupSettingsMBean#getStripComments()
> -        */
> -       @Override
> -       public boolean getStripComments()
> -       {
> -               return application.getMarkupSettings().getStripComments();
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.MarkupSettingsMBean#getStripWicketTags()
> -        */
> -       @Override
> -       public boolean getStripWicketTags()
> -       {
> -               return
> application.getMarkupSettings().getStripWicketTags();
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.MarkupSettingsMBean#setAutomaticLinking(boolean)
> -        */
> -       @Override
> -       public void setAutomaticLinking(final boolean automaticLinking)
> -       {
> -
> application.getMarkupSettings().setAutomaticLinking(automaticLinking);
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.MarkupSettingsMBean#setCompressWhitespace(boolean)
> -        */
> -       @Override
> -       public void setCompressWhitespace(final boolean compressWhitespace)
> -       {
> -
> application.getMarkupSettings().setCompressWhitespace(compressWhitespace);
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.MarkupSettingsMBean#setDefaultMarkupEncoding(java.lang.String)
> -        */
> -       @Override
> -       public void setDefaultMarkupEncoding(final String encoding)
> -       {
> -
> application.getMarkupSettings().setDefaultMarkupEncoding(encoding);
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.MarkupSettingsMBean#setStripComments(boolean)
> -        */
> -       @Override
> -       public void setStripComments(final boolean stripComments)
> -       {
> -
> application.getMarkupSettings().setStripComments(stripComments);
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.MarkupSettingsMBean#setStripWicketTags(boolean)
> -        */
> -       @Override
> -       public void setStripWicketTags(final boolean stripWicketTags)
> -       {
> -
> application.getMarkupSettings().setStripWicketTags(stripWicketTags);
> -       }
> -}
>
>
> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettingsMBean.java
> ----------------------------------------------------------------------
> diff --git
> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettingsMBean.java
> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettingsMBean.java
> index 91f2b23..df0d25d 100644
> ---
> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettingsMBean.java
> +++
> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/MarkupSettingsMBean.java
> @@ -16,6 +16,8 @@
>   */
>  package org.apache.wicket.jmx;
>
> +import org.apache.wicket.jmx.wrapper.MarkupSettings;
> +
>  /**
>   * Markup settings.
>   *
>
>
> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/PageSettings.java
> ----------------------------------------------------------------------
> diff --git
> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/PageSettings.java
> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/PageSettings.java
> deleted file mode 100644
> index b91b1e7..0000000
> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/PageSettings.java
> +++ /dev/null
> @@ -1,56 +0,0 @@
> -/*
> - * Licensed to the Apache Software Foundation (ASF) under one or more
> - * contributor license agreements.  See the NOTICE file distributed with
> - * this work for additional information regarding copyright ownership.
> - * The ASF licenses this file to You under the Apache License, Version 2.0
> - * (the "License"); you may not use this file except in compliance with
> - * the License.  You may obtain a copy of the License at
> - *
> - *      http://www.apache.org/licenses/LICENSE-2.0
> - *
> - * Unless required by applicable law or agreed to in writing, software
> - * distributed under the License is distributed on an "AS IS" BASIS,
> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied.
> - * See the License for the specific language governing permissions and
> - * limitations under the License.
> - */
> -package org.apache.wicket.jmx;
> -
> -
> -/**
> - * Exposes Application related functionality for JMX.
> - *
> - * @author eelcohillenius
> - */
> -public class PageSettings implements PageSettingsMBean
> -{
> -       private final org.apache.wicket.Application application;
> -
> -       /**
> -        * Create.
> -        *
> -        * @param application
> -        */
> -       public PageSettings(final org.apache.wicket.Application
> application)
> -       {
> -               this.application = application;
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.PageSettingsMBean#getVersionPagesByDefault()
> -        */
> -       @Override
> -       public boolean getVersionPagesByDefault()
> -       {
> -               return
> application.getPageSettings().getVersionPagesByDefault();
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.PageSettingsMBean#setVersionPagesByDefault(boolean)
> -        */
> -       @Override
> -       public void setVersionPagesByDefault(final boolean
> pagesVersionedByDefault)
> -       {
> -
> application.getPageSettings().setVersionPagesByDefault(pagesVersionedByDefault);
> -       }
> -}
>
>
> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestCycleSettings.java
> ----------------------------------------------------------------------
> diff --git
> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestCycleSettings.java
> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestCycleSettings.java
> deleted file mode 100644
> index 8815ee0..0000000
> ---
> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestCycleSettings.java
> +++ /dev/null
> @@ -1,125 +0,0 @@
> -/*
> - * Licensed to the Apache Software Foundation (ASF) under one or more
> - * contributor license agreements.  See the NOTICE file distributed with
> - * this work for additional information regarding copyright ownership.
> - * The ASF licenses this file to You under the Apache License, Version 2.0
> - * (the "License"); you may not use this file except in compliance with
> - * the License.  You may obtain a copy of the License at
> - *
> - *      http://www.apache.org/licenses/LICENSE-2.0
> - *
> - * Unless required by applicable law or agreed to in writing, software
> - * distributed under the License is distributed on an "AS IS" BASIS,
> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied.
> - * See the License for the specific language governing permissions and
> - * limitations under the License.
> - */
> -package org.apache.wicket.jmx;
> -
> -import org.apache.wicket.util.time.Duration;
> -
> -
> -/**
> - * Exposes Application related functionality for JMX.
> - *
> - * @author eelcohillenius
> - */
> -public class RequestCycleSettings implements RequestCycleSettingsMBean
> -{
> -       private final org.apache.wicket.Application application;
> -
> -       /**
> -        * Create.
> -        *
> -        * @param application
> -        */
> -       public RequestCycleSettings(final org.apache.wicket.Application
> application)
> -       {
> -               this.application = application;
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.RequestCycleSettingsMBean#getBufferResponse()
> -        */
> -       @Override
> -       public boolean getBufferResponse()
> -       {
> -               return
> application.getRequestCycleSettings().getBufferResponse();
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.RequestCycleSettingsMBean#getGatherExtendedBrowserInfo()
> -        */
> -       @Override
> -       public boolean getGatherExtendedBrowserInfo()
> -       {
> -               return
> application.getRequestCycleSettings().getGatherExtendedBrowserInfo();
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.RequestCycleSettingsMBean#getResponseRequestEncoding()
> -        */
> -       @Override
> -       public String getResponseRequestEncoding()
> -       {
> -               return
> application.getRequestCycleSettings().getResponseRequestEncoding();
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.RequestCycleSettingsMBean#getTimeout()
> -        */
> -       @Override
> -       public String getTimeout()
> -       {
> -               return
> application.getRequestCycleSettings().getTimeout().toString();
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.RequestCycleSettingsMBean#setBufferResponse(boolean)
> -        */
> -       @Override
> -       public void setBufferResponse(final boolean bufferResponse)
> -       {
> -
> application.getRequestCycleSettings().setBufferResponse(bufferResponse);
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.RequestCycleSettingsMBean#setGatherExtendedBrowserInfo(boolean)
> -        */
> -       @Override
> -       public void setGatherExtendedBrowserInfo(final boolean
> gatherExtendedBrowserInfo)
> -       {
> -
> application.getRequestCycleSettings().setGatherExtendedBrowserInfo(
> -                       gatherExtendedBrowserInfo);
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.RequestCycleSettingsMBean#setResponseRequestEncoding(java.lang.String)
> -        */
> -       @Override
> -       public void setResponseRequestEncoding(final String
> responseRequestEncoding)
> -       {
> -
> application.getRequestCycleSettings().setResponseRequestEncoding(responseRequestEncoding);
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.RequestCycleSettingsMBean#setTimeout(java.lang.String)
> -        */
> -       @Override
> -       public void setTimeout(final String timeout)
> -       {
> -
> application.getRequestCycleSettings().setTimeout(Duration.valueOf(timeout));
> -       }
> -
> -       @Override
> -       public void setExceptionRetryCount(int retries)
> -       {
> -
> application.getRequestCycleSettings().setExceptionRetryCount(retries);
> -       }
> -
> -       @Override
> -       public int getExceptionRetryCount()
> -       {
> -               return
> application.getRequestCycleSettings().getExceptionRetryCount();
> -       }
> -}
>
>
> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestLogger.java
> ----------------------------------------------------------------------
> diff --git
> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestLogger.java
> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestLogger.java
> deleted file mode 100644
> index 28ec4cf..0000000
> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestLogger.java
> +++ /dev/null
> @@ -1,166 +0,0 @@
> -/*
> - * Licensed to the Apache Software Foundation (ASF) under one or more
> - * contributor license agreements.  See the NOTICE file distributed with
> - * this work for additional information regarding copyright ownership.
> - * The ASF licenses this file to You under the Apache License, Version 2.0
> - * (the "License"); you may not use this file except in compliance with
> - * the License.  You may obtain a copy of the License at
> - *
> - *      http://www.apache.org/licenses/LICENSE-2.0
> - *
> - * Unless required by applicable law or agreed to in writing, software
> - * distributed under the License is distributed on an "AS IS" BASIS,
> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied.
> - * See the License for the specific language governing permissions and
> - * limitations under the License.
> - */
> -package org.apache.wicket.jmx;
> -
> -import java.io.IOException;
> -
> -import org.apache.wicket.protocol.http.WebApplication;
> -
> -
> -/**
> - * Exposes {@link org.apache.wicket.protocol.http.RequestLogger} for JMX.
> - *
> - * @author eelcohillenius
> - */
> -public class RequestLogger implements RequestLoggerMBean
> -{
> -       private final org.apache.wicket.Application application;
> -
> -       private final WebApplication webApplication;
> -
> -       /**
> -        * Construct.
> -        *
> -        * @param application
> -        *            The application
> -        */
> -       public RequestLogger(final org.apache.wicket.Application
> application)
> -       {
> -               this.application = application;
> -
> -               // do this so that we don't have to cast all the time
> -               if (application instanceof WebApplication)
> -               {
> -                       webApplication = (WebApplication)application;
> -               }
> -               else
> -               {
> -                       webApplication = null;
> -               }
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.RequestLoggerMBean#getNumberOfCreatedSessions()
> -        */
> -       @Override
> -       public Integer getNumberOfCreatedSessions() throws IOException
> -       {
> -               org.apache.wicket.protocol.http.IRequestLogger logger =
> getRequestLogger();
> -               if (logger != null)
> -               {
> -                       return logger.getTotalCreatedSessions();
> -               }
> -               return null;
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.RequestLoggerMBean#getNumberOfLiveSessions()
> -        */
> -       @Override
> -       public Integer getNumberOfLiveSessions() throws IOException
> -       {
> -               org.apache.wicket.protocol.http.IRequestLogger logger =
> getRequestLogger();
> -               if (logger != null)
> -               {
> -                       return logger.getLiveSessions().length;
> -               }
> -               return null;
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.RequestLoggerMBean#getPeakNumberOfSessions()
> -        */
> -       @Override
> -       public Integer getPeakNumberOfSessions() throws IOException
> -       {
> -               org.apache.wicket.protocol.http.IRequestLogger logger =
> getRequestLogger();
> -               if (logger != null)
> -               {
> -                       return logger.getPeakSessions();
> -               }
> -               return null;
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.RequestLoggerMBean#getNumberOfCurrentActiveRequests()
> -        */
> -       @Override
> -       public Integer getNumberOfCurrentActiveRequests() throws
> IOException
> -       {
> -               org.apache.wicket.protocol.http.IRequestLogger logger =
> getRequestLogger();
> -               if (logger != null)
> -               {
> -                       return
> Integer.valueOf(logger.getCurrentActiveRequestCount());
> -               }
> -               return null;
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.RequestLoggerMBean#getPeakNumberOfActiveRequests()
> -        */
> -       @Override
> -       public Integer getPeakNumberOfActiveRequests() throws IOException
> -       {
> -               org.apache.wicket.protocol.http.IRequestLogger logger =
> getRequestLogger();
> -               if (logger != null)
> -               {
> -                       return
> Integer.valueOf(logger.getPeakActiveRequestCount());
> -               }
> -               return null;
> -       }
> -
> -       /**
> -        * @see org.apache.wicket.jmx.RequestLoggerMBean#restart()
> -        */
> -       @Override
> -       public void restart() throws IOException
> -       {
> -               if (webApplication != null)
> -               {
> -
> webApplication.getRequestLoggerSettings().setRequestLoggerEnabled(false);
> -                       webApplication.getRequestLogger();
> -
> webApplication.getRequestLoggerSettings().setRequestLoggerEnabled(true);
> -               }
> -       }
> -
> -       /**
> -        * @see org.apache.wicket.jmx.RequestLoggerMBean#stop()
> -        */
> -       @Override
> -       public void stop() throws IOException
> -       {
> -               if (webApplication != null)
> -               {
> -
> webApplication.getRequestLoggerSettings().setRequestLoggerEnabled(false);
> -               }
> -       }
> -
> -       /**
> -        * Gets the request logger for this application.
> -        *
> -        * @return The request logger or null if no request is active, or
> if this is not a web
> -        *         application
> -        */
> -       protected org.apache.wicket.protocol.http.IRequestLogger
> getRequestLogger()
> -       {
> -               if (application instanceof WebApplication)
> -               {
> -                       return application.getRequestLogger();
> -               }
> -               return null;
> -       }
> -}
>
>
> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/ResourceSettings.java
> ----------------------------------------------------------------------
> diff --git
> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/ResourceSettings.java
> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/ResourceSettings.java
> deleted file mode 100644
> index af7f60d..0000000
> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/ResourceSettings.java
> +++ /dev/null
> @@ -1,173 +0,0 @@
> -/*
> - * Licensed to the Apache Software Foundation (ASF) under one or more
> - * contributor license agreements.  See the NOTICE file distributed with
> - * this work for additional information regarding copyright ownership.
> - * The ASF licenses this file to You under the Apache License, Version 2.0
> - * (the "License"); you may not use this file except in compliance with
> - * the License.  You may obtain a copy of the License at
> - *
> - *      http://www.apache.org/licenses/LICENSE-2.0
> - *
> - * Unless required by applicable law or agreed to in writing, software
> - * distributed under the License is distributed on an "AS IS" BASIS,
> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied.
> - * See the License for the specific language governing permissions and
> - * limitations under the License.
> - */
> -package org.apache.wicket.jmx;
> -
> -import java.util.List;
> -
> -import org.apache.wicket.ThreadContext;
> -import org.apache.wicket.resource.loader.IStringResourceLoader;
> -import org.apache.wicket.util.file.IResourceFinder;
> -import org.apache.wicket.util.lang.Generics;
> -import org.apache.wicket.util.time.Duration;
> -
> -
> -/**
> - * Exposes Application related functionality for JMX.
> - *
> - * @author eelcohillenius
> - */
> -public class ResourceSettings implements ResourceSettingsMBean
> -{
> -       private final org.apache.wicket.Application application;
> -
> -       /**
> -        * Create.
> -        *
> -        * @param application
> -        */
> -       public ResourceSettings(final org.apache.wicket.Application
> application)
> -       {
> -               this.application = application;
> -       }
> -
> -       /**
> -        * {@inheritDoc}
> -        */
> -       @Override
> -       public String getLocalizer()
> -       {
> -               return
> Stringz.className(application.getResourceSettings().getLocalizer());
> -       }
> -
> -       /**
> -        * {@inheritDoc}
> -        */
> -       @Override
> -       public String getPackageResourceGuard()
> -       {
> -               return
> Stringz.className(application.getResourceSettings().getPackageResourceGuard());
> -       }
> -
> -       /**
> -        * {@inheritDoc}
> -        */
> -       @Override
> -       public String getPropertiesFactory()
> -       {
> -               ThreadContext.setApplication(application);
> -
> -               try
> -               {
> -                       return
> Stringz.className(application.getResourceSettings().getPropertiesFactory());
> -               }
> -               finally
> -               {
> -                       ThreadContext.detach();
> -               }
> -       }
> -
> -       /**
> -        * {@inheritDoc}
> -        */
> -       @Override
> -       public String getResourceFinders()
> -       {
> -               StringBuilder builder = new StringBuilder();
> -               for (IResourceFinder rf :
> application.getResourceSettings().getResourceFinders())
> -               {
> -                       builder.append(Stringz.className(rf));
> -               }
> -               return builder.toString();
> -       }
> -
> -       /**
> -        * {@inheritDoc}
> -        */
> -       @Override
> -       public String getResourcePollFrequency()
> -       {
> -               Duration duration =
> application.getResourceSettings().getResourcePollFrequency();
> -               return (duration != null) ? duration.toString() : null;
> -       }
> -
> -       /**
> -        * {@inheritDoc}
> -        */
> -       @Override
> -       public String getResourceStreamLocator()
> -       {
> -               return
> Stringz.className(application.getResourceSettings().getResourceStreamLocator());
> -       }
> -
> -       /**
> -        * {@inheritDoc}
> -        */
> -       @Override
> -       public String[] getStringResourceLoaders()
> -       {
> -               List<IStringResourceLoader> loaders =
> application.getResourceSettings()
> -                       .getStringResourceLoaders();
> -               if (loaders != null)
> -               {
> -                       List<String> list = Generics.newArrayList();
> -                       for (Object loader : loaders)
> -                       {
> -                               list.add(loader.toString());
> -                       }
> -                       return list.toArray(new String[loaders.size()]);
> -               }
> -               return null;
> -       }
> -
> -       /**
> -        * {@inheritDoc}
> -        */
> -       @Override
> -       public boolean getThrowExceptionOnMissingResource()
> -       {
> -               return
> application.getResourceSettings().getThrowExceptionOnMissingResource();
> -       }
> -
> -       /**
> -        * {@inheritDoc}
> -        */
> -       @Override
> -       public boolean getUseDefaultOnMissingResource()
> -       {
> -               return
> application.getResourceSettings().getUseDefaultOnMissingResource();
> -       }
> -
> -       /**
> -        * {@inheritDoc}
> -        */
> -       @Override
> -       public void setThrowExceptionOnMissingResource(final boolean
> throwExceptionOnMissingResource)
> -       {
> -
> application.getResourceSettings().setThrowExceptionOnMissingResource(
> -                       throwExceptionOnMissingResource);
> -       }
> -
> -       /**
> -        * {@inheritDoc}
> -        */
> -       @Override
> -       public void setUseDefaultOnMissingResource(final boolean
> useDefaultOnMissingResource)
> -       {
> -
> application.getResourceSettings().setUseDefaultOnMissingResource(
> -                       useDefaultOnMissingResource);
> -       }
> -}
>
>
> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/SecuritySettings.java
> ----------------------------------------------------------------------
> diff --git
> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/SecuritySettings.java
> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/SecuritySettings.java
> deleted file mode 100644
> index be89017..0000000
> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/SecuritySettings.java
> +++ /dev/null
> @@ -1,65 +0,0 @@
> -/*
> - * Licensed to the Apache Software Foundation (ASF) under one or more
> - * contributor license agreements.  See the NOTICE file distributed with
> - * this work for additional information regarding copyright ownership.
> - * The ASF licenses this file to You under the Apache License, Version 2.0
> - * (the "License"); you may not use this file except in compliance with
> - * the License.  You may obtain a copy of the License at
> - *
> - *      http://www.apache.org/licenses/LICENSE-2.0
> - *
> - * Unless required by applicable law or agreed to in writing, software
> - * distributed under the License is distributed on an "AS IS" BASIS,
> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied.
> - * See the License for the specific language governing permissions and
> - * limitations under the License.
> - */
> -package org.apache.wicket.jmx;
> -
> -/**
> - * Exposes Application related functionality for JMX.
> - *
> - * @author eelcohillenius
> - */
> -public class SecuritySettings implements SecuritySettingsMBean
> -{
> -       private final org.apache.wicket.Application application;
> -
> -       /**
> -        * Create.
> -        *
> -        * @param application
> -        */
> -       public SecuritySettings(final org.apache.wicket.Application
> application)
> -       {
> -               this.application = application;
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.SecuritySettingsMBean#getAuthorizationStrategy()
> -        */
> -       @Override
> -       public String getAuthorizationStrategy()
> -       {
> -               return
> Stringz.className(application.getSecuritySettings().getAuthorizationStrategy());
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.SecuritySettingsMBean#getCryptFactory()
> -        */
> -       @Override
> -       public String getCryptFactory()
> -       {
> -               return
> Stringz.className(application.getSecuritySettings().getCryptFactory());
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.SecuritySettingsMBean#getUnauthorizedComponentInstantiationListener()
> -        */
> -       @Override
> -       public String getUnauthorizedComponentInstantiationListener()
> -       {
> -               return Stringz.className(application.getSecuritySettings()
> -                       .getUnauthorizedComponentInstantiationListener());
> -       }
> -}
>
>
> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/SessionSettings.java
> ----------------------------------------------------------------------
> diff --git
> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/SessionSettings.java
> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/SessionSettings.java
> deleted file mode 100644
> index 6c15ab3..0000000
> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/SessionSettings.java
> +++ /dev/null
> @@ -1,55 +0,0 @@
> -/*
> - * Licensed to the Apache Software Foundation (ASF) under one or more
> - * contributor license agreements.  See the NOTICE file distributed with
> - * this work for additional information regarding copyright ownership.
> - * The ASF licenses this file to You under the Apache License, Version 2.0
> - * (the "License"); you may not use this file except in compliance with
> - * the License.  You may obtain a copy of the License at
> - *
> - *      http://www.apache.org/licenses/LICENSE-2.0
> - *
> - * Unless required by applicable law or agreed to in writing, software
> - * distributed under the License is distributed on an "AS IS" BASIS,
> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied.
> - * See the License for the specific language governing permissions and
> - * limitations under the License.
> - */
> -package org.apache.wicket.jmx;
> -
> -/**
> - * Exposes Application related functionality for JMX.
> - *
> - * @author eelcohillenius
> - */
> -public class SessionSettings implements SessionSettingsMBean
> -{
> -       private final org.apache.wicket.Application application;
> -
> -       /**
> -        * Create.
> -        *
> -        * @param application
> -        */
> -       public SessionSettings(final org.apache.wicket.Application
> application)
> -       {
> -               this.application = application;
> -       }
> -
> -       /**
> -        * @see org.apache.wicket.jmx.SessionSettingsMBean#getPageFactory()
> -        */
> -       @Override
> -       public String getPageFactory()
> -       {
> -               return Stringz.className(application.getPageFactory());
> -       }
> -
> -       /**
> -        * @see
> org.apache.wicket.jmx.SessionSettingsMBean#getSessionStore()
> -        */
> -       @Override
> -       public String getSessionStore()
> -       {
> -               return Stringz.className(application.getSessionStore());
> -       }
> -}
>
>
> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/StoreSettings.java
> ----------------------------------------------------------------------
> diff --git
> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/StoreSettings.java
> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/StoreSettings.java
> deleted file mode 100644
> index 4705f3f..0000000
> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/StoreSettings.java
> +++ /dev/null
> @@ -1,68 +0,0 @@
> -/*
> - * Licensed to the Apache Software Foundation (ASF) under one or more
> - * contributor license agreements.  See the NOTICE file distributed with
> - * this work for additional information regarding copyright ownership.
> - * The ASF licenses this file to You under the Apache License, Version 2.0
> - * (the "License"); you may not use this file except in compliance with
> - * the License.  You may obtain a copy of the License at
> - *
> - *      http://www.apache.org/licenses/LICENSE-2.0
> - *
> - * Unless required by applicable law or agreed to in writing, software
> - * distributed under the License is distributed on an "AS IS" BASIS,
> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied.
> - * See the License for the specific language governing permissions and
> - * limitations under the License.
> - */
> -package org.apache.wicket.jmx;
> -
> -import org.apache.wicket.Application;
> -
> -/**
> - * Exposes Application's StoreSettings for JMX.
> - */
> -public class StoreSettings implements StoreSettingsMBean
> -{
> -       private final Application application;
> -
> -       /**
> -        * Construct.
> -        *
> -        * @param application
> -        */
> -       public StoreSettings(final Application application)
> -       {
> -               this.application = application;
> -       }
> -
> -       @Override
> -       public int getInmemoryCacheSize()
> -       {
> -               return
> application.getStoreSettings().getInmemoryCacheSize();
> -       }
> -
> -       @Override
> -       public long getMaxSizePerSession()
> -       {
> -               return
> application.getStoreSettings().getMaxSizePerSession().bytes();
> -       }
> -
> -       @Override
> -       public String getFileStoreFolder()
> -       {
> -               return
> application.getStoreSettings().getFileStoreFolder().getAbsolutePath();
> -       }
> -
> -       @Override
> -       public int getAsynchronousQueueCapacity()
> -       {
> -               return
> application.getStoreSettings().getAsynchronousQueueCapacity();
> -       }
> -
> -       @Override
> -       public boolean isAsynchronous()
> -       {
> -               return application.getStoreSettings().isAsynchronous();
> -       }
> -
> -}
>
>
> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/Stringz.java
> ----------------------------------------------------------------------
> diff --git a/wicket-jmx/src/main/java/org/apache/wicket/jmx/Stringz.java
> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/Stringz.java
> deleted file mode 100644
> index f9f6381..0000000
> --- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/Stringz.java
> +++ /dev/null
> @@ -1,25 +0,0 @@
> -/*
> - * Licensed to the Apache Software Foundation (ASF) under one or more
> - * contributor license agreements.  See the NOTICE file distributed with
> - * this work for additional information regarding copyright ownership.
> - * The ASF licenses this file to You under the Apache License, Version 2.0
> - * (the "License"); you may not use this file except in compliance with
> - * the License.  You may obtain a copy of the License at
> - *
> - *      http://www.apache.org/licenses/LICENSE-2.0
> - *
> - * Unless required by applicable law or agreed to in writing, software
> - * distributed under the License is distributed on an "AS IS" BASIS,
> - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied.
> - * See the License for the specific language governing permissions and
> - * limitations under the License.
> - */
> -package org.apache.wicket.jmx;
> -
> -class Stringz
> -{
> -       static String className(final Object o)
> -       {
> -               return (o != null) ? o.getClass().getName() : null;
> -       }
> -}
>
>
> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/Application.java
> ----------------------------------------------------------------------
> diff --git
> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/Application.java
> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/Application.java
> new file mode 100644
> index 0000000..56e0eff
> --- /dev/null
> +++
> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/Application.java
> @@ -0,0 +1,104 @@
> +/*
> + * Licensed to the Apache Software Foundation (ASF) under one or more
> + * contributor license agreements.  See the NOTICE file distributed with
> + * this work for additional information regarding copyright ownership.
> + * The ASF licenses this file to You under the Apache License, Version 2.0
> + * (the "License"); you may not use this file except in compliance with
> + * the License.  You may obtain a copy of the License at
> + *
> + *      http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing, software
> + * distributed under the License is distributed on an "AS IS" BASIS,
> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied.
> + * See the License for the specific language governing permissions and
> + * limitations under the License.
> + */
> +package org.apache.wicket.jmx.wrapper;
> +
> +import java.io.IOException;
> +
> +import org.apache.wicket.jmx.ApplicationMBean;
> +
> +/**
> + * Exposes Application related functionality for JMX.
> + *
> + * @author eelcohillenius
> + */
> +public class Application implements ApplicationMBean
> +{
> +       private final org.apache.wicket.Application application;
> +
> +       /**
> +        * Create.
> +        *
> +        * @param application
> +        */
> +       public Application(final org.apache.wicket.Application application)
> +       {
> +               this.application = application;
> +       }
> +
> +       /**
> +        * @see org.apache.wicket.jmx.ApplicationMBean#clearMarkupCache()
> +        */
> +       @Override
> +       public void clearMarkupCache() throws IOException
> +       {
> +
> application.getMarkupSettings().getMarkupFactory().getMarkupCache().clear();
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.ApplicationMBean#getApplicationClass()
> +        */
> +       @Override
> +       public String getApplicationClass() throws IOException
> +       {
> +               return application.getClass().getName();
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.ApplicationMBean#getConfigurationType()
> +        */
> +       @Override
> +       public String getConfigurationType()
> +       {
> +               return application.getConfigurationType().name();
> +       }
> +
> +       /**
> +        * @see org.apache.wicket.jmx.ApplicationMBean#getHomePageClass()
> +        */
> +       @Override
> +       public String getHomePageClass() throws IOException
> +       {
> +               return application.getHomePage().getName();
> +       }
> +
> +       /**
> +        * @see org.apache.wicket.jmx.ApplicationMBean#getMarkupCacheSize()
> +        */
> +       @Override
> +       public int getMarkupCacheSize() throws IOException
> +       {
> +               return
> application.getMarkupSettings().getMarkupFactory().getMarkupCache().size();
> +       }
> +
> +       /**
> +        * @see org.apache.wicket.jmx.ApplicationMBean#getWicketVersion()
> +        */
> +       @Override
> +       public String getWicketVersion() throws IOException
> +       {
> +               return application.getFrameworkSettings().getVersion();
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.ApplicationMBean#clearLocalizerCache()
> +        */
> +       @Override
> +       public void clearLocalizerCache() throws IOException
> +       {
> +
> application.getResourceSettings().getLocalizer().clearCache();
> +       }
> +}
>
>
> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/ApplicationSettings.java
> ----------------------------------------------------------------------
> diff --git
> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/ApplicationSettings.java
> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/ApplicationSettings.java
> new file mode 100644
> index 0000000..a6a0d4c
> --- /dev/null
> +++
> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/ApplicationSettings.java
> @@ -0,0 +1,103 @@
> +/*
> + * Licensed to the Apache Software Foundation (ASF) under one or more
> + * contributor license agreements.  See the NOTICE file distributed with
> + * this work for additional information regarding copyright ownership.
> + * The ASF licenses this file to You under the Apache License, Version 2.0
> + * (the "License"); you may not use this file except in compliance with
> + * the License.  You may obtain a copy of the License at
> + *
> + *      http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing, software
> + * distributed under the License is distributed on an "AS IS" BASIS,
> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied.
> + * See the License for the specific language governing permissions and
> + * limitations under the License.
> + */
> +package org.apache.wicket.jmx.wrapper;
> +
> +import org.apache.wicket.Application;
> +import org.apache.wicket.jmx.ApplicationSettingsMBean;
> +import org.apache.wicket.util.lang.Bytes;
> +import org.apache.wicket.util.lang.Classes;
> +
> +/**
> + * Exposes Application related functionality for JMX.
> + *
> + * @author eelcohillenius
> + */
> +public class ApplicationSettings implements ApplicationSettingsMBean
> +{
> +       private final Application application;
> +
> +       /**
> +        * Create.
> +        *
> +        * @param application
> +        */
> +       public ApplicationSettings(final Application application)
> +       {
> +               this.application = application;
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.ApplicationSettingsMBean#getAccessDeniedPage()
> +        */
> +       @Override
> +       public String getAccessDeniedPage()
> +       {
> +               return
> Classes.name(application.getApplicationSettings().getAccessDeniedPage());
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.ApplicationSettingsMBean#getClassResolver()
> +        */
> +       @Override
> +       public String getClassResolver()
> +       {
> +               return
> Stringz.className(application.getApplicationSettings().getClassResolver());
> +       }
> +
> +       @Override
> +       public String getDefaultMaximumUploadSize()
> +       {
> +               return
> application.getApplicationSettings().getDefaultMaximumUploadSize().toString();
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.ApplicationSettingsMBean#getInternalErrorPage()
> +        */
> +       @Override
> +       public String getInternalErrorPage()
> +       {
> +               return
> Classes.name(application.getApplicationSettings().getInternalErrorPage());
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.ApplicationSettingsMBean#getPageExpiredErrorPage()
> +        */
> +       @Override
> +       public String getPageExpiredErrorPage()
> +       {
> +               return
> Classes.name(application.getApplicationSettings().getPageExpiredErrorPage());
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.ApplicationSettingsMBean#getUnexpectedExceptionDisplay()
> +        */
> +       @Override
> +       public String getUnexpectedExceptionDisplay()
> +       {
> +               return
> application.getExceptionSettings().getUnexpectedExceptionDisplay().toString();
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.ApplicationSettingsMBean#setDefaultMaximumUploadSize(java.lang.String)
> +        */
> +       @Override
> +       public void setDefaultMaximumUploadSize(final String
> defaultUploadSize)
> +       {
> +
> application.getApplicationSettings().setDefaultMaximumUploadSize(
> +                       Bytes.valueOf(defaultUploadSize));
> +       }
> +}
>
>
> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/DebugSettings.java
> ----------------------------------------------------------------------
> diff --git
> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/DebugSettings.java
> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/DebugSettings.java
> new file mode 100644
> index 0000000..fcd073a
> --- /dev/null
> +++
> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/DebugSettings.java
> @@ -0,0 +1,167 @@
> +/*
> + * Licensed to the Apache Software Foundation (ASF) under one or more
> + * contributor license agreements.  See the NOTICE file distributed with
> + * this work for additional information regarding copyright ownership.
> + * The ASF licenses this file to You under the Apache License, Version 2.0
> + * (the "License"); you may not use this file except in compliance with
> + * the License.  You may obtain a copy of the License at
> + *
> + *      http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing, software
> + * distributed under the License is distributed on an "AS IS" BASIS,
> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied.
> + * See the License for the specific language governing permissions and
> + * limitations under the License.
> + */
> +package org.apache.wicket.jmx.wrapper;
> +
> +import org.apache.wicket.Application;
> +import org.apache.wicket.jmx.DebugSettingsMBean;
> +
> +/**
> + * Exposes Application related functionality for JMX.
> + *
> + * @author eelcohillenius
> + */
> +public class DebugSettings implements DebugSettingsMBean
> +{
> +       private final Application application;
> +
> +       /**
> +        * Create.
> +        *
> +        * @param application
> +        */
> +       public DebugSettings(final Application application)
> +       {
> +               this.application = application;
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.DebugSettingsMBean#getComponentUseCheck()
> +        */
> +       @Override
> +       public boolean getComponentUseCheck()
> +       {
> +               return
> application.getDebugSettings().getComponentUseCheck();
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.DebugSettingsMBean#isAjaxDebugModeEnabled()
> +        */
> +       @Override
> +       public boolean isAjaxDebugModeEnabled()
> +       {
> +               return
> application.getDebugSettings().isAjaxDebugModeEnabled();
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.DebugSettingsMBean#setAjaxDebugModeEnabled(boolean)
> +        */
> +       @Override
> +       public void setAjaxDebugModeEnabled(final boolean enable)
> +       {
> +
> application.getDebugSettings().setAjaxDebugModeEnabled(enable);
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.DebugSettingsMBean#setComponentUseCheck(boolean)
> +        */
> +       @Override
> +       public void setComponentUseCheck(final boolean check)
> +       {
> +               application.getDebugSettings().setComponentUseCheck(check);
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.DebugSettingsMBean#setOutputComponentPath(boolean)
> +        */
> +       @Override
> +       public void setOutputComponentPath(final boolean enabled)
> +       {
> +
> application.getDebugSettings().setOutputComponentPath(enabled);
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.DebugSettingsMBean#isOutputComponentPath()
> +        */
> +       @Override
> +       public boolean isOutputComponentPath()
> +       {
> +               return
> application.getDebugSettings().isOutputComponentPath();
> +       }
> +
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.DebugSettingsMBean#setOutputMarkupContainerClassName(boolean)
> +        */
> +       @Override
> +       public void setOutputMarkupContainerClassName(final boolean enable)
> +       {
> +
> application.getDebugSettings().setOutputMarkupContainerClassName(enable);
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.DebugSettingsMBean#isOutputMarkupContainerClassName()
> +        */
> +       @Override
> +       public boolean isOutputMarkupContainerClassName()
> +       {
> +               return
> application.getDebugSettings().isOutputMarkupContainerClassName();
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.DebugSettingsMBean#isLinePreciseReportingOnAddComponentEnabled()
> +        */
> +       @Override
> +       public boolean isLinePreciseReportingOnAddComponentEnabled()
> +       {
> +               return
> application.getDebugSettings().isLinePreciseReportingOnAddComponentEnabled();
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.DebugSettingsMBean#setLinePreciseReportingOnAddComponentEnabled(boolean)
> +        */
> +       @Override
> +       public void setLinePreciseReportingOnAddComponentEnabled(final
> boolean enable)
> +       {
> +
> application.getDebugSettings().setLinePreciseReportingOnAddComponentEnabled(enable);
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.DebugSettingsMBean#isLinePreciseReportingOnNewComponentEnabled()
> +        */
> +       @Override
> +       public boolean isLinePreciseReportingOnNewComponentEnabled()
> +       {
> +               return
> application.getDebugSettings().isLinePreciseReportingOnNewComponentEnabled();
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.DebugSettingsMBean#setLinePreciseReportingOnNewComponentEnabled(boolean)
> +        */
> +       @Override
> +       public void setLinePreciseReportingOnNewComponentEnabled(final
> boolean enable)
> +       {
> +
> application.getDebugSettings().setLinePreciseReportingOnNewComponentEnabled(enable);
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.DebugSettingsMBean#setDevelopmentUtilitiesEnabled(boolean)
> +        */
> +       @Override
> +       public void setDevelopmentUtilitiesEnabled(final boolean enable)
> +       {
> +
> application.getDebugSettings().setDevelopmentUtilitiesEnabled(enable);
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.DebugSettingsMBean#isDevelopmentUtilitiesEnabled()
> +        */
> +       @Override
> +       public boolean isDevelopmentUtilitiesEnabled()
> +       {
> +               return
> application.getDebugSettings().isDevelopmentUtilitiesEnabled();
> +       }
> +}
>
>
> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/MarkupSettings.java
> ----------------------------------------------------------------------
> diff --git
> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/MarkupSettings.java
> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/MarkupSettings.java
> new file mode 100644
> index 0000000..387b2ba
> --- /dev/null
> +++
> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/MarkupSettings.java
> @@ -0,0 +1,131 @@
> +/*
> + * Licensed to the Apache Software Foundation (ASF) under one or more
> + * contributor license agreements.  See the NOTICE file distributed with
> + * this work for additional information regarding copyright ownership.
> + * The ASF licenses this file to You under the Apache License, Version 2.0
> + * (the "License"); you may not use this file except in compliance with
> + * the License.  You may obtain a copy of the License at
> + *
> + *      http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing, software
> + * distributed under the License is distributed on an "AS IS" BASIS,
> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied.
> + * See the License for the specific language governing permissions and
> + * limitations under the License.
> + */
> +package org.apache.wicket.jmx.wrapper;
> +
> +import org.apache.wicket.Application;
> +import org.apache.wicket.jmx.MarkupSettingsMBean;
> +
> +
> +/**
> + * Exposes Application related functionality for JMX.
> + *
> + * @author eelcohillenius
> + */
> +public class MarkupSettings implements MarkupSettingsMBean
> +{
> +       private final Application application;
> +
> +       /**
> +        * Create.
> +        *
> +        * @param application
> +        */
> +       public MarkupSettings(final Application application)
> +       {
> +               this.application = application;
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.MarkupSettingsMBean#getAutomaticLinking()
> +        */
> +       @Override
> +       public boolean getAutomaticLinking()
> +       {
> +               return
> application.getMarkupSettings().getAutomaticLinking();
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.MarkupSettingsMBean#getCompressWhitespace()
> +        */
> +       @Override
> +       public boolean getCompressWhitespace()
> +       {
> +               return
> application.getMarkupSettings().getCompressWhitespace();
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.MarkupSettingsMBean#getDefaultMarkupEncoding()
> +        */
> +       @Override
> +       public String getDefaultMarkupEncoding()
> +       {
> +               return
> application.getMarkupSettings().getDefaultMarkupEncoding();
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.MarkupSettingsMBean#getStripComments()
> +        */
> +       @Override
> +       public boolean getStripComments()
> +       {
> +               return application.getMarkupSettings().getStripComments();
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.MarkupSettingsMBean#getStripWicketTags()
> +        */
> +       @Override
> +       public boolean getStripWicketTags()
> +       {
> +               return
> application.getMarkupSettings().getStripWicketTags();
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.MarkupSettingsMBean#setAutomaticLinking(boolean)
> +        */
> +       @Override
> +       public void setAutomaticLinking(final boolean automaticLinking)
> +       {
> +
> application.getMarkupSettings().setAutomaticLinking(automaticLinking);
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.MarkupSettingsMBean#setCompressWhitespace(boolean)
> +        */
> +       @Override
> +       public void setCompressWhitespace(final boolean compressWhitespace)
> +       {
> +
> application.getMarkupSettings().setCompressWhitespace(compressWhitespace);
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.MarkupSettingsMBean#setDefaultMarkupEncoding(java.lang.String)
> +        */
> +       @Override
> +       public void setDefaultMarkupEncoding(final String encoding)
> +       {
> +
> application.getMarkupSettings().setDefaultMarkupEncoding(encoding);
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.MarkupSettingsMBean#setStripComments(boolean)
> +        */
> +       @Override
> +       public void setStripComments(final boolean stripComments)
> +       {
> +
> application.getMarkupSettings().setStripComments(stripComments);
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.MarkupSettingsMBean#setStripWicketTags(boolean)
> +        */
> +       @Override
> +       public void setStripWicketTags(final boolean stripWicketTags)
> +       {
> +
> application.getMarkupSettings().setStripWicketTags(stripWicketTags);
> +       }
> +}
>
>
> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/PageSettings.java
> ----------------------------------------------------------------------
> diff --git
> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/PageSettings.java
> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/PageSettings.java
> new file mode 100644
> index 0000000..27d325d
> --- /dev/null
> +++
> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/PageSettings.java
> @@ -0,0 +1,59 @@
> +/*
> + * Licensed to the Apache Software Foundation (ASF) under one or more
> + * contributor license agreements.  See the NOTICE file distributed with
> + * this work for additional information regarding copyright ownership.
> + * The ASF licenses this file to You under the Apache License, Version 2.0
> + * (the "License"); you may not use this file except in compliance with
> + * the License.  You may obtain a copy of the License at
> + *
> + *      http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing, software
> + * distributed under the License is distributed on an "AS IS" BASIS,
> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied.
> + * See the License for the specific language governing permissions and
> + * limitations under the License.
> + */
> +package org.apache.wicket.jmx.wrapper;
> +
> +import org.apache.wicket.Application;
> +import org.apache.wicket.jmx.PageSettingsMBean;
> +
> +
> +/**
> + * Exposes Application related functionality for JMX.
> + *
> + * @author eelcohillenius
> + */
> +public class PageSettings implements PageSettingsMBean
> +{
> +       private final Application application;
> +
> +       /**
> +        * Create.
> +        *
> +        * @param application
> +        */
> +       public PageSettings(final Application application)
> +       {
> +               this.application = application;
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.PageSettingsMBean#getVersionPagesByDefault()
> +        */
> +       @Override
> +       public boolean getVersionPagesByDefault()
> +       {
> +               return
> application.getPageSettings().getVersionPagesByDefault();
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.PageSettingsMBean#setVersionPagesByDefault(boolean)
> +        */
> +       @Override
> +       public void setVersionPagesByDefault(final boolean
> pagesVersionedByDefault)
> +       {
> +
> application.getPageSettings().setVersionPagesByDefault(pagesVersionedByDefault);
> +       }
> +}
>
>
> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/RequestCycleSettings.java
> ----------------------------------------------------------------------
> diff --git
> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/RequestCycleSettings.java
> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/RequestCycleSettings.java
> new file mode 100644
> index 0000000..8fa04f2
> --- /dev/null
> +++
> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/RequestCycleSettings.java
> @@ -0,0 +1,127 @@
> +/*
> + * Licensed to the Apache Software Foundation (ASF) under one or more
> + * contributor license agreements.  See the NOTICE file distributed with
> + * this work for additional information regarding copyright ownership.
> + * The ASF licenses this file to You under the Apache License, Version 2.0
> + * (the "License"); you may not use this file except in compliance with
> + * the License.  You may obtain a copy of the License at
> + *
> + *      http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing, software
> + * distributed under the License is distributed on an "AS IS" BASIS,
> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied.
> + * See the License for the specific language governing permissions and
> + * limitations under the License.
> + */
> +package org.apache.wicket.jmx.wrapper;
> +
> +import org.apache.wicket.Application;
> +import org.apache.wicket.jmx.RequestCycleSettingsMBean;
> +import org.apache.wicket.util.time.Duration;
> +
> +
> +/**
> + * Exposes Application related functionality for JMX.
> + *
> + * @author eelcohillenius
> + */
> +public class RequestCycleSettings implements RequestCycleSettingsMBean
> +{
> +       private final Application application;
> +
> +       /**
> +        * Create.
> +        *
> +        * @param application
> +        */
> +       public RequestCycleSettings(final Application application)
> +       {
> +               this.application = application;
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.RequestCycleSettingsMBean#getBufferResponse()
> +        */
> +       @Override
> +       public boolean getBufferResponse()
> +       {
> +               return
> application.getRequestCycleSettings().getBufferResponse();
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.RequestCycleSettingsMBean#getGatherExtendedBrowserInfo()
> +        */
> +       @Override
> +       public boolean getGatherExtendedBrowserInfo()
> +       {
> +               return
> application.getRequestCycleSettings().getGatherExtendedBrowserInfo();
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.RequestCycleSettingsMBean#getResponseRequestEncoding()
> +        */
> +       @Override
> +       public String getResponseRequestEncoding()
> +       {
> +               return
> application.getRequestCycleSettings().getResponseRequestEncoding();
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.RequestCycleSettingsMBean#getTimeout()
> +        */
> +       @Override
> +       public String getTimeout()
> +       {
> +               return
> application.getRequestCycleSettings().getTimeout().toString();
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.RequestCycleSettingsMBean#setBufferResponse(boolean)
> +        */
> +       @Override
> +       public void setBufferResponse(final boolean bufferResponse)
> +       {
> +
> application.getRequestCycleSettings().setBufferResponse(bufferResponse);
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.RequestCycleSettingsMBean#setGatherExtendedBrowserInfo(boolean)
> +        */
> +       @Override
> +       public void setGatherExtendedBrowserInfo(final boolean
> gatherExtendedBrowserInfo)
> +       {
> +
> application.getRequestCycleSettings().setGatherExtendedBrowserInfo(
> +                       gatherExtendedBrowserInfo);
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.RequestCycleSettingsMBean#setResponseRequestEncoding(java.lang.String)
> +        */
> +       @Override
> +       public void setResponseRequestEncoding(final String
> responseRequestEncoding)
> +       {
> +
> application.getRequestCycleSettings().setResponseRequestEncoding(responseRequestEncoding);
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.RequestCycleSettingsMBean#setTimeout(java.lang.String)
> +        */
> +       @Override
> +       public void setTimeout(final String timeout)
> +       {
> +
> application.getRequestCycleSettings().setTimeout(Duration.valueOf(timeout));
> +       }
> +
> +       @Override
> +       public void setExceptionRetryCount(int retries)
> +       {
> +
> application.getRequestCycleSettings().setExceptionRetryCount(retries);
> +       }
> +
> +       @Override
> +       public int getExceptionRetryCount()
> +       {
> +               return
> application.getRequestCycleSettings().getExceptionRetryCount();
> +       }
> +}
>
>
> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/RequestLogger.java
> ----------------------------------------------------------------------
> diff --git
> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/RequestLogger.java
> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/RequestLogger.java
> new file mode 100644
> index 0000000..90e234f
> --- /dev/null
> +++
> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/RequestLogger.java
> @@ -0,0 +1,168 @@
> +/*
> + * Licensed to the Apache Software Foundation (ASF) under one or more
> + * contributor license agreements.  See the NOTICE file distributed with
> + * this work for additional information regarding copyright ownership.
> + * The ASF licenses this file to You under the Apache License, Version 2.0
> + * (the "License"); you may not use this file except in compliance with
> + * the License.  You may obtain a copy of the License at
> + *
> + *      http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing, software
> + * distributed under the License is distributed on an "AS IS" BASIS,
> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied.
> + * See the License for the specific language governing permissions and
> + * limitations under the License.
> + */
> +package org.apache.wicket.jmx.wrapper;
> +
> +import java.io.IOException;
> +
> +import org.apache.wicket.Application;
> +import org.apache.wicket.jmx.RequestLoggerMBean;
> +import org.apache.wicket.protocol.http.WebApplication;
> +
> +
> +/**
> + * Exposes {@link org.apache.wicket.protocol.http.RequestLogger} for JMX.
> + *
> + * @author eelcohillenius
> + */
> +public class RequestLogger implements RequestLoggerMBean
> +{
> +       private final Application application;
> +
> +       private final WebApplication webApplication;
> +
> +       /**
> +        * Construct.
> +        *
> +        * @param application
> +        *            The application
> +        */
> +       public RequestLogger(final Application application)
> +       {
> +               this.application = application;
> +
> +               // do this so that we don't have to cast all the time
> +               if (application instanceof WebApplication)
> +               {
> +                       webApplication = (WebApplication)application;
> +               }
> +               else
> +               {
> +                       webApplication = null;
> +               }
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.RequestLoggerMBean#getNumberOfCreatedSessions()
> +        */
> +       @Override
> +       public Integer getNumberOfCreatedSessions() throws IOException
> +       {
> +               org.apache.wicket.protocol.http.IRequestLogger logger =
> getRequestLogger();
> +               if (logger != null)
> +               {
> +                       return logger.getTotalCreatedSessions();
> +               }
> +               return null;
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.RequestLoggerMBean#getNumberOfLiveSessions()
> +        */
> +       @Override
> +       public Integer getNumberOfLiveSessions() throws IOException
> +       {
> +               org.apache.wicket.protocol.http.IRequestLogger logger =
> getRequestLogger();
> +               if (logger != null)
> +               {
> +                       return logger.getLiveSessions().length;
> +               }
> +               return null;
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.RequestLoggerMBean#getPeakNumberOfSessions()
> +        */
> +       @Override
> +       public Integer getPeakNumberOfSessions() throws IOException
> +       {
> +               org.apache.wicket.protocol.http.IRequestLogger logger =
> getRequestLogger();
> +               if (logger != null)
> +               {
> +                       return logger.getPeakSessions();
> +               }
> +               return null;
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.RequestLoggerMBean#getNumberOfCurrentActiveRequests()
> +        */
> +       @Override
> +       public Integer getNumberOfCurrentActiveRequests() throws
> IOException
> +       {
> +               org.apache.wicket.protocol.http.IRequestLogger logger =
> getRequestLogger();
> +               if (logger != null)
> +               {
> +                       return
> Integer.valueOf(logger.getCurrentActiveRequestCount());
> +               }
> +               return null;
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.RequestLoggerMBean#getPeakNumberOfActiveRequests()
> +        */
> +       @Override
> +       public Integer getPeakNumberOfActiveRequests() throws IOException
> +       {
> +               org.apache.wicket.protocol.http.IRequestLogger logger =
> getRequestLogger();
> +               if (logger != null)
> +               {
> +                       return
> Integer.valueOf(logger.getPeakActiveRequestCount());
> +               }
> +               return null;
> +       }
> +
> +       /**
> +        * @see org.apache.wicket.jmx.RequestLoggerMBean#restart()
> +        */
> +       @Override
> +       public void restart() throws IOException
> +       {
> +               if (webApplication != null)
> +               {
> +
> webApplication.getRequestLoggerSettings().setRequestLoggerEnabled(false);
> +                       webApplication.getRequestLogger();
> +
> webApplication.getRequestLoggerSettings().setRequestLoggerEnabled(true);
> +               }
> +       }
> +
> +       /**
> +        * @see org.apache.wicket.jmx.RequestLoggerMBean#stop()
> +        */
> +       @Override
> +       public void stop() throws IOException
> +       {
> +               if (webApplication != null)
> +               {
> +
> webApplication.getRequestLoggerSettings().setRequestLoggerEnabled(false);
> +               }
> +       }
> +
> +       /**
> +        * Gets the request logger for this application.
> +        *
> +        * @return The request logger or null if no request is active, or
> if this is not a web
> +        *         application
> +        */
> +       protected org.apache.wicket.protocol.http.IRequestLogger
> getRequestLogger()
> +       {
> +               if (application instanceof WebApplication)
> +               {
> +                       return application.getRequestLogger();
> +               }
> +               return null;
> +       }
> +}
>
>
> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/ResourceSettings.java
> ----------------------------------------------------------------------
> diff --git
> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/ResourceSettings.java
> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/ResourceSettings.java
> new file mode 100644
> index 0000000..b03de01
> --- /dev/null
> +++
> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/ResourceSettings.java
> @@ -0,0 +1,165 @@
> +/*
> + * Licensed to the Apache Software Foundation (ASF) under one or more
> + * contributor license agreements.  See the NOTICE file distributed with
> + * this work for additional information regarding copyright ownership.
> + * The ASF licenses this file to You under the Apache License, Version 2.0
> + * (the "License"); you may not use this file except in compliance with
> + * the License.  You may obtain a copy of the License at
> + *
> + *      http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing, software
> + * distributed under the License is distributed on an "AS IS" BASIS,
> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied.
> + * See the License for the specific language governing permissions and
> + * limitations under the License.
> + */
> +package org.apache.wicket.jmx.wrapper;
> +
> +import java.util.List;
> +
> +import org.apache.wicket.Application;
> +import org.apache.wicket.jmx.ResourceSettingsMBean;
> +import org.apache.wicket.resource.loader.IStringResourceLoader;
> +import org.apache.wicket.util.file.IResourceFinder;
> +import org.apache.wicket.util.lang.Generics;
> +import org.apache.wicket.util.time.Duration;
> +
> +
> +/**
> + * Exposes Application related functionality for JMX.
> + *
> + * @author eelcohillenius
> + */
> +public class ResourceSettings implements ResourceSettingsMBean
> +{
> +       private final Application application;
> +
> +       /**
> +        * Create.
> +        *
> +        * @param application
> +        */
> +       public ResourceSettings(final Application application)
> +       {
> +               this.application = application;
> +       }
> +
> +       /**
> +        * {@inheritDoc}
> +        */
> +       @Override
> +       public String getLocalizer()
> +       {
> +               return
> Stringz.className(application.getResourceSettings().getLocalizer());
> +       }
> +
> +       /**
> +        * {@inheritDoc}
> +        */
> +       @Override
> +       public String getPackageResourceGuard()
> +       {
> +               return
> Stringz.className(application.getResourceSettings().getPackageResourceGuard());
> +       }
> +
> +       /**
> +        * {@inheritDoc}
> +        */
> +       @Override
> +       public String getPropertiesFactory()
> +       {
> +               return
> Stringz.className(application.getResourceSettings().getPropertiesFactory());
> +       }
> +
> +       /**
> +        * {@inheritDoc}
> +        */
> +       @Override
> +       public String getResourceFinders()
> +       {
> +               StringBuilder builder = new StringBuilder();
> +               for (IResourceFinder rf :
> application.getResourceSettings().getResourceFinders())
> +               {
> +                       builder.append(Stringz.className(rf));
> +               }
> +               return builder.toString();
> +       }
> +
> +       /**
> +        * {@inheritDoc}
> +        */
> +       @Override
> +       public String getResourcePollFrequency()
> +       {
> +               Duration duration =
> application.getResourceSettings().getResourcePollFrequency();
> +               return (duration != null) ? duration.toString() : null;
> +       }
> +
> +       /**
> +        * {@inheritDoc}
> +        */
> +       @Override
> +       public String getResourceStreamLocator()
> +       {
> +               return
> Stringz.className(application.getResourceSettings().getResourceStreamLocator());
> +       }
> +
> +       /**
> +        * {@inheritDoc}
> +        */
> +       @Override
> +       public String[] getStringResourceLoaders()
> +       {
> +               List<IStringResourceLoader> loaders =
> application.getResourceSettings()
> +                       .getStringResourceLoaders();
> +               if (loaders != null)
> +               {
> +                       List<String> list = Generics.newArrayList();
> +                       for (Object loader : loaders)
> +                       {
> +                               list.add(loader.toString());
> +                       }
> +                       return list.toArray(new String[loaders.size()]);
> +               }
> +               return null;
> +       }
> +
> +       /**
> +        * {@inheritDoc}
> +        */
> +       @Override
> +       public boolean getThrowExceptionOnMissingResource()
> +       {
> +               return
> application.getResourceSettings().getThrowExceptionOnMissingResource();
> +       }
> +
> +       /**
> +        * {@inheritDoc}
> +        */
> +       @Override
> +       public boolean getUseDefaultOnMissingResource()
> +       {
> +               return
> application.getResourceSettings().getUseDefaultOnMissingResource();
> +       }
> +
> +       /**
> +        * {@inheritDoc}
> +        */
> +       @Override
> +       public void setThrowExceptionOnMissingResource(final boolean
> throwExceptionOnMissingResource)
> +       {
> +
> application.getResourceSettings().setThrowExceptionOnMissingResource(
> +                       throwExceptionOnMissingResource);
> +       }
> +
> +       /**
> +        * {@inheritDoc}
> +        */
> +       @Override
> +       public void setUseDefaultOnMissingResource(final boolean
> useDefaultOnMissingResource)
> +       {
> +
> application.getResourceSettings().setUseDefaultOnMissingResource(
> +                       useDefaultOnMissingResource);
> +       }
> +}
>
>
> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/SecuritySettings.java
> ----------------------------------------------------------------------
> diff --git
> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/SecuritySettings.java
> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/SecuritySettings.java
> new file mode 100644
> index 0000000..67a8748
> --- /dev/null
> +++
> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/SecuritySettings.java
> @@ -0,0 +1,68 @@
> +/*
> + * Licensed to the Apache Software Foundation (ASF) under one or more
> + * contributor license agreements.  See the NOTICE file distributed with
> + * this work for additional information regarding copyright ownership.
> + * The ASF licenses this file to You under the Apache License, Version 2.0
> + * (the "License"); you may not use this file except in compliance with
> + * the License.  You may obtain a copy of the License at
> + *
> + *      http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing, software
> + * distributed under the License is distributed on an "AS IS" BASIS,
> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied.
> + * See the License for the specific language governing permissions and
> + * limitations under the License.
> + */
> +package org.apache.wicket.jmx.wrapper;
> +
> +import org.apache.wicket.Application;
> +import org.apache.wicket.jmx.SecuritySettingsMBean;
> +
> +/**
> + * Exposes Application related functionality for JMX.
> + *
> + * @author eelcohillenius
> + */
> +public class SecuritySettings implements SecuritySettingsMBean
> +{
> +       private final Application application;
> +
> +       /**
> +        * Create.
> +        *
> +        * @param application
> +        */
> +       public SecuritySettings(final Application application)
> +       {
> +               this.application = application;
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.SecuritySettingsMBean#getAuthorizationStrategy()
> +        */
> +       @Override
> +       public String getAuthorizationStrategy()
> +       {
> +               return
> Stringz.className(application.getSecuritySettings().getAuthorizationStrategy());
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.SecuritySettingsMBean#getCryptFactory()
> +        */
> +       @Override
> +       public String getCryptFactory()
> +       {
> +               return
> Stringz.className(application.getSecuritySettings().getCryptFactory());
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.SecuritySettingsMBean#getUnauthorizedComponentInstantiationListener()
> +        */
> +       @Override
> +       public String getUnauthorizedComponentInstantiationListener()
> +       {
> +               return Stringz.className(application.getSecuritySettings()
> +                       .getUnauthorizedComponentInstantiationListener());
> +       }
> +}
>
>
> http://git-wip-us.apache.org/repos/asf/wicket/blob/fea2b8e4/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/SessionSettings.java
> ----------------------------------------------------------------------
> diff --git
> a/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/SessionSettings.java
> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/SessionSettings.java
> new file mode 100644
> index 0000000..f235ab6
> --- /dev/null
> +++
> b/wicket-jmx/src/main/java/org/apache/wicket/jmx/wrapper/SessionSettings.java
> @@ -0,0 +1,58 @@
> +/*
> + * Licensed to the Apache Software Foundation (ASF) under one or more
> + * contributor license agreements.  See the NOTICE file distributed with
> + * this work for additional information regarding copyright ownership.
> + * The ASF licenses this file to You under the Apache License, Version 2.0
> + * (the "License"); you may not use this file except in compliance with
> + * the License.  You may obtain a copy of the License at
> + *
> + *      http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing, software
> + * distributed under the License is distributed on an "AS IS" BASIS,
> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied.
> + * See the License for the specific language governing permissions and
> + * limitations under the License.
> + */
> +package org.apache.wicket.jmx.wrapper;
> +
> +import org.apache.wicket.Application;
> +import org.apache.wicket.jmx.SessionSettingsMBean;
> +
> +/**
> + * Exposes Application related functionality for JMX.
> + *
> + * @author eelcohillenius
> + */
> +public class SessionSettings implements SessionSettingsMBean
> +{
> +       private final Application application;
> +
> +       /**
> +        * Create.
> +        *
> +        * @param application
> +        */
> +       public SessionSettings(final Application application)
> +       {
> +               this.application = application;
> +       }
> +
> +       /**
> +        * @see org.apache.wicket.jmx.SessionSettingsMBean#getPageFactory()
> +        */
> +       @Override
> +       public String getPageFactory()
> +       {
> +               return Stringz.className(application.getPageFactory());
> +       }
> +
> +       /**
> +        * @see
> org.apache.wicket.jmx.SessionSettingsMBean#getSessionStore()
> +        */
> +       @Override
> +       public String getSessionStore()
> +       {
> +               return Stringz.className(application.getSessionStore());
> +       }
> +}
>
>