If you are like me, someone who needs to test on legacy setups for work ><, Oracle since procuring BEA has limited access to old Weblogic setup files, for a good reason actually.
But thanks to the author at http://www.6footplus.com/home/show/233 , he has dug out a few usable FTP links leading to the installation files. Strangely and, are hosted by Peoplesoft seemingly, which is also procured by Oracle some time ago.
I have been using Jboss As 6 a lot lately and it seems that with the new edition of application server from JBoss, it quite often runs into PermGen space issue. To rectify the problem each time, i had to bring down the development server only to bring it up again. It becomes quite haphazard and tedious especially with a slower machine.
A search on Google found some great articles, but the comments left behind by this particular user nailed it (Raghav http://blog.yannis-lionis.gr/?p=8). There were even some silly suggestions like switching to JRockit. Well ignore those.
PermGen space out of memory error when redeploying a JSF 2.0 web application through Maven Cargo plugin
To minimize this, one has to effectively “optimize” the JVM settings which JBoss runs on.
Step 1: Locate and open up run.conf
run.conf is usually found in the bin folder of your application server.
Location of my run.conf file
It is recommended that you modify the settings of the JVM through this file, and not through the .bat itself unless you have specific requirements.
Sample run.conf file
Step 2: Locate and change out the settings below the line that says “rem # JVM memory allocation pool parameters”
rem # JVM memory allocation pool parameters set ...(deleted for simplicity)
Change it to:
rem # JVM memory allocation pool parameters set "JAVA_OPTS=-Xms680m -Xmx680m -XX:PermSize=128m -XX:MaxPermSize=512m -XX:+UseConcMarkSweepGC -XX:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled"
You now need only to restart your server to see the effects.
bash-3.2$ Calling C:\c\server\jbossas-vms\jboss-6.0.0.Final\bin\run.conf.bat =============================================================================== JBoss Bootstrap Environment JBOSS_HOME: C:\c\server\jbossas-vms\jboss-6.0.0.Final JAVA: C:\Program Files\Java\jdk1.6.0_22\bin\java JAVA_OPTS: -Dprogram.name=run.bat -Xms680m -Xmx680m -XX:PermSize=245m -XX:MaxPermSize=1024m -XX:+UseConcMarkSweepGC -XX:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dorg.jboss.resolver.warning=true -server CLASSPATH: C:\Program Files\Java\jdk1.6.0_22\lib\tools.jar;C:\c\server\jbossas-vms\jboss-6.0.0.Final\bin\run.jar ===============================================================================
Notice that JBoss AS echoes my new settings on start up.
My PM (@Work) notes and shares that, in Microsoft Windows 32 bit environment, you would not be able to set a value higher than 1024 for your JVM in most cases. Look at this forum thread for some discussion on it http://www.minecraftforum.net/viewtopic.php?f=10&t=167193. Can someone elaborate some on this please? =p
I am recently foraying into GlassFish server because one of the projects i have seen has gone into production with GlassFish and i am interested to see the full capacity of GlassFish in the equilibrium of enterprise application servers.
[Update March 7, 2011] I was revealed to by my PM that the only reason why the project had gone into production with GlassFish was licensing and SLA agreement with certain vendor (maybe SUN), nothing else. There were in fact some pre-production discussions on using JBoss.
I came across a matrix of web vs full profile distribution of GlassFish from Oracle. I will be doing development for EJB 3.1 and the full JDK 6 web technologies such as JSF 2.0. And hopefully during then i will be able to see more offerings from GlassFish.
Table 1-2 GlassFish Server Full Profile and Web Profile Features
* The Full Java EE Platform contains the complete CORBA package. The OMG CORBA v3.0 APIs are available in the Java EE Web Profile.
** Transaction propagation not supported.
Note – Regardless of whether you choose the Full Platform or Web Profile distribution, you can add or removed packages after installation by using the Update Tool or pkg utility. SeeChapter 11, Extending and Updating GlassFish Server, in Oracle GlassFish Server 3.1 Administration Guide for more information.