13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 5043762
27 * @summary Attribute existence check fails if
28 * RequiredModelMBean.addAttributeChangeNotificationListener
29 * is called with a non-existent attribute name and there are
30 * no other attributes.
31 * @author Yves Joan
32 * @author Eamonn McManus
33 * @modules java.management
34 * @run clean AddAttributeChangeNotificationListenerTest
35 * @run build AddAttributeChangeNotificationListenerTest
36 * @run main AddAttributeChangeNotificationListenerTest
37 */
38
39 import java.lang.reflect.Method;
40 import javax.management.AttributeChangeNotification;
41 import javax.management.MBeanException;
42 import javax.management.MBeanServer;
43 import javax.management.MBeanServerFactory;
44 import javax.management.Notification;
45 import javax.management.NotificationListener;
46 import javax.management.ObjectName;
47 import javax.management.RuntimeOperationsException;
48 import javax.management.modelmbean.*;
49
50 /**
51 * We do invoke addAttributeChangeNotificationListener to add
52 * a listener on an attribute not defined in the ModelMBeanInfo
53 * of the RequiredModelMBean instance used.
|
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 5043762
27 * @summary Attribute existence check fails if
28 * RequiredModelMBean.addAttributeChangeNotificationListener
29 * is called with a non-existent attribute name and there are
30 * no other attributes.
31 * @author Yves Joan
32 * @author Eamonn McManus
33 *
34 * @run clean AddAttributeChangeNotificationListenerTest
35 * @run build AddAttributeChangeNotificationListenerTest
36 * @run main AddAttributeChangeNotificationListenerTest
37 */
38
39 import java.lang.reflect.Method;
40 import javax.management.AttributeChangeNotification;
41 import javax.management.MBeanException;
42 import javax.management.MBeanServer;
43 import javax.management.MBeanServerFactory;
44 import javax.management.Notification;
45 import javax.management.NotificationListener;
46 import javax.management.ObjectName;
47 import javax.management.RuntimeOperationsException;
48 import javax.management.modelmbean.*;
49
50 /**
51 * We do invoke addAttributeChangeNotificationListener to add
52 * a listener on an attribute not defined in the ModelMBeanInfo
53 * of the RequiredModelMBean instance used.
|