TheMLetTagTest.java 文件源码

java
阅读 30 收藏 0 点赞 0 评论 0

项目:freeVM 作者:
/**
 * Test for mandatory: Tags CODE, OBJECT.
 * Exception should be thrown if it is exist in conf mlet text file  
 */

public Result testCODEAndOBJECT() throws Exception {

    try {
        MBeanServer server = MBeanServerFactory.createMBeanServer();
        MLet mlet = new MLet();
        ObjectName name = new ObjectName("test:name=mlet");

        server.registerMBean(mlet, name);
        server.invoke(name, "getMBeansFromURL", new Object[] { MLET_URL
                + "CODEAndOBJECT.conf" }, new String[] { String.class
                .getName() });

    } catch (Exception e) {
        return failed("Unexpected Exception");
    }
    return result();
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号