From 90f7bf70b1bfc980b0db28b195ff08e7ef6511f5 Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 4 Apr 2006 10:33:11 +0000 Subject: [PATCH] useful pause() method can be called to enable (de)attaching jconsole. --- .../src/org/aspectj/tools/ajc/Main.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/org.aspectj.ajdt.core/src/org/aspectj/tools/ajc/Main.java b/org.aspectj.ajdt.core/src/org/aspectj/tools/ajc/Main.java index 2f5c98053..a89ef8251 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/tools/ajc/Main.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/tools/ajc/Main.java @@ -243,7 +243,7 @@ public class Main { // make sure we handle out of memory gracefully... try { // byte[] b = new byte[100000000]; for testing OoME only! - run(args, holder); + run(args, holder); } catch (OutOfMemoryError outOfMemory) { IMessage outOfMemoryMessage = new Message(OUT_OF_MEMORY_MSG,null,true); @@ -268,6 +268,17 @@ public class Main { systemExit(holder); } } + + // put calls around run() call above to allowing connecting jconsole +// private void pause(int ms) { +// try { +// System.err.println("Pausing for "+ms+"ms"); +// System.gc(); +// Thread.sleep(ms); +// System.gc(); +// System.err.println("Continuing"); +// } catch (Exception e) {} +// } /** * @param args -- 2.39.5