ManagedComponent hsqldb = mgtView.getComponent("DefaultDS", type);
Set<ManagedOperation> ops = hsqldb.getOperations();
log.info("DefaultDS ops: "+ops);
assertNotNull("Set<ManagedOperation>", ops);
assertTrue("Set<ManagedOperation> > 0", ops.size() > 0);
ManagedOperation listFormattedSubPoolStatistics = null;
HashMap<String, ManagedOperation> opsByName = new HashMap<String, ManagedOperation>();
for (ManagedOperation op : ops)
{
opsByName.put(op.getName(), op);
}
// Validate the listFormattedSubPoolStatistics op
listFormattedSubPoolStatistics = opsByName.get("listFormattedSubPoolStatistics");
assertNotNull("listFormattedSubPoolStatistics", listFormattedSubPoolStatistics);
MetaValue[] params = {};
Object result = listFormattedSubPoolStatistics.invoke(params);
assertNotNull("Expecting non null result", result);
log.info("listFormattedSubPoolStatistics.invoke: "+result);
// It needs to be a MetaValue as well
assertTrue("result is a MetaValue", result instanceof MetaValue);
// Validate the listStatistics op
ManagedOperation listStatistics = opsByName.get("listStatistics");
assertNotNull("listStatistics", listStatistics);
result = listStatistics.invoke(params);
assertNotNull("Expecting non null result", result);
log.info("listStatistics.invoke: "+result);
// It needs to be a MetaValue as well
assertTrue("result is a MetaValue", result instanceof MetaValue);
}