ObjectName name = new ObjectName("Domain1:type=instance1");
NumberTest bean1 = new NumberTest(1);
NumberTest bean2 = new NumberTest(2);
server1.registerMBean(bean1, name);
server2.registerMBean(bean2, name);
QueryExp query = Query.eq(Query.attr("Number"), Query.value(2));
QueryThread thread1 = new QueryThread(server1, query, 0);
QueryThread thread2 = new QueryThread(server2, query, 1);
thread1.start();
thread2.start();
thread1.join(10000);