[jboss-jira] [JBoss JIRA] Updated: (JBLOGGING-71) The JMX Bean associated with a LogContext must be made available
Leonid Kosmylev (JIRA)
jira-events at lists.jboss.org
Fri Sep 23 06:59:26 EDT 2011
[ https://issues.jboss.org/browse/JBLOGGING-71?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Leonid Kosmylev updated JBLOGGING-71:
-------------------------------------
There is a workaround. It is published here: http://lea-ka.blogspot.com/2011/09/dynamically-changing-app-specific.html
I guess the easiest way to fix this issue is to change class org.jboss.logging.metadata.LoggingMetaDataHelper, method createBeanMetaData.
This piece of code makes sure the required log contexts are created:
if (defineContextMetaDataList != null) for (DefineContextMetaData defineContextMetaData : defineContextMetaDataList) {
final String contextName = defineContextMetaData.getName();
final BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder(getContextName(contextName == null ? context : contextName), LogContext.class.getName());
builder.setFactoryMethod("create");
beanMetaDataList.add(builder.getBeanMetaData());
}
The fix would change the code so that not only the context is created but also its MBean is registered, more or less in line with the published workaround.
> The JMX Bean associated with a LogContext must be made available
> ----------------------------------------------------------------
>
> Key: JBLOGGING-71
> URL: https://issues.jboss.org/browse/JBLOGGING-71
> Project: JBoss Logging
> Issue Type: Enhancement
> Security Level: Public(Everyone can see)
> Environment: JBoss AS 6.0.0
> Reporter: Leonid Kosmylev
> Assignee: David Lloyd
>
> Class org.jboss.logmanager.LogContext has an associated instance of LoggingMXBeanImpl. If per-application logging is enabled a new instances of LogContext and LoggingMXBeanImpl are created. But the LoggingMXBeanImpl is not registered as an MBean. It is therefore not possible to change log levels dynamically.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list