]> source.dussan.org Git - aspectj.git/commitdiff
useful pause() method can be called to enable (de)attaching jconsole.
authoraclement <aclement>
Tue, 4 Apr 2006 10:33:11 +0000 (10:33 +0000)
committeraclement <aclement>
Tue, 4 Apr 2006 10:33:11 +0000 (10:33 +0000)
org.aspectj.ajdt.core/src/org/aspectj/tools/ajc/Main.java

index 2f5c98053c3f03dc1ea1e389d8f21eaf27aec972..a89ef82518b7aecf77720743c132a61b7f93db36 100644 (file)
@@ -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