7 Replies Latest reply on Apr 1, 2009 6:22 PM by Timo Hahn

    Another different solution to the "PermGen space issue" -comments solicited

    John Stegeman
      Hello all,

      I've been participating in [url http://forums.oracle.com/forums/thread.jspa?threadID=855426]another thread where the infamous permanent generation space (PermGen) has come up again. Olaf H noted that the JRockit JVM by design isn't prone to these types of problems. So, I got to thinking - how can we leverage JRockit for JDeveloper development. I know that JRockit is a supported JVM for WLS, but there's no information about using JRockit to run JDeveloper (in fact, there are a few issues - mouse scroll wheel issues for one). So, how can we use the Sun JDK (either the bundled one with JDev or our own already installed one) to run JDeveloper and use JRockit for running the integrated WLS. It turns out to be pretty simple.

      What I did (Windows Vista):

      1). Install JRockit
      2). Edit the <JDEV_HOME>/jdeveloper/system/system11.1.1.0.31.51.88/DefaultDomain/bin/setDomainEnv.cmd file (the same one you edit to increase the max perm gen size):
      a). add a line "SET JAVA_VENDOR=BEA"
      b). edit the line that starts "set BEA_JAVA_HOME" to point to the JRockit installation

      I noted the following:

      1). the integrated WLS used JRockit (verified in the log file and by using task manager to make sure the java.exe process running was the JRockit one).
      2). (also a verification of #1) - I was able to use JRockit Mission Control against the running WLS (cool)
      3). Simple debugging seems to work (breakpoints, step, look at variables, etc).
      4). I verified that the startup of WLS doesn't pass in the max perm gen size parameter (although I did shrink it back to 48m, "just in case")
      5). (most importantly) - I tested 10 change-run-test cycles without restarting the integrated WLS - no errors!
      6). (added after some thought) - it appears that the WLS starts up and shuts down a bit slower with JRockit - but no hard data to back this up. This may just be my brain looking for a downside.

      Now, for the big question - licensing. Would this configuration (using JRockit for development only, not in production) require a license payment to Oracle, or can we, under the OTN license that you accept when downloading JRockit, use this freely for development? The OTN license reads, in part:
      We grant you a nonexclusive, nontransferable limited license to use the programs for purposes of developing your applications that work with the programs.
      So, it appears that we can use this configuration. It would be a big benefit to not have to work around the perm gen space all the time.

      Second question - it seems that this should be a fully supportable configuration, correct?

      Comments always welcomed.

      Full credit to Olaf Heimburger for putting this train of action in my mind.

      Best,

      John

      bump