I am quite new to Java EE and have been struggling with the slowness of the deployment process, and wonder if I'm doing something wrong. I am experienced with Django where the changes to code immediately occur, and it seems that hot deploying Java EE applications are a bit confusing -- there are multiple things which claim to hot deploy (Glassfish, Eclipse manic hotdeploy, Jetty hotdeploy, JRebel etc.).
My project is a Maven project and I'm using Netbeans to deploy. The site uses Spring, JSF and Hibernate frameworks.
In Netbeans, Deploy on Save, according to the following screenshot seems to be enabled, but clicking/unclicking is not possible since it claims to get the info from my pom.xml (though there is no such field in my pom.xml (only dependencies)).
Now, changes to some files seem to be effective immediately. These include: - JSF files - Static files
Changes to following require deployment: - Any XML file - Any properties file, even localization properties files - Any java file
Changes to those require me to deploy manually and redeploying takes half a minute even though I currently have only 2-3 classes, basically a single user class and an authorization class. The project allows just logins at the moment, and despite this, the compilation takes around a few seconds; and the container (Glassfish) seems to consume around 600 MB of RAM and even gives PermGen errors after a few deployments and I need to kill the java process using Task Manager. (I have read that this is related to garbage collector leaking after each redeploy, and I have even used jhat to generate a profile, but was presented with a list of thousands of classes, my classes, Spring, Hibernate classes etc.)
I have heard about jrebel as well, and tried running it, but it seems that it is not compatible with my Netbeans version (7.0) and even though it seems to run, any modification to any java file still requires a redeploy.
Is there anything I can do to remedy these issues, or is it just normal in Java EE to wait for around 1 minute after each change to any Java file? This issue kills productivity significantly.
Here is my Glassfish output when deploying the application: http://pastebin.com/7FhZ6AVh