}
}));
// ------
NumberColumn txCount = new NumberColumn("completed-transaction-count","Completed");
Column[] cols = new Column[] {
txCount.setBaseline(true),
new NumberColumn("successful-transaction-count","Successful").setComparisonColumn(txCount)
};
final HelpSystem.AddressCallback addressCallback = new HelpSystem.AddressCallback() {
@Override
public ModelNode getAddress() {
ModelNode address = new ModelNode();
address.get(ModelDescriptionConstants.ADDRESS).set(RuntimeBaseAddress.get());
address.get(ModelDescriptionConstants.ADDRESS).add("deployment", "*");
address.get(ModelDescriptionConstants.ADDRESS).add("subsystem", "jpa");
address.get(ModelDescriptionConstants.ADDRESS).add("hibernate-persistence-unit", "*");
return address;
}
};
txSampler = new PlainColumnView("Transactions", addressCallback)
.setColumns(cols)
.setWidth(100, Style.Unit.PCT);
// ------
NumberColumn queryCount = new NumberColumn("query-cache-put-count","Query Put Count");
Column[] queryCols = new Column[] {
queryCount.setBaseline(true),
new NumberColumn("query-cache-hit-count","Query Hit Count").setComparisonColumn(queryCount),
new NumberColumn("query-cache-miss-count","Query Miss Count").setComparisonColumn(queryCount)
};
queryCacheSampler = new PlainColumnView("Query Cache", addressCallback)
.setColumns(queryCols)
.setWidth(100, Style.Unit.PCT);
// ------
NumberColumn queryExecCount = new NumberColumn("query-execution-count","Query Execution Count");
Column[] queryExecCols = new Column[] {
queryExecCount,
new NumberColumn("query-execution-max-time","Exec Max Time")
};
queryExecSampler = new PlainColumnView("Query Execution", addressCallback)
.setColumns(queryExecCols)
.setWidth(100, Style.Unit.PCT);
// ------
NumberColumn secondLevelCount = new NumberColumn("second-level-cache-put-count","Put Count");
Column[] secondLevelCols = new Column[] {
secondLevelCount.setBaseline(true),
new NumberColumn("second-level-cache-hit-count","Hit Count").setComparisonColumn(secondLevelCount),
new TextColumn("second-level-cache-miss-count","Miss Count").setComparisonColumn(secondLevelCount)
};
secondLevelSampler = new PlainColumnView("Second Level Cache", addressCallback)
.setColumns(secondLevelCols)
.setWidth(100, Style.Unit.PCT);
// ------
NumberColumn sessionOpenCount = new NumberColumn("session-open-count", "Session Open Count");
Column[] connectionCols = new Column[] {
sessionOpenCount.setBaseline(true),
new TextColumn("session-close-count","Session Close Count").setComparisonColumn(sessionOpenCount),
new NumberColumn("connect-count","Connection Count")
};
connectionSampler = new PlainColumnView("Connections", addressCallback)
.setColumns(connectionCols)