I've just switched to Weld to make use of CDI JSF 2 Beans + conversation scope.
Here's my maven dependency :
<dependency>
<groupId>org.jboss.weld.servlet</groupId>
<artifactId>weld-servlet</artifactId>
<version>1.0.1-Final</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
Here's the entry in my web.xml :
<listener>
<listener-class>org.jboss.weld.environment.servlet.Listener</listener-class>
</listener>
One thing i noticed immediately is i just need to reload my tomcat 7 for like 2 times, and the java.lang.OutOfMemoryError: PermGen space
will show up in catalina.out log file.
Before using Weld, i can reload my tomcat 7 for like more than 10 times safely without the java.lang.OutOfMemoryError . I thought increasing my Xmx option in catalina.sh would help, but it didnt in my experience. JAVA_OPTS=-Xmx1024m
Is this normal ?
JAVA_OPTS=-Xmx1024m
does not increase Permgen.-XX:MaxPermSize=256m
does. – Chancery