From 5fd0a3909f74ed803ccbfb0a14d2d9733e0d198e Mon Sep 17 00:00:00 2001 From: Gunhee Lee Date: Mon, 25 Apr 2016 10:03:46 +0900 Subject: [PATCH 01/10] dbcp2 --- .../src/scouter/agent/asm/JDBCConnectionOpenASM.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scouter.agent.java/src/scouter/agent/asm/JDBCConnectionOpenASM.java b/scouter.agent.java/src/scouter/agent/asm/JDBCConnectionOpenASM.java index 0b64d4f76..5c791eed9 100644 --- a/scouter.agent.java/src/scouter/agent/asm/JDBCConnectionOpenASM.java +++ b/scouter.agent.java/src/scouter/agent/asm/JDBCConnectionOpenASM.java @@ -45,9 +45,9 @@ public static void regist(String klass, String method) { } public JDBCConnectionOpenASM() { - // Tomcat7 AsmUtil.add(reserved, "org/apache/tomcat/dbcp/dbcp/BasicDataSource", "getConnection"); AsmUtil.add(reserved, "org/apache/tomcat/jdbc/pool/DataSourceProxy", "getConnection"); + AsmUtil.add(reserved, "org/apache/commons/dbcp2/BasicDataSource", "getConnection"); for(int i = JDBCTargetRegister.klassMethod.size() - 1; i >= 0; i--) { AsmUtil.add(reserved, JDBCTargetRegister.klassMethod.get(i).getLeft(), JDBCTargetRegister.klassMethod.get(i).getRight()); From 1b24117fb149b800ea649506ab77f8807bb3627e Mon Sep 17 00:00:00 2001 From: KimEunsu Date: Tue, 26 Apr 2016 11:08:22 +0900 Subject: [PATCH 02/10] bug fix - realtime gap --- .../scouter/client/counter/views/CounterPastTimeTotalView.java | 3 ++- .../src/scouter/client/counter/views/CounterRealTimeView.java | 2 +- scouter.common/src/scouter/lang/TimeTypeEnum.java | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/scouter.client/src/scouter/client/counter/views/CounterPastTimeTotalView.java b/scouter.client/src/scouter/client/counter/views/CounterPastTimeTotalView.java index 6a22a562d..6f01f356f 100644 --- a/scouter.client/src/scouter/client/counter/views/CounterPastTimeTotalView.java +++ b/scouter.client/src/scouter/client/counter/views/CounterPastTimeTotalView.java @@ -118,6 +118,8 @@ public void setInput(long stime, long etime, String objType, String counter, int MenuUtil.createCounterContextMenu(ID, canvas, serverId, objType, counter); + traceDataProvider.setBufferSize((int) ((etime - stime) / TimeTypeEnum.getTime(TimeTypeEnum.REALTIME) + 10)); + ExUtil.asyncRun(new Runnable() { public void run() { load(); @@ -264,7 +266,6 @@ public void controlMoved(ControlEvent e) { // xyGraph.primaryYAxis.setTitle(""); traceDataProvider = new CircularBufferDataProvider(true); - traceDataProvider.setBufferSize(1800); traceDataProvider.setCurrentXDataArray(new double[] {}); traceDataProvider.setCurrentYDataArray(new double[] {}); diff --git a/scouter.client/src/scouter/client/counter/views/CounterRealTimeView.java b/scouter.client/src/scouter/client/counter/views/CounterRealTimeView.java index eb3e24bb0..c8f9b275e 100644 --- a/scouter.client/src/scouter/client/counter/views/CounterRealTimeView.java +++ b/scouter.client/src/scouter/client/counter/views/CounterRealTimeView.java @@ -144,7 +144,7 @@ public void getRealtimePrevPerf(int objHash, String objType, String counter) { param.put("objType", objType); param.put("counter", counter); - long etime = System.currentTimeMillis(); + long etime = TimeUtil.getCurrentTime(serverId); long stime = etime - DateUtil.MILLIS_PER_MINUTE * 5; param.put("stime", stime); param.put("etime", etime); diff --git a/scouter.common/src/scouter/lang/TimeTypeEnum.java b/scouter.common/src/scouter/lang/TimeTypeEnum.java index 551a2ec88..e50f432ad 100644 --- a/scouter.common/src/scouter/lang/TimeTypeEnum.java +++ b/scouter.common/src/scouter/lang/TimeTypeEnum.java @@ -83,7 +83,7 @@ public static byte getCodeBySec(int sec) { public static int getTime(byte timeCode) { switch (timeCode) { case REALTIME: - return 1000; + return 2000; case ONE_MIN: return 60 * 1000; case FIVE_MIN: From 09d1b98ff4970e1fb1dae5993a4c2ef4b6dada71 Mon Sep 17 00:00:00 2001 From: Gunhee Lee Date: Tue, 26 Apr 2016 16:28:33 +0900 Subject: [PATCH 03/10] alert hash message sign --- scouter.common/src/scouter/lang/pack/AlertPack.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scouter.common/src/scouter/lang/pack/AlertPack.java b/scouter.common/src/scouter/lang/pack/AlertPack.java index be83d6940..964dd8d8f 100644 --- a/scouter.common/src/scouter/lang/pack/AlertPack.java +++ b/scouter.common/src/scouter/lang/pack/AlertPack.java @@ -29,6 +29,11 @@ */ public class AlertPack implements Pack { + /** + * indicate sign about hash value + */ + public static String HASH_FLAG = "_hash_"; + /** * Alert time */ From 9fde0b94a6c9fbb32f9eb60f43b3a9302f7b18e4 Mon Sep 17 00:00:00 2001 From: Gunhee Lee Date: Tue, 26 Apr 2016 18:49:50 +0900 Subject: [PATCH 04/10] alert leak --- .../src/scouter/agent/trace/TraceMain.java | 14 +++++++++++ .../src/scouter/agent/util/AsyncRunner.java | 25 ++++++++++++++++++- .../src/scouter/jdbc/DetectConnection.java | 2 ++ 3 files changed, 40 insertions(+), 1 deletion(-) diff --git a/scouter.agent.java/src/scouter/agent/trace/TraceMain.java b/scouter.agent.java/src/scouter/agent/trace/TraceMain.java index d9e49bbd1..872d4c071 100644 --- a/scouter.agent.java/src/scouter/agent/trace/TraceMain.java +++ b/scouter.agent.java/src/scouter/agent/trace/TraceMain.java @@ -31,12 +31,16 @@ import scouter.agent.proxy.HttpTraceFactory; import scouter.agent.proxy.IHttpTrace; import scouter.agent.summary.ServiceSummary; +import scouter.lang.AlertLevel; +import scouter.lang.TextTypes; +import scouter.lang.pack.AlertPack; import scouter.lang.pack.XLogPack; import scouter.lang.pack.XLogTypes; import scouter.lang.step.HashedMessageStep; import scouter.lang.step.MessageStep; import scouter.lang.step.MethodStep; import scouter.lang.step.MethodStep2; +import scouter.lang.value.MapValue; import scouter.util.*; import javax.sql.DataSource; @@ -253,6 +257,9 @@ public static void endHttpService(Object stat, Throwable thr) { //profile rs if(conf.trace_rs_leak_enabled && ctx.unclosedRsMap.size() > 0) { + MapValue mv = new MapValue(); + mv.put(AlertPack.HASH_FLAG + TextTypes.SERVICE + "_service-name", ctx.serviceHash); + if(conf.profile_fullstack_rs_leak_enabled) { String message = ctx.unclosedRsMap.values().nextElement(); if(message != null) { @@ -261,12 +268,17 @@ public static void endHttpService(Object stat, Throwable thr) { step.hash = DataProxy.sendHashedMessage(message); step.start_time = (int) (System.currentTimeMillis() - ctx.startTime); ctx.profile.add(step); + mv.put(AlertPack.HASH_FLAG + TextTypes.HASH_MSG + "_full-stack", step.hash); } } + DataProxy.sendAlert(AlertLevel.WARN, "RESULTSET_LEAK_SUSPECT", "ResultSet Leak suspected!", mv); } //profile stmt if(conf.trace_stmt_leak_enabled && ctx.unclosedStmtMap.size() > 0) { + MapValue mv = new MapValue(); + mv.put(AlertPack.HASH_FLAG + TextTypes.SERVICE + "_service-name", ctx.serviceHash); + if(conf.profile_fullstack_stmt_leak_enabled) { String message = ctx.unclosedStmtMap.values().nextElement(); if(message != null) { @@ -275,8 +287,10 @@ public static void endHttpService(Object stat, Throwable thr) { step.hash = DataProxy.sendHashedMessage(message); step.start_time = (int) (System.currentTimeMillis() - ctx.startTime); ctx.profile.add(step); + mv.put(AlertPack.HASH_FLAG + TextTypes.HASH_MSG + "_full-stack", step.hash); } } + DataProxy.sendAlert(AlertLevel.WARN, "STATEMENT_LEAK_SUSPECT", "Statement Leak suspected!", mv); } // profile close diff --git a/scouter.agent.java/src/scouter/agent/util/AsyncRunner.java b/scouter.agent.java/src/scouter/agent/util/AsyncRunner.java index 6e36f0d5f..a352753a0 100644 --- a/scouter.agent.java/src/scouter/agent/util/AsyncRunner.java +++ b/scouter.agent.java/src/scouter/agent/util/AsyncRunner.java @@ -21,12 +21,18 @@ import scouter.agent.netio.data.DataProxy; import scouter.agent.summary.ErrorData; import scouter.agent.summary.ServiceSummary; +import scouter.lang.AlertLevel; +import scouter.lang.TextTypes; +import scouter.lang.pack.AlertPack; +import scouter.lang.value.MapValue; import scouter.util.RequestQueue; import scouter.util.SystemUtil; import scouter.util.ThreadUtil; import java.lang.instrument.ClassDefinition; +import static scouter.agent.util.DumpUtil.conf; + public class AsyncRunner extends Thread { private static AsyncRunner instance = null; @@ -96,6 +102,9 @@ private void process(Runnable r) { private void alert(LeakInfo leakInfo) { ServiceSummary summary = ServiceSummary.getInstance(); + MapValue mv = new MapValue(); + mv.put(AlertPack.HASH_FLAG + TextTypes.SERVICE + "_service-name", leakInfo.serviceHash); + if (leakInfo.fullstack) { ErrorData d = summary.process(leakInfo.error, 0, leakInfo.serviceHash, leakInfo.txid, 0, 0); Logger.println("A156", leakInfo.error + " " + leakInfo.inner); @@ -104,15 +113,23 @@ private void alert(LeakInfo leakInfo) { d.fullstack = DataProxy.sendError(fullstack); Logger.println("A157", fullstack); } + + mv.put(AlertPack.HASH_FLAG + TextTypes.ERROR + "_full-stack", d.fullstack); + } else { summary.process(leakInfo.error, 0, leakInfo.serviceHash, leakInfo.txid, 0, 0); Logger.println("A179", leakInfo.error + " " + leakInfo.inner); } + + DataProxy.sendAlert(AlertLevel.WARN, "CONNECTION_NOT_CLOSE", "Connection may not closed", mv); } private void alert(LeakInfo2 leakInfo2) { ServiceSummary summary = ServiceSummary.getInstance(); + MapValue mv = new MapValue(); + mv.put(AlertPack.HASH_FLAG + TextTypes.SERVICE + "_service-name", leakInfo2.serviceHash); + if (leakInfo2.fullstack) { ErrorData d = summary.process(leakInfo2.error, 0, leakInfo2.serviceHash, leakInfo2.txid, 0, 0); Logger.println("A156", leakInfo2.error + " " + leakInfo2.innerObject); @@ -121,12 +138,18 @@ private void alert(LeakInfo2 leakInfo2) { d.fullstack = DataProxy.sendError(fullstack); Logger.println("A157", fullstack); } + mv.put(AlertPack.HASH_FLAG + TextTypes.ERROR + "_full-stack", d.fullstack); + } else { summary.process(leakInfo2.error, 0, leakInfo2.serviceHash, leakInfo2.txid, 0, 0); Logger.println("A179", leakInfo2.error + " " + leakInfo2.innerObject); } + DataProxy.sendAlert(AlertLevel.WARN, "CONNECTION_NOT_CLOSE", "Connection may not closed", mv); + + if(conf._log_trace_enabled) Logger.trace("[Force-Close-InnerObject]" + System.identityHashCode(leakInfo2.innerObject)); + boolean closeResult = leakInfo2.closeManager.close(leakInfo2.innerObject); - Logger.println("G003", "connection auto closed:" + closeResult); + //Logger.println("G003", "connection auto closed:" + closeResult); } private void hooking(Hook m) { diff --git a/scouter.agent.java/src/scouter/jdbc/DetectConnection.java b/scouter.agent.java/src/scouter/jdbc/DetectConnection.java index 7a379a0c9..2beba0c49 100644 --- a/scouter.agent.java/src/scouter/jdbc/DetectConnection.java +++ b/scouter.agent.java/src/scouter/jdbc/DetectConnection.java @@ -46,6 +46,8 @@ public DetectConnection(java.sql.Connection inner) { int serviceHash = 0; long txid = 0; + //if(conf._log_trace_enabled) Logger.trace("[DetectConn-InnerObject]" + System.identityHashCode(inner)); + TraceContext ctx = TraceContextManager.getContext(); if (ctx != null) { serviceHash = ctx.serviceHash; From 7069d18bdd531c93c0bef5d52a8eaf4c4bfdc2ef Mon Sep 17 00:00:00 2001 From: KimEunsu Date: Wed, 27 Apr 2016 11:21:12 +0900 Subject: [PATCH 05/10] handle state disconnected --- scouter.client/src/scouter/client/net/ClientTCP.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scouter.client/src/scouter/client/net/ClientTCP.java b/scouter.client/src/scouter/client/net/ClientTCP.java index 4fb235f7b..958daee14 100644 --- a/scouter.client/src/scouter/client/net/ClientTCP.java +++ b/scouter.client/src/scouter/client/net/ClientTCP.java @@ -65,7 +65,9 @@ public void open(int serverId) { } catch (Throwable t) { System.out.println(t.getMessage()); close(); - server.setConnected(false); + if (server.getConnectionPool().size() < 1) { + server.setConnected(false); + } } } From e86a1235cce898fa4c831df6b0837d14f7c6f557 Mon Sep 17 00:00:00 2001 From: KimEunsu Date: Wed, 27 Apr 2016 11:25:19 +0900 Subject: [PATCH 06/10] handle alert hash value --- .../src/scouter/client/model/TextProxy.java | 27 ++++++++++++++++++ .../client/popup/AlertNotifierDialog.java | 28 +++++++++++++++++-- .../client/tags/AlertTableComposite.java | 2 +- .../client/views/AlertDetailListView.java | 2 +- .../src/scouter/client/views/AlertView.java | 2 +- 5 files changed, 55 insertions(+), 6 deletions(-) diff --git a/scouter.client/src/scouter/client/model/TextProxy.java b/scouter.client/src/scouter/client/model/TextProxy.java index f575cb19b..ae238b026 100644 --- a/scouter.client/src/scouter/client/model/TextProxy.java +++ b/scouter.client/src/scouter/client/model/TextProxy.java @@ -17,6 +17,9 @@ */ package scouter.client.model; +import java.util.HashMap; +import java.util.Map; + import scouter.lang.TextTypes; public class TextProxy { @@ -42,4 +45,28 @@ public TextProxy() { final public static TextModel desc = new TextModel(TextTypes.DESC, 1024); final public static TextModel hashMessage = new TextModel(TextTypes.HASH_MSG, 1024); + private static Map textModelMap = new HashMap(); + + static { + textModelMap.put(TextTypes.SERVICE, service); + textModelMap.put(TextTypes.SQL, sql); + textModelMap.put(TextTypes.METHOD, method); + textModelMap.put(TextTypes.ERROR, error); + textModelMap.put(TextTypes.APICALL, apicall); + textModelMap.put(TextTypes.OBJECT, object); + textModelMap.put(TextTypes.REFERER, referer); + textModelMap.put(TextTypes.USER_AGENT, userAgent); + textModelMap.put(TextTypes.GROUP, group); + textModelMap.put(TextTypes.SQL_TABLES, sql_tables); + textModelMap.put(TextTypes.CITY, city); + textModelMap.put(TextTypes.MARIA, maria); + textModelMap.put(TextTypes.WEB, web); + textModelMap.put(TextTypes.LOGIN, login); + textModelMap.put(TextTypes.DESC, desc); + textModelMap.put(TextTypes.HASH_MSG, hashMessage); + } + + public static TextModel getTextModel(String textType) { + return textModelMap.get(textType); + } } diff --git a/scouter.client/src/scouter/client/popup/AlertNotifierDialog.java b/scouter.client/src/scouter/client/popup/AlertNotifierDialog.java index 7d6e939e8..52fd89f0c 100644 --- a/scouter.client/src/scouter/client/popup/AlertNotifierDialog.java +++ b/scouter.client/src/scouter/client/popup/AlertNotifierDialog.java @@ -38,6 +38,8 @@ import org.eclipse.swt.widgets.Text; import scouter.client.Images; +import scouter.client.model.TextModel; +import scouter.client.model.TextProxy; import scouter.client.preferences.PManager; import scouter.client.preferences.PreferenceConstants; import scouter.client.util.ExUtil; @@ -51,13 +53,15 @@ public class AlertNotifierDialog { private final Display display; private Shell dialog; private String objName; + private int serverId; Label timeLbl, levelLbl, titleLbl, messageLbl, objectLbl; AlertPack p; Timer timer; - public AlertNotifierDialog(Display display) { + public AlertNotifierDialog(Display display, int serverId) { this.display = display; + this.serverId = serverId; } public void setObjName(String objName) { @@ -158,7 +162,7 @@ private Shell setDialogLayout() { } titleLbl.setText(p.title); titleLbl.setLayoutData(UIUtil.formData(0, 5, levelLbl, 5, 100, -5, null, -1)); - fD[0].setHeight(30); + fD[0].setHeight(20); fD[0].setStyle(SWT.BOLD); titleLbl.setFont( new Font(display,fD[0])); @@ -182,7 +186,25 @@ private Shell setDialogLayout() { StringBuilder sb = new StringBuilder(); Set keySet = p.tags.keySet(); for (String key : keySet) { - sb.append(key + " : " + p.tags.get(key) + "\n"); + int hashIndex = key.indexOf(AlertPack.HASH_FLAG); + if (hashIndex > -1) { + int titleIndex = key.lastIndexOf("_"); + String title = key.substring(titleIndex + 1); + String textType = null; + if (titleIndex > hashIndex) { + textType = key.substring(AlertPack.HASH_FLAG.length(), titleIndex); + } else { + textType = key.substring(AlertPack.HASH_FLAG.length()); + } + sb.append(title + " : "); + TextModel model = TextProxy.getTextModel(textType); + if (model != null) { + sb.append(model.getLoadText(DateUtil.yyyymmdd(p.time), p.tags.getInt(key), serverId)); + } + sb.append("\n"); + } else { + sb.append(key + " : " + p.tags.get(key) + "\n"); + } } tagLabel.setText(sb.toString()); } diff --git a/scouter.client/src/scouter/client/tags/AlertTableComposite.java b/scouter.client/src/scouter/client/tags/AlertTableComposite.java index b75c9db57..82e89cfc5 100644 --- a/scouter.client/src/scouter/client/tags/AlertTableComposite.java +++ b/scouter.client/src/scouter/client/tags/AlertTableComposite.java @@ -79,7 +79,7 @@ public void doubleClick(DoubleClickEvent e) { Object o = sel.getFirstElement(); if (o instanceof AlertPack) { String objName = TextProxy.object.getLoadText(yyyymmdd, ((AlertPack) o).objHash, serverId); - AlertNotifierDialog alertDialog = new AlertNotifierDialog(parent.getDisplay()); + AlertNotifierDialog alertDialog = new AlertNotifierDialog(parent.getDisplay(), serverId); alertDialog.setObjName(objName); alertDialog.setPack((AlertPack) o); alertDialog.show(parent.getBounds()); diff --git a/scouter.client/src/scouter/client/views/AlertDetailListView.java b/scouter.client/src/scouter/client/views/AlertDetailListView.java index ae1f845ec..5523cf30a 100644 --- a/scouter.client/src/scouter/client/views/AlertDetailListView.java +++ b/scouter.client/src/scouter/client/views/AlertDetailListView.java @@ -256,7 +256,7 @@ public void doubleClick(DoubleClickEvent event) { if (display == null) { display = Display.getDefault(); } - AlertNotifierDialog alertDialog = new AlertNotifierDialog(display); + AlertNotifierDialog alertDialog = new AlertNotifierDialog(display, serverId); alertDialog.setObjName(data.object); alertDialog.setPack(data.toPack()); alertDialog.show(getViewSite().getShell().getBounds()); diff --git a/scouter.client/src/scouter/client/views/AlertView.java b/scouter.client/src/scouter/client/views/AlertView.java index 39c3500fe..6361014f3 100644 --- a/scouter.client/src/scouter/client/views/AlertView.java +++ b/scouter.client/src/scouter/client/views/AlertView.java @@ -69,7 +69,7 @@ public void mouseDoubleClick(MouseEvent e) { } AlertData d = (AlertData) o; String objName = TextProxy.object.getLoadText(DateUtil.yyyymmdd(d.p.time), d.p.objHash, d.serverId); - alertDialog = new AlertNotifierDialog(getViewSite().getShell().getDisplay()); + alertDialog = new AlertNotifierDialog(getViewSite().getShell().getDisplay(), d.serverId); alertDialog.setObjName(objName); alertDialog.setPack(d.p); alertDialog.show(getViewSite().getShell().getBounds()); From b03e46b848d457fefc89a254b1ecf9e21b4f7f95 Mon Sep 17 00:00:00 2001 From: KimEunsu Date: Wed, 27 Apr 2016 16:28:47 +0900 Subject: [PATCH 07/10] remove needless initialization --- .../ApplicationWorkbenchWindowAdvisor.java | 75 ------------------- 1 file changed, 75 deletions(-) diff --git a/scouter.client/src/scouter/client/ApplicationWorkbenchWindowAdvisor.java b/scouter.client/src/scouter/client/ApplicationWorkbenchWindowAdvisor.java index 272153e23..b8ae1d555 100644 --- a/scouter.client/src/scouter/client/ApplicationWorkbenchWindowAdvisor.java +++ b/scouter.client/src/scouter/client/ApplicationWorkbenchWindowAdvisor.java @@ -25,9 +25,6 @@ import org.eclipse.core.runtime.Platform; import org.eclipse.swt.graphics.Point; import org.eclipse.swt.widgets.Display; -import org.eclipse.ui.IPerspectiveDescriptor; -import org.eclipse.ui.IPerspectiveListener; -import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.WorkbenchException; import org.eclipse.ui.application.ActionBarAdvisor; import org.eclipse.ui.application.IActionBarConfigurer; @@ -45,7 +42,6 @@ import scouter.client.server.ServerManager; import scouter.client.threads.AlertProxyThread; import scouter.client.threads.SessionObserver; -import scouter.client.util.RCPUtil; /* * ApplicationWorkbenchWindowAdvisor.preWindowOpen() @@ -65,58 +61,6 @@ public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor im Display display; boolean finish = false; - private static final String[] hideActions = { - "com.kyrsoft.stmemmon.actionSet", - "org.eclipse.debug.ui.breakpointActionSet", - "org.eclipse.debug.ui.debugActionSet", - "org.eclipse.debug.ui.launchActionSet", - "org.eclipse.debug.ui.profileActionSet", - "org.eclipse.jdt.ui.A_OpenActionSet", - "org.eclipse.jdt.ui.CodingActionSet", - "org.eclipse.jdt.ui.JavaActionSet", - "org.eclipse.jdt.ui.JavaElementCreationActionSet", - "org.eclipse.jdt.ui.SearchActionSet", - "org.eclipse.jdt.ui.text.java.actionSet.presentation", - "org.eclipse.search.searchActionSet", - "org.eclipse.team.ui.actionSet", - "org.eclipse.ui.NavigateActionSet", - "org.eclipse.ui.WorkingSetActionSet", - "org.eclipse.ui.WorkingSetActionSet.toolbar", - "org.eclipse.ui.WorkingSetModificationActionSet", - "org.eclipse.ui.edit.text.actionSet.annotationNavigation", - "org.eclipse.ui.edit.text.actionSet.convertLineDelimitersTo", - "org.eclipse.ui.edit.text.actionSet.navigation", - "org.eclipse.ui.edit.text.actionSet.presentation", - "org.eclipse.update.ui.softwareUpdates", - "org.eclipse.ui.actionSet.openFiles", - "org.eclipse.ui.actionSet.keyBindings", - "org.eclipse.ui.edit.text.actionSet.openExternalFile", - "org.eclipse.ui.externaltools.ExternalToolsSet" }; - - private static final String[] removePreferences = { - "org.eclipse.ant.ui.AntPreferencePage", - "org.eclipse.datatools.connectivity.ui.preferences.dataNode", - "org.eclipse.debug.ui.DebugPreferencePage", - "org.eclipse.help.ui.browsersPreferencePage", - "org.eclipse.jdt.ui.preferences.JavaBasePreferencePage", - "org.eclipse.pde.ui.MainPreferencePage", - "org.eclipse.team.ui.TeamPreferences", - "org.eclipse.ui.preferencePages.Workbench", - "org.eclipse.equinox.security.ui.category" - }; - - private static final String[] removePerspectives = { - "org.eclipse.debug.ui.DebugPerspective", - "org.eclipse.jdt.ui.JavaPerspective", - "org.eclipse.jdt.ui.JavaHierarchyPerspective", - "org.eclipse.jdt.ui.JavaBrowsingPerspective", - "org.eclipse.team.ui.TeamSynchronizingPerspective" - }; - - private static final String[] preLoadingPerspectives = { - PerspectiveService.ID - }; - public ApplicationWorkbenchWindowAdvisor( IWorkbenchWindowConfigurer configurer) { super(configurer); @@ -233,25 +177,6 @@ public void postWindowCreate() { if (isrcp) { IWorkbenchWindowConfigurer configurer = getWindowConfigurer(); - - configurer.getWindow().addPerspectiveListener( - new IPerspectiveListener() { - - public void perspectiveActivated(IWorkbenchPage page, - IPerspectiveDescriptor perspective) { - RCPUtil.hideActions(hideActions); - } - - public void perspectiveChanged(IWorkbenchPage page, - IPerspectiveDescriptor perspective, - String changeId) { - } - }); - - RCPUtil.hideActions(hideActions); - RCPUtil.hidePreference(removePreferences); - RCPUtil.hidePerspectives(removePerspectives); - //RCPUtil.preLoadingPerspective(preLoadingPerspectives); configurer.getWindow().getShell().setMaximized(true); startBackgroundJob(); } From d5ddeffe80e71f6aa43aa715bc3e631d14cc0b75 Mon Sep 17 00:00:00 2001 From: KimEunsu Date: Wed, 27 Apr 2016 18:34:38 +0900 Subject: [PATCH 08/10] bug fix --- .../client/counter/views/CounterTodayCountView.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/scouter.client/src/scouter/client/counter/views/CounterTodayCountView.java b/scouter.client/src/scouter/client/counter/views/CounterTodayCountView.java index 052cdae93..ecb2e2f19 100644 --- a/scouter.client/src/scouter/client/counter/views/CounterTodayCountView.java +++ b/scouter.client/src/scouter/client/counter/views/CounterTodayCountView.java @@ -167,13 +167,12 @@ public void refresh() { public void run() { if (isActive == true) { setActive(); + traceDataProvider.clearTrace(); + for (int i = 0; i < values.length; i++) { + traceDataProvider.addSample(new Sample(CastUtil.cdouble(i) + 0.5d, CastUtil.cdouble(values[i]))); + } } else { setInactive(); - return; - } - traceDataProvider.clearTrace(); - for (int i = 0; i < values.length; i++) { - traceDataProvider.addSample(new Sample(CastUtil.cdouble(i) + 0.5d, CastUtil.cdouble(values[i]))); } if (CounterUtil.isPercentValue(objType, counter)) { xyGraph.primaryYAxis.setRange(0, 100); From 4a3b6799f7835ba256459b8ae0b5afec336ec0cb Mon Sep 17 00:00:00 2001 From: Gunhee Lee Date: Sat, 30 Apr 2016 20:56:37 +0900 Subject: [PATCH 09/10] logging --- .../src/scouter/server/plugin/builtin/BuiltInPluginManager.java | 1 + 1 file changed, 1 insertion(+) diff --git a/scouter.server/src/scouter/server/plugin/builtin/BuiltInPluginManager.java b/scouter.server/src/scouter/server/plugin/builtin/BuiltInPluginManager.java index c788d0c80..6e2718a89 100644 --- a/scouter.server/src/scouter/server/plugin/builtin/BuiltInPluginManager.java +++ b/scouter.server/src/scouter/server/plugin/builtin/BuiltInPluginManager.java @@ -42,6 +42,7 @@ public static void loadPlugins() { pluginMap.put(pluginPoint, pluginList); } + Logger.println("[BuiltInPlugin]" + c.getName() + "=>" + m[i].getName()); pluginList.add(new PluginInvocation(c.newInstance(), m[i])); } } catch (Throwable t) { From a20c28214abc32f6dc6cbe6174f60d9607aaa87e Mon Sep 17 00:00:00 2001 From: KimEunsu Date: Mon, 2 May 2016 21:33:04 +0900 Subject: [PATCH 10/10] minor version up --- scouter.deploy/build.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scouter.deploy/build.xml b/scouter.deploy/build.xml index a38057495..d4b7cc69e 100644 --- a/scouter.deploy/build.xml +++ b/scouter.deploy/build.xml @@ -4,7 +4,7 @@ - +