[
https://issues.jboss.org/browse/JBLOGGING-71?page=com.atlassian.jira.plug...
]
Leonid Kosmylev edited comment on JBLOGGING-71 at 9/23/11 6:58 AM:
-------------------------------------------------------------------
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:
{code:java}
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());
}
{code}
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.
was (Author: klv_m72):
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