MBeanExporter logs lazy bean retrieval exceptions on the server at warn level
Issue: SPR-12399
This commit is contained in:
parent
db2601d6e2
commit
5f160c17cd
|
|
@ -1097,6 +1097,19 @@ public class MBeanExporter extends MBeanRegistrationSupport implements MBeanExpo
|
|||
this.objectName = objectName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getTarget() {
|
||||
try {
|
||||
return super.getTarget();
|
||||
}
|
||||
catch (RuntimeException ex) {
|
||||
if (logger.isWarnEnabled()) {
|
||||
logger.warn("Failed to retrieve target for JMX-exposed bean [" + this.objectName + "]: " + ex);
|
||||
}
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void postProcessTargetObject(Object targetObject) {
|
||||
injectNotificationPublisherIfNecessary(targetObject, this.modelMBean, this.objectName);
|
||||
|
|
|
|||
Loading…
Reference in New Issue