-
Bug
-
Resolution: Fixed
-
P2
-
7
-
b42
-
generic
-
generic
-
Verified
If one tries to register/create the following MBeans in the MBenServer and then invoke mbs.getMBeanInfo(name).getNotifications() - an empty array will be returned.
1. A management interface is annotated with @NotificationInfo:
--------------------------------------------------------------
@NotificationInfo(types={"com.example.notifs.create",
"com.example.notifs.destroy"})
public interface CacheMBean {
int getCachedNum();
}
public class Cache implements CacheMBean {
public int getCachedNum() {
return 0;
}
}
--------------------------------------------------------------
2. An MBean implementation class is annotated with @NotificationInfo:
--------------------------------------------------------------
@MBean
@NotificationInfo(types={"com.example.notifs.create",
"com.example.notifs.destroy"})
public class Cache {
@Resource
SendNotification sn;
@ManagedOperation
public int getCachedNum() {
return 0;
}
}
--------------------------------------------------------------
1. A management interface is annotated with @NotificationInfo:
--------------------------------------------------------------
@NotificationInfo(types={"com.example.notifs.create",
"com.example.notifs.destroy"})
public interface CacheMBean {
int getCachedNum();
}
public class Cache implements CacheMBean {
public int getCachedNum() {
return 0;
}
}
--------------------------------------------------------------
2. An MBean implementation class is annotated with @NotificationInfo:
--------------------------------------------------------------
@MBean
@NotificationInfo(types={"com.example.notifs.create",
"com.example.notifs.destroy"})
public class Cache {
@Resource
SendNotification sn;
@ManagedOperation
public int getCachedNum() {
return 0;
}
}
--------------------------------------------------------------