Since we are mostly using Tomcat as App Container, it's making tough environment when deploying a patch or existing application without restarting tomcat server (Hot deployments) due to reaching the PermGen size due to memory leaks. Hence most of the cases we have to increase PermGen size more than required to deployed applications and it's wasting of memory in the system. There is a solution for them to release PermGen size and let it clean by GC in JVM at hot deployment. Step 01: Include below dependency to pom.xml <dependency> <groupId>se.jiderhamn.classloa der-leak-prevention</groupId> <artifactId>classloader-leak-p revention-servlet</artifactId> <version>2.2.0</version> </dependency> Step 02: Add listener to web.xml <listener> <listener-class>se.jiderhamn.c lassloader.leak.prevention.Cla ssLoaderL...
I thought to write this because of no completed sample found with using above technologies. Environment JDK 1.6 Jboss-5.1.0.GA JSF2 Maven 3 EJB3 Note : Please copy the mysql connector jar to Jboss lib e.x. I copied mysql-connector-java-5.1.29.jar to jboss-5.1.0.GA/server/default/lib Clone the sample from github here git clone https://github.com/malithmeee/library.git Build the entire project and copy the library.ear to Jboss server. Try to access the web page using http://localhost:8080/library.web/home.jsf Note : Database needed to be created, and change properties in relevant files.