JMX.newMXBeanProxy(mbsc,
new ObjectName(DataServiceMXBean.MXBEAN_NAME),
DataServiceMXBean.class);
// Test that consumer level can be changed
txnScheduler.runTask(new TestAbstractKernelRunnable() {
public void run() {
ManagedObject dummy = new DummyManagedObject();
serverNode.getDataService().setBinding("dummy", dummy);
}}, taskOwner);
assertEquals(0, dataProxy.getSetBindingCalls());
proxy.setConsumerLevel(consName, ProfileLevel.MAX);
assertEquals(ProfileLevel.MAX, proxy.getConsumerLevel(consName));
txnScheduler.runTask(new TestAbstractKernelRunnable() {
public void run() {
ManagedObject dummy = new DummyManagedObject();
serverNode.getDataService().setBinding("dummy", dummy);
}}, taskOwner);
assertTrue(dataProxy.getSetBindingCalls() > 0);