try { Set<objectinstance> result = conn.queryMBeans(new ObjectName("com.tibco.bw:key=engine,name=*"), null); if (result.size() > 0) { ObjectInstance tib = result.iterator().next(); TabularDataSupport getActivities = (TabularDataSupport) conn.invoke(tib.getObjectName(), "GetActivities", new Object[] { null }, null); TabularDataSupport getProcesses = (TabularDataSupport) conn.invoke(tib.getObjectName(), "GetProcesses", new Object[] { 0, null, 0, 0, null }, null); for (Object _row : getProcesses.values()) { BWStats bw = new BWStats(); CompositeData row = (CompositeData)_row; bw.process = (String) row.get("MainProcessName"); bw.activity = (String) row.get("CurrentActivityName"); bw.clazz = "IN"; bw.status = (String) row.get("Status"); bw.duration0 = (Long) row.get("Duration"); stats.bwStats.add(bw); } for (Object _row : getActivities.values()) { CompositeData row = (CompositeData)_row; BWStats bw = new BWStats(); bw.process = (String) row.get("ProcessDefName"); bw.activity = (String) row.get("Name"); bw.clazz = (String) row.get("ActivityClass"); bw.duration0 = (Long) row.get("ExecutionTime"); bw.duration1 = (Long) row.get("ElapsedTime"); bw.count = (Long) row.get("ExecutionCount"); stats.bwStats.add(bw); } } catch (Exception exc) {}
wtorek, lipca 15, 2014
How to get Hawk JMX data from BW
Subskrybuj:
Komentarze do posta (Atom)
0 komentarze:
Prześlij komentarz